| 1 | # $Id$ |
|---|
| 2 | |
|---|
| 3 | PortSystem 1.0 |
|---|
| 4 | |
|---|
| 5 | name git-core |
|---|
| 6 | version 1.6.0.4 |
|---|
| 7 | description A fast version control system |
|---|
| 8 | long_description Git is a fast, scalable, distributed open source version \ |
|---|
| 9 | control system focusing on speed and efficiency. |
|---|
| 10 | maintainers larsen.st:bryan \ |
|---|
| 11 | gmail.com:maccheck \ |
|---|
| 12 | openmaintainer |
|---|
| 13 | categories devel |
|---|
| 14 | platforms darwin |
|---|
| 15 | homepage http://git.or.cz/ |
|---|
| 16 | use_bzip2 yes |
|---|
| 17 | master_sites http://www.kernel.org/pub/software/scm/git/ |
|---|
| 18 | distname git-${version} |
|---|
| 19 | distfiles git-${version}${extract.suffix} \ |
|---|
| 20 | git-manpages-${version}${extract.suffix} |
|---|
| 21 | |
|---|
| 22 | checksums git-${version}${extract.suffix} sha1 6e9471519d482894ffd7ecc10cf2c09506971e3d \ |
|---|
| 23 | git-manpages-${version}${extract.suffix} sha1 26e713ef11449187f9762fb603cca43b2b5b80b8 |
|---|
| 24 | |
|---|
| 25 | depends_run port:rsync path:bin/perl:perl5 port:p5-error |
|---|
| 26 | depends_lib port:curl port:zlib port:openssl port:expat port:libiconv |
|---|
| 27 | |
|---|
| 28 | patchfiles patch-Makefile.diff patch-http.h.diff |
|---|
| 29 | |
|---|
| 30 | extract.only git-${version}${extract.suffix} \ |
|---|
| 31 | git-manpages-${version}${extract.suffix} |
|---|
| 32 | |
|---|
| 33 | use_configure no |
|---|
| 34 | |
|---|
| 35 | build.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 | |
|---|
| 40 | test.run yes |
|---|
| 41 | test.cmd make |
|---|
| 42 | test.target test |
|---|
| 43 | test.dir ${worksrcpath} |
|---|
| 44 | test.args prefix=${prefix} CURLDIR=${prefix} OPENSSLDIR=${prefix} ICONVDIR=${prefix} \ |
|---|
| 45 | PERL_PATH="${prefix}/bin/perl" NO_FINK=1 NO_DARWIN_PORTS=1 |
|---|
| 46 | |
|---|
| 47 | destroot.destdir DESTDIR=${destroot} prefix=${prefix} |
|---|
| 48 | destroot.target install |
|---|
| 49 | destroot.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 | |
|---|
| 54 | post-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 | |
|---|
| 80 | variant doc description {Install HTML and plaintext documentation} { |
|---|
| 81 | distfiles-append git-htmldocs-${version}${extract.suffix} |
|---|
| 82 | checksums-append git-htmldocs-${version}${extract.suffix} sha1 2ce03c496bc6d332cfaed4bd58ddb0a0bce3adea |
|---|
| 83 | } |
|---|
| 84 | |
|---|
| 85 | variant 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 | |
|---|
| 102 | variant 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 port:unixODBC |
|---|
| 104 | } |
|---|
| 105 | |
|---|
| 106 | variant bash_completion description {Bash completion support} { |
|---|
| 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 | |
|---|
| 116 | default_variants +doc |
|---|
| 117 | |
|---|
| 118 | livecheck.check regex |
|---|
| 119 | livecheck.regex {<!--@VNUM@-->v([0-9.]+)} |
|---|