Ticket #15687: Portfile

File Portfile, 4.3 KB (added by weyert@…, 16 years ago)

Git-Core 1.5.6 Portfile

Line 
1# $Id: Portfile 37366 2008-06-04 21:20:21Z raimue@macports.org $
2
3PortSystem        1.0
4
5name              git-core
6version           1.5.6
7description       The stupid content tracker.
8long_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.
11maintainers       bryan@larsen.st openmaintainer
12categories        devel
13platforms         darwin
14homepage          http://git.or.cz/
15use_bzip2         yes
16master_sites      http://www.kernel.org/pub/software/scm/git/
17distname          git-${version}
18distfiles         git-${version}${extract.suffix} \
19                  git-manpages-${version}${extract.suffix}
20
21checksums    git-${version}${extract.suffix} sha1 d37107f7685152796e2738122e7c203674f5f126 \
22             git-manpages-${version}${extract.suffix} sha1 b47c7085737fac529fb3480e5c8646802f397c90
23
24depends_run  port:openssh port:rsync port:perl5.8 port:p5-error
25depends_lib  port:curl port:zlib port:openssl port:expat port:libiconv
26
27patchfiles   patch-Makefile.diff patch-http.h.diff
28
29extract.only   git-${version}${extract.suffix} \
30               git-manpages-${version}${extract.suffix}
31
32use_configure  no
33
34build.env      CFLAGS="-Wall -O2 -I${prefix}/include" LDFLAGS="-L${prefix}/lib"
35build.args     prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \
36               PERL_PATH="/usr/bin/env perl" NO_FINK=1 NO_DARWIN_PORTS=1
37
38test.run       yes
39test.cmd       make
40test.target    test
41test.dir       ${worksrcpath}
42test.args      prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \
43               PERL_PATH="/usr/bin/env perl" NO_FINK=1 NO_DARWIN_PORTS=1
44
45destroot.destdir  DESTDIR=${destroot} prefix=${prefix}
46destroot.target   install
47destroot.env      CFLAGS="-Wall -O2 -I${prefix}/include" LDFLAGS="-L${prefix}/lib"
48destroot.args     prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \
49                  PERL_PATH="/usr/bin/env perl" NO_FINK=1 NO_DARWIN_PORTS=1
50
51post-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
77variant 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
82variant 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
99variant 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
103variant 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
113default_variants    +doc
114
115livecheck.check         regex
116livecheck.regex         {<!--@VNUM@-->v([0-9.]+)}