source: trunk/dports/devel/git-core/Portfile @ 52006

Last change on this file since 52006 was 52006, checked in by ryandesign@…, 11 years ago

git-core: use ${configure.cc}; closes #19888

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.3 KB
Line 
1# $Id: Portfile 52006 2009-06-08 05:26:46Z ryandesign@macports.org $
2
3PortSystem        1.0
4
5name              git-core
6version           1.6.3.2
7description       A fast version control system
8long_description  Git is a fast, scalable, distributed open source version \
9                  control system focusing on speed and efficiency.
10maintainers       larsen.st:bryan \
11                  gmail.com:maccheck \
12                  openmaintainer
13categories        devel
14platforms         darwin
15homepage          http://git.or.cz/
16use_bzip2         yes
17master_sites      http://www.kernel.org/pub/software/scm/git/
18distname          git-${version}
19distfiles         git-${version}${extract.suffix} \
20                  git-manpages-${version}${extract.suffix}
21
22checksums    git-${version}${extract.suffix} sha1 7e32fe5a117959d9aa112c67b258c54d37320349 \
23             git-manpages-${version}${extract.suffix} sha1 11d107e4639318a948137faa88ad291b12b9515a
24
25depends_run  port:rsync path:bin/perl:perl5 port:p5-error
26depends_lib  port:curl port:zlib port:openssl port:expat port:libiconv
27
28patchfiles   patch-Makefile.diff
29
30extract.only   git-${version}${extract.suffix} \
31               git-manpages-${version}${extract.suffix}
32
33use_configure  no
34
35build.args     CFLAGS="-Wall -O2 -I${prefix}/include" LDFLAGS="-L${prefix}/lib" \
36               CC=${configure.cc} \
37               prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \
38               PERL_PATH="${prefix}/bin/perl" NO_FINK=1 NO_DARWIN_PORTS=1 \
39               NO_R_TO_GCC_LINKER=1
40
41test.run       yes
42test.cmd       make
43test.target    test
44test.dir       ${worksrcpath}
45test.args      prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \
46               PERL_PATH="${prefix}/bin/perl" NO_FINK=1 NO_DARWIN_PORTS=1
47
48destroot.destdir  DESTDIR=${destroot} prefix=${prefix}
49destroot.target   install
50destroot.args     CFLAGS="-Wall -O2 -I${prefix}/include" LDFLAGS="-L${prefix}/lib" \
51                  prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \
52                  PERL_PATH="${prefix}/bin/perl" NO_FINK=1 NO_DARWIN_PORTS=1 \
53                  NO_R_TO_GCC_LINKER=1
54
55post-destroot {
56    foreach f {1 5 7} {
57        xinstall -d ${destroot}${prefix}/share/man/man${f}
58        foreach m [glob -directory ${workpath} man${f}/*.${f}] {
59            xinstall ${m} ${destroot}${prefix}/share/man/man${f}
60        }
61    }
62    if {![variant_isset svn]} {
63        system "rm ${destroot}${prefix}/libexec/git-core/git-svn*"
64    }
65    set docdestroot ${destroot}${prefix}/share/doc/${name}
66    xinstall -d ${docdestroot}
67    if {[variant_isset doc]} {
68        system "cd ${docdestroot} && ${extract.cmd} ${extract.pre_args} \
69            ${distpath}/git-htmldocs-${version}${extract.suffix} \
70            ${extract.post_args}"
71    }
72
73    file copy ${worksrcpath}/contrib ${docdestroot}
74
75    foreach badfile [exec find ${destroot} -name perllocal.pod] {
76        ui_info "Removing ${badfile}"
77        file delete ${badfile}
78    }
79}
80
81variant doc description {Install HTML and plaintext documentation} {
82    distfiles-append    git-htmldocs-${version}${extract.suffix}
83    checksums-append    git-htmldocs-${version}${extract.suffix} sha1 e7ec6e1ee432484761c89bd3728c69d9dbe98000
84}
85
86variant gitweb description {Install gitweb.cgi} {
87    build.target-append        gitweb/gitweb.cgi
88
89    post-destroot {
90        xinstall -d ${destroot}${prefix}/share/${name}/gitweb
91        xinstall -m 444 -W ${worksrcpath}/gitweb \
92            gitweb.cgi \
93            gitweb.css \
94            git-favicon.png \
95            git-logo.png \
96            ${destroot}${prefix}/share/${name}/gitweb
97        xinstall -d ${destroot}${prefix}/share/doc/${name}/gitweb
98        xinstall -m 444 -W ${worksrcpath}/gitweb README INSTALL \
99            ${destroot}${prefix}/share/doc/${name}/gitweb
100    }
101}
102
103variant svn description {Bi-directional subversion repository support} {
104    depends_run-append  port:subversion port:p5-libwww-perl port:p5-svn-simple port:p5-term-readkey
105}
106
107variant bash_completion {
108    depends_run-append  port:bash-completion
109
110    post-destroot {
111        xinstall -d ${destroot}${prefix}/etc/bash_completion.d
112        xinstall -m 644 ${worksrcpath}/contrib/completion/git-completion.bash \
113            ${destroot}${prefix}/etc/bash_completion.d/git
114    }
115}
116
117default_variants    +doc
118
119livecheck.check         regex
120livecheck.regex         {<div id="ver">v([0-9.]+)}
Note: See TracBrowser for help on using the repository browser.