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: Portfile 63775 2010-02-14 17:09:55Z rmsfisher@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name git-core |
---|
7 | version 1.7.0 |
---|
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 larsen.st:bryan \ |
---|
13 | gmail.com:maccheck \ |
---|
14 | openmaintainer |
---|
15 | categories devel |
---|
16 | platforms darwin |
---|
17 | homepage http://git-scm.com |
---|
18 | use_bzip2 yes |
---|
19 | master_sites http://www.kernel.org/pub/software/scm/git/ |
---|
20 | distname git-${version} |
---|
21 | distfiles git-${version}${extract.suffix} \ |
---|
22 | git-manpages-${version}${extract.suffix} |
---|
23 | |
---|
24 | checksums git-${version}${extract.suffix} \ |
---|
25 | md5 c7553b73e2156d187ece6ba936ae30ab \ |
---|
26 | sha1 c0b536735a7f593877d61f5a8af72bdad0193d97 \ |
---|
27 | rmd160 5f37b556845dba23cc3e604e9b503b4ef0a9d3f7 \ |
---|
28 | git-manpages-${version}${extract.suffix} \ |
---|
29 | md5 1bb3b0ab6c6129d61455b0e2e7104cc8 \ |
---|
30 | sha1 8d8b149df1a3146c76a41f50c14302e0424a29af \ |
---|
31 | rmd160 520953c815c821f5350e6bb96f605c2830678ce0 \ |
---|
32 | |
---|
33 | depends_run port:rsync path:bin/perl:perl5 port:p5-error |
---|
34 | depends_lib port:curl port:zlib port:openssl port:expat port:libiconv |
---|
35 | |
---|
36 | patchfiles patch-Makefile.diff |
---|
37 | |
---|
38 | extract.only git-${version}${extract.suffix} \ |
---|
39 | git-manpages-${version}${extract.suffix} |
---|
40 | |
---|
41 | use_configure no |
---|
42 | |
---|
43 | set CFLAGS "-Wall -O2 -I${prefix}/include ${configure.cc_archflags}" |
---|
44 | set LDFLAGS "-L${prefix}/lib" |
---|
45 | |
---|
46 | build.args CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \ |
---|
47 | CC=${configure.cc} \ |
---|
48 | prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \ |
---|
49 | PERL_PATH="${prefix}/bin/perl" NO_FINK=1 NO_DARWIN_PORTS=1 \ |
---|
50 | NO_R_TO_GCC_LINKER=1 PYTHON_PATH="${prefix}/bin/python" |
---|
51 | |
---|
52 | test.run yes |
---|
53 | test.cmd make |
---|
54 | test.target test |
---|
55 | test.dir ${worksrcpath} |
---|
56 | test.args prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \ |
---|
57 | PERL_PATH="${prefix}/bin/perl" NO_FINK=1 NO_DARWIN_PORTS=1 |
---|
58 | |
---|
59 | destroot.destdir DESTDIR=${destroot} prefix=${prefix} |
---|
60 | destroot.target install |
---|
61 | destroot.args CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \ |
---|
62 | prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \ |
---|
63 | PERL_PATH="${prefix}/bin/perl" NO_FINK=1 NO_DARWIN_PORTS=1 \ |
---|
64 | NO_R_TO_GCC_LINKER=1 PYTHON_PATH="${prefix}/bin/python" |
---|
65 | |
---|
66 | post-destroot { |
---|
67 | foreach f {1 5 7} { |
---|
68 | xinstall -d ${destroot}${prefix}/share/man/man${f} |
---|
69 | foreach m [glob -directory ${workpath} man${f}/*.${f}] { |
---|
70 | xinstall ${m} ${destroot}${prefix}/share/man/man${f} |
---|
71 | } |
---|
72 | } |
---|
73 | if {![variant_isset svn]} { |
---|
74 | system "rm ${destroot}${prefix}/libexec/git-core/git-svn*" |
---|
75 | } |
---|
76 | set docdestroot ${destroot}${prefix}/share/doc/${name} |
---|
77 | xinstall -d ${docdestroot} |
---|
78 | if {[variant_isset doc]} { |
---|
79 | system "cd ${docdestroot} && ${extract.cmd} ${extract.pre_args} \ |
---|
80 | ${distpath}/git-htmldocs-${version}${extract.suffix} \ |
---|
81 | ${extract.post_args}" |
---|
82 | } |
---|
83 | |
---|
84 | file copy ${worksrcpath}/contrib ${docdestroot} |
---|
85 | |
---|
86 | foreach badfile [exec find ${destroot} -name perllocal.pod] { |
---|
87 | ui_info "Removing ${badfile}" |
---|
88 | file delete ${badfile} |
---|
89 | } |
---|
90 | } |
---|
91 | |
---|
92 | variant doc description {Install HTML and plaintext documentation} { |
---|
93 | distfiles-append git-htmldocs-${version}${extract.suffix} |
---|
94 | checksums-append git-htmldocs-${version}${extract.suffix} \ |
---|
95 | md5 9dfbfa8fe5f2a80891de0951435d7dfb \ |
---|
96 | sha1 efc0f2b5d663e72c8e543f3ea7fd47b98e58b029 \ |
---|
97 | rmd160 06be1a51168f4b4e522d06ed0edc3437658bd519 |
---|
98 | } |
---|
99 | |
---|
100 | variant gitweb description {Install gitweb.cgi} { |
---|
101 | build.target-append gitweb/gitweb.cgi |
---|
102 | |
---|
103 | post-destroot { |
---|
104 | xinstall -d ${destroot}${prefix}/share/${name}/gitweb |
---|
105 | xinstall -m 444 -W ${worksrcpath}/gitweb \ |
---|
106 | gitweb.cgi \ |
---|
107 | gitweb.css \ |
---|
108 | git-favicon.png \ |
---|
109 | git-logo.png \ |
---|
110 | ${destroot}${prefix}/share/${name}/gitweb |
---|
111 | xinstall -d ${destroot}${prefix}/share/doc/${name}/gitweb |
---|
112 | xinstall -m 444 -W ${worksrcpath}/gitweb README INSTALL \ |
---|
113 | ${destroot}${prefix}/share/doc/${name}/gitweb |
---|
114 | } |
---|
115 | } |
---|
116 | |
---|
117 | variant svn description {Bi-directional subversion repository support} { |
---|
118 | depends_run-append port:subversion port:p5-libwww-perl port:p5-svn-simple port:p5-term-readkey |
---|
119 | } |
---|
120 | |
---|
121 | variant bash_completion { |
---|
122 | depends_run-append port:bash-completion |
---|
123 | |
---|
124 | post-destroot { |
---|
125 | xinstall -d ${destroot}${prefix}/etc/bash_completion.d |
---|
126 | xinstall -m 644 ${worksrcpath}/contrib/completion/git-completion.bash \ |
---|
127 | ${destroot}${prefix}/etc/bash_completion.d/git |
---|
128 | } |
---|
129 | } |
---|
130 | |
---|
131 | default_variants +doc |
---|
132 | |
---|
133 | livecheck.type regex |
---|
134 | livecheck.regex {<div id="ver">v([0-9.]+)} |
---|