1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name git-core |
---|
7 | version 1.7.6 |
---|
8 | revision 1 |
---|
9 | description A fast version control system |
---|
10 | long_description Git is a fast, scalable, distributed open source version \ |
---|
11 | control system focusing on speed and efficiency. |
---|
12 | maintainers gmail.com:maccheck openmaintainer |
---|
13 | categories devel |
---|
14 | license GPL-2 LGPL-2.1+ |
---|
15 | platforms darwin |
---|
16 | homepage http://git-scm.com |
---|
17 | use_bzip2 yes |
---|
18 | master_sites http://www.kernel.org/pub/software/scm/git/ |
---|
19 | distname git-${version} |
---|
20 | distfiles git-${version}${extract.suffix} \ |
---|
21 | git-manpages-${version}${extract.suffix} |
---|
22 | |
---|
23 | checksums git-${version}${extract.suffix} \ |
---|
24 | sha1 c519b0765c419c84b561bb4a2a86526b16d95cde \ |
---|
25 | rmd160 9ba5daa7bf56b6a242b3302e12c8ced7d3abc77a \ |
---|
26 | git-manpages-${version}${extract.suffix} \ |
---|
27 | sha1 45e0759597d649b13f684f55a186d46dafb7d414 \ |
---|
28 | rmd160 9534cf6540c3be85c6f3b5dfca8ca0cf3f2f366f |
---|
29 | |
---|
30 | depends_run port:rsync port:p5.12-error |
---|
31 | depends_lib port:perl5.12 port:curl port:zlib port:openssl port:expat port:libiconv port:pcre |
---|
32 | |
---|
33 | patchfiles patch-Makefile.diff |
---|
34 | |
---|
35 | extract.only git-${version}${extract.suffix} \ |
---|
36 | git-manpages-${version}${extract.suffix} |
---|
37 | |
---|
38 | use_configure no |
---|
39 | |
---|
40 | set CFLAGS "-Wall -O2 -I${prefix}/include" |
---|
41 | set LDFLAGS "-L${prefix}/lib" |
---|
42 | |
---|
43 | variant universal {} |
---|
44 | if {[variant_isset universal]} { |
---|
45 | set CFLAGS "${CFLAGS} ${configure.universal_cflags}" |
---|
46 | set LDFLAGS "${LDFLAGS} ${configure.universal_ldflags}" |
---|
47 | } else { |
---|
48 | set CFLAGS "${CFLAGS} ${configure.cc_archflags}" |
---|
49 | set LDFLAGS "${LDFLAGS} ${configure.ld_archflags}" |
---|
50 | } |
---|
51 | |
---|
52 | build.args CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \ |
---|
53 | CC=${configure.cc} \ |
---|
54 | prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} LIBPCREDIR=${prefix} \ |
---|
55 | PERL_PATH="${prefix}/bin/perl5.12" NO_FINK=1 NO_DARWIN_PORTS=1 USE_LIBPCRE=1 \ |
---|
56 | NO_R_TO_GCC_LINKER=1 |
---|
57 | |
---|
58 | test.run yes |
---|
59 | test.cmd make |
---|
60 | test.target test |
---|
61 | test.dir ${worksrcpath} |
---|
62 | test.args CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \ |
---|
63 | CC=${configure.cc} \ |
---|
64 | prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} LIBPCREDIR=${prefix} \ |
---|
65 | PERL_PATH="${prefix}/bin/perl5.12" NO_FINK=1 NO_DARWIN_PORTS=1 USE_LIBPCRE=1 \ |
---|
66 | NO_R_TO_GCC_LINKER=1 |
---|
67 | |
---|
68 | destroot.target install |
---|
69 | destroot.args CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \ |
---|
70 | CC=${configure.cc} \ |
---|
71 | prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} LIBPCREDIR=${prefix} \ |
---|
72 | PERL_PATH="${prefix}/bin/perl5.12" NO_FINK=1 NO_DARWIN_PORTS=1 USE_LIBPCRE=1 \ |
---|
73 | NO_R_TO_GCC_LINKER=1 |
---|
74 | |
---|
75 | post-destroot { |
---|
76 | foreach f {1 5 7} { |
---|
77 | xinstall -d ${destroot}${prefix}/share/man/man${f} |
---|
78 | foreach m [glob -directory ${workpath} man${f}/*.${f}] { |
---|
79 | xinstall ${m} ${destroot}${prefix}/share/man/man${f} |
---|
80 | } |
---|
81 | } |
---|
82 | if {![variant_isset svn]} { |
---|
83 | system "rm ${destroot}${prefix}/libexec/git-core/git-svn*" |
---|
84 | } |
---|
85 | set docdestroot ${destroot}${prefix}/share/doc/${name} |
---|
86 | xinstall -d ${docdestroot} |
---|
87 | if {[variant_isset doc]} { |
---|
88 | system "cd ${docdestroot} && ${extract.cmd} ${extract.pre_args} \ |
---|
89 | ${distpath}/git-htmldocs-${version}${extract.suffix} \ |
---|
90 | ${extract.post_args}" |
---|
91 | } |
---|
92 | |
---|
93 | file copy ${worksrcpath}/contrib ${docdestroot} |
---|
94 | |
---|
95 | foreach badfile [exec find ${destroot} -name perllocal.pod] { |
---|
96 | ui_info "Removing ${badfile}" |
---|
97 | file delete ${badfile} |
---|
98 | } |
---|
99 | } |
---|
100 | |
---|
101 | if {![variant_isset python26] && ![variant_isset python27]} { |
---|
102 | default_variants +python27 |
---|
103 | } |
---|
104 | |
---|
105 | variant python26 conflicts python27 description {Use Python 2.6} { |
---|
106 | build.args-append PYTHON_PATH="${prefix}/bin/python2.6" |
---|
107 | destroot.args-append PYTHON_PATH="${prefix}/bin/python2.6" |
---|
108 | test.args-append PYTHON_PATH="${prefix}/bin/python2.6" |
---|
109 | depends_lib-append port:python26 |
---|
110 | } |
---|
111 | |
---|
112 | variant python27 conflicts python26 description {Use Python 2.7} { |
---|
113 | build.args-append PYTHON_PATH="${prefix}/bin/python2.7" |
---|
114 | destroot.args-append PYTHON_PATH="${prefix}/bin/python2.7" |
---|
115 | test.args-append PYTHON_PATH="${prefix}/bin/python2.7" |
---|
116 | depends_lib-append port:python27 |
---|
117 | } |
---|
118 | |
---|
119 | variant doc description {Install HTML and plaintext documentation} { |
---|
120 | distfiles-append git-htmldocs-${version}${extract.suffix} |
---|
121 | checksums-append git-htmldocs-${version}${extract.suffix} \ |
---|
122 | sha1 926168673669d7568b94af6dec35b9ef10ecaedc \ |
---|
123 | rmd160 0c396a95126670a67c3e61ea69196508b88ef195 |
---|
124 | } |
---|
125 | |
---|
126 | variant gitweb description {Install gitweb.cgi} { |
---|
127 | build.target-append gitweb/gitweb.cgi |
---|
128 | |
---|
129 | post-destroot { |
---|
130 | xinstall -d ${destroot}${prefix}/share/${name}/gitweb |
---|
131 | xinstall -W ${worksrcpath}/gitweb \ |
---|
132 | gitweb.cgi \ |
---|
133 | ${destroot}${prefix}/share/${name}/gitweb |
---|
134 | xinstall -m 444 -W ${worksrcpath}/gitweb/static \ |
---|
135 | gitweb.css \ |
---|
136 | gitweb.js \ |
---|
137 | git-favicon.png \ |
---|
138 | git-logo.png \ |
---|
139 | ${destroot}${prefix}/share/${name}/gitweb |
---|
140 | xinstall -d ${destroot}${prefix}/share/doc/${name}/gitweb |
---|
141 | xinstall -m 444 -W ${worksrcpath}/gitweb README INSTALL \ |
---|
142 | ${destroot}${prefix}/share/doc/${name}/gitweb |
---|
143 | } |
---|
144 | } |
---|
145 | |
---|
146 | variant svn description {Bi-directional subversion repository support} { |
---|
147 | depends_run-append port:subversion port:p5.12-libwww-perl port:p5.12-svn-simple port:p5.12-term-readkey |
---|
148 | } |
---|
149 | |
---|
150 | variant bash_completion { |
---|
151 | depends_run-append port:bash-completion |
---|
152 | |
---|
153 | post-destroot { |
---|
154 | xinstall -d ${destroot}${prefix}/etc/bash_completion.d |
---|
155 | xinstall -m 644 ${worksrcpath}/contrib/completion/git-completion.bash \ |
---|
156 | ${destroot}${prefix}/etc/bash_completion.d/git |
---|
157 | } |
---|
158 | } |
---|
159 | |
---|
160 | default_variants +doc |
---|
161 | |
---|
162 | livecheck.type regex |
---|
163 | livecheck.regex {<div id="ver">v([0-9.]+)} |
---|