This repository has been archived by the owner on Jun 24, 2022. It is now read-only.
forked from EddyPronk/gub
/
git.py
62 lines (58 loc) · 2.45 KB
/
git.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
from gub import target
from gub import tools
class Git (target.AutoBuild):
## source = 'http://kernel.org/pub/software/scm/git/git-1.6.4.4.tar.gz'
source = 'http://git-core.googlecode.com/files/git-1.7.7.tar.gz'
srcdir_build_broken = True
subpackage_names = ['']
dependencies = ['zlib-devel']
config_cache_overrides = target.AutoBuild.config_cache_overrides + '''
ac_cv_c_c99_format=no
ac_cv_fread_reads_directories=no
ac_cv_snprintf_returns_bongus=yes
'''
configure_flags = (tools.AutoBuild.configure_flags
+ ' --without-openssl'
+ ' --without-tcltk'
)
make_flags = '''V=1 NO_PERL=NoThanks'''
class Git__freebsd (Git):
dependencies = Git.dependencies + ['libiconv-devel', 'regex-devel']
make_flags = (Git.make_flags
+ ' CFLAGS="-O2 -Duintmax_t=unsigned -Dstrtoumax=strtoul"')
class Git__mingw (Git):
dependencies = Git.dependencies + ['libiconv-devel', 'regex-devel', 'tcltk']
make_flags = (' uname_S=MINGW'
+ ' V=1 '
## we'll consider it if they clean up their act
+ ' SCRIPT_PERL= '
+ ' instdir_SQ=%(install_prefix)s/lib/ '
+ ' SHELL_PATH=/bin/sh'
+ ' PERL_PATH=/bin/perl')
compile_flags = ' template_dir=../share/git-core/templates/'
def __init__ (self, settings, source):
Git.__init__ (self, settings, source)
self.target_gcc_flags = ' -mms-bitfields '
def configure (self):
target.AutoBuild.configure (self)
self.file_sub ([('CFLAGS = -g',
'CFLAGS = -I compat/ -g')],
'%(builddir)s/config.mak.autogen')
self.file_sub ([('-lsocket',
'-lwsock32'),
],
'%(builddir)s/Makefile')
self.dump ('%(version)s-GUB', '%(builddir)s/version')
def install (self):
Git.install (self)
bat = r'''@echo off
"@INSTDIR@\usr\bin\wish84.exe" "@INSTDIR@\usr\bin\gitk" %1 %2 %3 %4 %5 %6 %7 %8 %9
'''.replace ('%','%%').replace ('\n','\r\n')
self.dump (bat, '%(install_prefix)s/bin/gitk.bat.in')
class Git__tools (tools.AutoBuild, Git):
dependencies = ['curl', 'expat', 'zlib']
configure_flags = (tools.AutoBuild.configure_flags
+ ' --without-openssl'
+ ' --without-tcltk'
)
make_flags = Git.make_flags