1 | # $Id: Portfile 37366 2008-06-04 21:20:21Z raimue@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name git-core |
---|
6 | version 1.5.6 |
---|
7 | description The stupid content tracker. |
---|
8 | long_description A stupid (but extremely fast) directory content manager. \ |
---|
9 | It doesn't do a whole lot, but what it _does_ do is track \ |
---|
10 | directory contents efficiently. |
---|
11 | maintainers bryan@larsen.st openmaintainer |
---|
12 | categories devel |
---|
13 | platforms darwin |
---|
14 | homepage http://git.or.cz/ |
---|
15 | use_bzip2 yes |
---|
16 | master_sites http://www.kernel.org/pub/software/scm/git/ |
---|
17 | distname git-${version} |
---|
18 | distfiles git-${version}${extract.suffix} \ |
---|
19 | git-manpages-${version}${extract.suffix} |
---|
20 | |
---|
21 | checksums git-${version}${extract.suffix} sha1 d37107f7685152796e2738122e7c203674f5f126 \ |
---|
22 | git-manpages-${version}${extract.suffix} sha1 b47c7085737fac529fb3480e5c8646802f397c90 |
---|
23 | |
---|
24 | depends_run port:openssh port:rsync port:perl5.8 port:p5-error |
---|
25 | depends_lib port:curl port:zlib port:openssl port:expat port:libiconv |
---|
26 | |
---|
27 | patchfiles patch-Makefile.diff patch-http.h.diff |
---|
28 | |
---|
29 | extract.only git-${version}${extract.suffix} \ |
---|
30 | git-manpages-${version}${extract.suffix} |
---|
31 | |
---|
32 | use_configure no |
---|
33 | |
---|
34 | build.env CFLAGS="-Wall -O2 -I${prefix}/include" LDFLAGS="-L${prefix}/lib" |
---|
35 | build.args prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \ |
---|
36 | PERL_PATH="/usr/bin/env perl" NO_FINK=1 NO_DARWIN_PORTS=1 |
---|
37 | |
---|
38 | test.run yes |
---|
39 | test.cmd make |
---|
40 | test.target test |
---|
41 | test.dir ${worksrcpath} |
---|
42 | test.args prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \ |
---|
43 | PERL_PATH="/usr/bin/env perl" NO_FINK=1 NO_DARWIN_PORTS=1 |
---|
44 | |
---|
45 | destroot.destdir DESTDIR=${destroot} prefix=${prefix} |
---|
46 | destroot.target install |
---|
47 | destroot.env CFLAGS="-Wall -O2 -I${prefix}/include" LDFLAGS="-L${prefix}/lib" |
---|
48 | destroot.args prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \ |
---|
49 | PERL_PATH="/usr/bin/env perl" NO_FINK=1 NO_DARWIN_PORTS=1 |
---|
50 | |
---|
51 | post-destroot { |
---|
52 | foreach f {1 5 7} { |
---|
53 | xinstall -d ${destroot}${prefix}/share/man/man${f} |
---|
54 | foreach m [glob -directory ${workpath} man${f}/*.${f}] { |
---|
55 | xinstall ${m} ${destroot}${prefix}/share/man/man${f} |
---|
56 | } |
---|
57 | } |
---|
58 | if {![variant_isset svn]} { |
---|
59 | system "rm ${destroot}${prefix}/bin/git-svn*" |
---|
60 | } |
---|
61 | set docdestroot ${destroot}${prefix}/share/doc/${name} |
---|
62 | xinstall -d ${docdestroot} |
---|
63 | if {[variant_isset doc]} { |
---|
64 | system "cd ${docdestroot} && ${extract.cmd} ${extract.pre_args} \ |
---|
65 | ${distpath}/git-htmldocs-${version}${extract.suffix} \ |
---|
66 | ${extract.post_args}" |
---|
67 | } |
---|
68 | |
---|
69 | file copy ${worksrcpath}/contrib ${docdestroot} |
---|
70 | |
---|
71 | foreach badfile [exec find ${destroot} -name perllocal.pod] { |
---|
72 | ui_info "Removing ${badfile}" |
---|
73 | file delete ${badfile} |
---|
74 | } |
---|
75 | } |
---|
76 | |
---|
77 | variant doc description {Install HTML and plaintext documentation} { |
---|
78 | distfiles-append git-htmldocs-${version}${extract.suffix} |
---|
79 | checksums-append git-htmldocs-${version}${extract.suffix} sha1 7a6e205dd20587312623954fd8ce2714c5aad97d |
---|
80 | } |
---|
81 | |
---|
82 | variant gitweb description {Install gitweb.cgi} { |
---|
83 | build.target-append gitweb/gitweb.cgi |
---|
84 | |
---|
85 | post-destroot { |
---|
86 | xinstall -d ${destroot}${prefix}/share/${name}/gitweb |
---|
87 | xinstall -m 444 -W ${worksrcpath}/gitweb \ |
---|
88 | gitweb.cgi \ |
---|
89 | gitweb.css \ |
---|
90 | git-favicon.png \ |
---|
91 | git-logo.png \ |
---|
92 | ${destroot}${prefix}/share/${name}/gitweb |
---|
93 | xinstall -d ${destroot}${prefix}/share/doc/${name}/gitweb |
---|
94 | xinstall -m 444 -W ${worksrcpath}/gitweb README INSTALL \ |
---|
95 | ${destroot}${prefix}/share/doc/${name}/gitweb |
---|
96 | } |
---|
97 | } |
---|
98 | |
---|
99 | variant svn description {Bi-directional subversion repository support} { |
---|
100 | depends_run-append port:subversion port:p5-libwww-perl port:p5-svn-simple port:p5-term-readkey |
---|
101 | } |
---|
102 | |
---|
103 | variant bash_completion description {Bash completion support} { |
---|
104 | depends_run-append port:bash-completion |
---|
105 | |
---|
106 | post-destroot { |
---|
107 | xinstall -d ${destroot}${prefix}/etc/bash_completion.d |
---|
108 | xinstall -m 644 ${worksrcpath}/contrib/completion/git-completion.bash \ |
---|
109 | ${destroot}${prefix}/etc/bash_completion.d/git |
---|
110 | } |
---|
111 | } |
---|
112 | |
---|
113 | default_variants +doc |
---|
114 | |
---|
115 | livecheck.check regex |
---|
116 | livecheck.regex {<!--@VNUM@-->v([0-9.]+)} |
---|