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

Last change on this file since 51870 was 51870, checked in by blb@…, 8 years ago

devel/git-core - stick with livecheck.check for MacPorts 1.7 compatibility

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.3 KB
Line 
1# $Id: Portfile 51870 2009-06-05 20:56:21Z blb@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               prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \
37               PERL_PATH="${prefix}/bin/perl" NO_FINK=1 NO_DARWIN_PORTS=1 \
38               NO_R_TO_GCC_LINKER=1
39
40test.run       yes
41test.cmd       make
42test.target    test
43test.dir       ${worksrcpath}
44test.args      prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \
45               PERL_PATH="${prefix}/bin/perl" NO_FINK=1 NO_DARWIN_PORTS=1
46
47destroot.destdir  DESTDIR=${destroot} prefix=${prefix}
48destroot.target   install
49destroot.args     CFLAGS="-Wall -O2 -I${prefix}/include" LDFLAGS="-L${prefix}/lib" \
50                  prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \
51                  PERL_PATH="${prefix}/bin/perl" NO_FINK=1 NO_DARWIN_PORTS=1 \
52                  NO_R_TO_GCC_LINKER=1
53
54post-destroot {
55    foreach f {1 5 7} {
56        xinstall -d ${destroot}${prefix}/share/man/man${f}
57        foreach m [glob -directory ${workpath} man${f}/*.${f}] {
58            xinstall ${m} ${destroot}${prefix}/share/man/man${f}
59        }
60    }
61    if {![variant_isset svn]} {
62        system "rm ${destroot}${prefix}/libexec/git-core/git-svn*"
63    }
64    set docdestroot ${destroot}${prefix}/share/doc/${name}
65    xinstall -d ${docdestroot}
66    if {[variant_isset doc]} {
67        system "cd ${docdestroot} && ${extract.cmd} ${extract.pre_args} \
68            ${distpath}/git-htmldocs-${version}${extract.suffix} \
69            ${extract.post_args}"
70    }
71
72    file copy ${worksrcpath}/contrib ${docdestroot}
73
74    foreach badfile [exec find ${destroot} -name perllocal.pod] {
75        ui_info "Removing ${badfile}"
76        file delete ${badfile}
77    }
78}
79
80variant doc description {Install HTML and plaintext documentation} {
81    distfiles-append    git-htmldocs-${version}${extract.suffix}
82    checksums-append    git-htmldocs-${version}${extract.suffix} sha1 e7ec6e1ee432484761c89bd3728c69d9dbe98000
83}
84
85variant gitweb description {Install gitweb.cgi} {
86    build.target-append        gitweb/gitweb.cgi
87
88    post-destroot {
89        xinstall -d ${destroot}${prefix}/share/${name}/gitweb
90        xinstall -m 444 -W ${worksrcpath}/gitweb \
91            gitweb.cgi \
92            gitweb.css \
93            git-favicon.png \
94            git-logo.png \
95            ${destroot}${prefix}/share/${name}/gitweb
96        xinstall -d ${destroot}${prefix}/share/doc/${name}/gitweb
97        xinstall -m 444 -W ${worksrcpath}/gitweb README INSTALL \
98            ${destroot}${prefix}/share/doc/${name}/gitweb
99    }
100}
101
102variant svn description {Bi-directional subversion repository support} {
103    depends_run-append  port:subversion port:p5-libwww-perl port:p5-svn-simple port:p5-term-readkey
104}
105
106variant bash_completion {
107    depends_run-append  port:bash-completion
108
109    post-destroot {
110        xinstall -d ${destroot}${prefix}/etc/bash_completion.d
111        xinstall -m 644 ${worksrcpath}/contrib/completion/git-completion.bash \
112            ${destroot}${prefix}/etc/bash_completion.d/git
113    }
114}
115
116default_variants    +doc
117
118livecheck.check         regex
119livecheck.regex         {<div id="ver">v([0-9.]+)}
Note: See TracBrowser for help on using the repository browser.