# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id: Portfile 91293 2012-03-28 14:17:35Z ryandesign@macports.org $ PortSystem 1.0 name git-core version 1.7.9.5 description A fast version control system long_description Git is a fast, scalable, distributed open source version \ control system focusing on speed and efficiency. maintainers nomaintainer categories devel license GPL-2 LGPL-2.1+ platforms darwin homepage http://git-scm.com/ master_sites googlecode distname git-${version} distfiles git-${version}${extract.suffix} \ git-manpages-${version}${extract.suffix} checksums git-${version}${extract.suffix} \ rmd160 8c11d307ef3031c53e7de55111d160733fb3edd3 \ sha256 3ddd52348c4b5212e63fbbe51bc6eccea0833a98d413034187c15037d1375759 \ git-manpages-${version}${extract.suffix} \ rmd160 1ad901a71588e84b6e29f01122aac802234577ac \ sha256 6b293df985c55053bf83141857125c7636d11fe37980ad208d86aaed44af0b45 depends_run port:rsync \ port:p5.12-error \ port:p5.12-term-readkey depends_lib port:perl5.12 \ port:curl \ port:zlib \ port:openssl \ port:expat \ port:libiconv patchfiles patch-Makefile.diff 0001-setup-Do-not-strip-trailing-from-paths.patch patch.pre_args -p1 extract.only git-${version}${extract.suffix} \ git-manpages-${version}${extract.suffix} use_configure no variant universal {} set CFLAGS "-Wall -O2 -I${prefix}/include [get_canonical_archflags cc]" set LDFLAGS "-L${prefix}/lib [get_canonical_archflags ld]" build.args CFLAGS="${CFLAGS}" \ LDFLAGS="${LDFLAGS}" \ CC=${configure.cc} \ prefix=${prefix} \ CURLDIR=${prefix} \ OPENSSLDIR=${prefix} \ ICONVDIR=${prefix} \ PERL_PATH="${prefix}/bin/perl5.12" \ NO_FINK=1 \ NO_DARWIN_PORTS=1 \ NO_R_TO_GCC_LINKER=1 \ V=1 test.run yes test.cmd make test.target test test.dir ${worksrcpath} pre-test { eval test.args ${build.args} } destroot.target install pre-destroot { eval destroot.args ${build.args} } post-destroot { foreach f {1 5 7} { xinstall -d ${destroot}${prefix}/share/man/man${f} foreach m [glob -directory ${workpath} man${f}/*.${f}] { xinstall ${m} ${destroot}${prefix}/share/man/man${f} } } if {![variant_isset svn]} { system "rm ${destroot}${prefix}/libexec/git-core/git-svn*" } set docdestroot ${destroot}${prefix}/share/doc/${name} xinstall -d ${docdestroot} if {[variant_isset doc]} { system "cd ${docdestroot} && ${extract.cmd} ${extract.pre_args} \ ${distpath}/git-htmldocs-${version}${extract.suffix} \ ${extract.post_args}" } file copy ${worksrcpath}/contrib ${docdestroot} foreach badfile [exec find ${destroot} -name perllocal.pod] { ui_info "Removing ${badfile}" file delete ${badfile} } } if {![variant_isset python26] && ![variant_isset python27]} { default_variants +python27 } variant python26 conflicts python27 description {Use Python 2.6} { build.args-append PYTHON_PATH="${prefix}/bin/python2.6" depends_lib-append port:python26 } variant python27 conflicts python26 description {Use Python 2.7} { build.args-append PYTHON_PATH="${prefix}/bin/python2.7" depends_lib-append port:python27 } variant pcre { build.args-append LIBPCREDIR=${prefix} USE_LIBPCRE=1 depends_lib-append port:pcre } variant doc description {Install HTML and plaintext documentation} { distfiles-append git-htmldocs-${version}${extract.suffix} checksums-append git-htmldocs-${version}${extract.suffix} \ rmd160 0511fd2ee2c6eea48c6cc8bdfdc1e40330fb2896 \ sha256 6269da276bbb458c2d989fd7445304e9f28f87715b925aab9490dcce3dce1bc8 } variant gitweb description {Install gitweb.cgi} { build.target-append gitweb/gitweb.cgi post-destroot { xinstall -d ${destroot}${prefix}/share/${name}/gitweb xinstall -W ${worksrcpath}/gitweb \ gitweb.cgi \ ${destroot}${prefix}/share/${name}/gitweb xinstall -m 444 -W ${worksrcpath}/gitweb/static \ gitweb.css \ gitweb.js \ git-favicon.png \ git-logo.png \ ${destroot}${prefix}/share/${name}/gitweb xinstall -d ${destroot}${prefix}/share/doc/${name}/gitweb xinstall -m 444 -W ${worksrcpath}/gitweb README INSTALL \ ${destroot}${prefix}/share/doc/${name}/gitweb } } variant svn description {Bi-directional subversion repository support} { depends_run-append port:subversion \ port:p5.12-libwww-perl \ port:p5.12-svn-simple } variant bash_completion { depends_run-append port:bash-completion post-destroot { xinstall -d ${destroot}${prefix}/etc/bash_completion.d xinstall -m 644 ${worksrcpath}/contrib/completion/git-completion.bash \ ${destroot}${prefix}/etc/bash_completion.d/git } } variant credential_osxkeychain description {Install git credential-osxkeychain utility from contrib} { patchfiles-append patch-contrib-credential-osxkeychain-Makefile.diff post-build { system -W "${worksrcpath}/contrib/credential/osxkeychain" "make [join ${build.args}]" } pre-destroot { xinstall -m 755 "${worksrcpath}/contrib/credential/osxkeychain/git-credential-osxkeychain" \ "${destroot}${prefix}/bin/" system -W "${worksrcpath}/contrib/credential/osxkeychain" "make clean" } } default_variants +doc +pcre +credential_osxkeychain livecheck.type regex livecheck.regex {
v([0-9.]+)}