Ticket #16308: patch-mercurial-Portfile-newVariantBashCompletion.diff

File patch-mercurial-Portfile-newVariantBashCompletion.diff, 1.8 KB (added by paidhi@…, 16 years ago)

Patch for Portfile (devel/mercurial) - Update to 1.0.2 +bash_completion

  • Portfile

    old new  
    1 # $Id: Portfile 37298 2008-06-02 19:08:55Z saispo@macports.org $
     1# $Id$
    22
    33PortSystem          1.0
    44PortGroup           python25 1.0
    55
    66name                mercurial
    7 version             1.0.1
    8 revision            1
     7version             1.0.2
     8revision            0
    99categories          devel python
    1010maintainers         deric@macports.org
    1111description         A fast, lightweight, distributed SCM system written in \
     
    2525
    2626homepage            http://www.selenic.com/mercurial/
    2727master_sites        http://www.selenic.com/mercurial/release/
    28 checksums           md5 a4ef7eb2c8818404a459e3be05feff6f \
    29                     sha1 ada3e6d2128283efeefb7b44f9a1e0dfc22d62f1 \
    30                     rmd160 f451ab56660f46a51b4588de966ec0718f38cd7b
     28checksums           md5 32432616f517107e6582721c257cd1f4 \
     29                    sha1 6d5be655276770192b889cee279bdcc0aee977e3 \
     30                    rmd160 0f163d19a12bbe7dcfc45f10cdab07f5b16e7b3a
    3131
    3232depends_lib-append  port:py25-zlib port:py25-hashlib port:py25-bz2
    3333
     34variant bash_completion description {Install mercurial bash-completion file} {
     35                                depends_run-append port:bash-completion
     36}
     37
    3438post-destroot {
    3539    # install html docs
    3640    xinstall -m 644 -W ${worksrcpath}/doc hg.1.html hgrc.5.html hgignore.5.html \
     
    4953        # copy hgweb.cgi hgwebdir.cgi
    5054        file copy ${worksrcpath}/hgweb.cgi ${destroot}${prefix}/share/${name}/
    5155        file copy ${worksrcpath}/hgwebdir.cgi ${destroot}${prefix}/share/${name}/
     56       
     57        if {[variant_isset bash_completion]} {
     58            xinstall -d ${destroot}${prefix}/etc/bash_completion.d
     59                copy ${worksrcpath}/contrib/bash_completion ${destroot}${prefix}/etc/bash_completion.d/mercurial
     60    }
    5261}