Ticket #35264: Portfile

File Portfile, 3.8 KB (added by lbschenkel (Leonardo Brondani Schenkel), 12 years ago)
Line 
1# -*- 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
2# $Id: Portfile 94382 2012-06-17 14:44:21Z deric@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6
7name                mercurial
8version             2.2.3
9categories          devel python
10license             GPL-2+
11maintainers         deric
12description         A fast, lightweight, distributed SCM system written in \
13                    Python.
14long_description    Mercurial is a fast, lightweight Source Control Management \
15                    system designed for efficient handling of very large \
16                    distributed projects. A distributed SCM tool is designed \
17                    to support a model in which each Repository is loosely \
18                    coupled to many others. Each Repository contains a \
19                    complete set of metadata describing one or more projects. \
20                    These repositories may be located almost anywhere. \
21                    Individual developers only need access to their own \
22                    repositories, not to a central one, in order to commit \
23                    changes. Changes can be share via the builtin webserver, \
24                    CGI, SSH or a stream of patch emails. Mercurial supports \
25                    Apples' FileMerge for merges.
26
27homepage            http://www.selenic.com/mercurial/
28platforms           darwin
29master_sites        http://mercurial.selenic.com/release/
30checksums           rmd160  44a962017d63aaa5e586f2e3c9d772306be9e6eb \
31                    sha256  7c61e38585ba252b31f75df6006bdcf1ff11030321f9fc628f0e1c61929d677b
32depends_run         port:curl-ca-bundle
33
34patchfiles          patch-setup.py.diff
35
36python.default_version 27
37
38variant universal {}
39
40post-destroot {
41    # configure ssl certificates
42    xinstall -d -m 755 ${destroot}${prefix}/etc/mercurial
43    xinstall -m 644 ${filespath}/hgrc \
44        ${destroot}${prefix}/etc/mercurial/hgrc.default
45    reinplace "s|%%PREFIX%%|${prefix}|g" \
46        ${destroot}${prefix}/etc/mercurial/hgrc.default
47
48    # install html docs
49    xinstall -m 644 -W ${worksrcpath}/doc hg.1.html hgrc.5.html hgignore.5.html \
50            ${destroot}${prefix}/share/doc/${name}
51
52    # install man pages
53    xinstall -m 444 -W ${worksrcpath}/doc hg.1 \
54        ${destroot}${prefix}/share/man/man1
55    xinstall -m 444 -W ${worksrcpath}/doc hgrc.5 hgignore.5 \
56        ${destroot}${prefix}/share/man/man5
57
58    # install contrib
59    xinstall -d -m 755 ${destroot}${prefix}/share/${name}
60    file copy ${worksrcpath}/contrib ${destroot}${prefix}/share/${name}/contrib
61
62    # copy hgweb.cgi hgwebdir.cgi
63    file copy ${worksrcpath}/hgweb.cgi ${destroot}${prefix}/share/${name}/
64
65    # copy hgk, the visual history browser
66    file copy ${worksrcpath}/contrib/hgk ${destroot}${prefix}/bin/hgk
67
68    if {[variant_isset bash_completion]} {
69        xinstall -d ${destroot}${prefix}/etc/bash_completion.d
70        copy ${worksrcpath}/contrib/bash_completion ${destroot}${prefix}/etc/bash_completion.d/mercurial
71    }
72
73    if {[variant_isset zsh_completion]} {
74        set site-functions ${destroot}${prefix}/share/zsh/site-functions
75        xinstall -d ${site-functions}
76        xinstall ${worksrcpath}/contrib/zsh_completion ${site-functions}/_mercurial
77    }
78}
79
80post-activate {
81    if {![file exists ${prefix}/etc/mercurial/hgrc]} {
82        copy ${prefix}/etc/mercurial/hgrc.default ${prefix}/etc/mercurial/hgrc
83    }
84}
85
86variant bash_completion {
87    depends_run-append path:etc/bash_completion:bash-completion
88}
89
90variant zsh_completion description {Install mercurial zsh completion file} {
91    depends_run-append path:${prefix}/bin/zsh:zsh
92}
93
94python.link_binaries_suffix
95
96livecheck.url   http://mercurial.selenic.com/release/
97livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"