source: trunk/dports/devel/mercurial/Portfile

Last change on this file was 153877, checked in by sean@…, 8 weeks ago

mercurial-devel: update to newest version

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.1 KB
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 153877 2016-10-14 21:34:25Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           bitbucket 1.0
7
8bitbucket.setup     seanfarley mercurial 3.9.2
9categories          devel python
10license             GPL-2+
11maintainers         sean openmaintainer
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
29checksums           rmd160  7a2933a6c94fc4b513f7a539a2fc490349052e8a \
30                    sha256  b8eb211e4b4da094b18e3bfd3503ddf0ec0b577a304aff11a19b2c107c7f0006
31
32depends_build       port:py27-docutils
33
34depends_run         path:share/curl/curl-ca-bundle.crt:curl-ca-bundle
35
36patchfiles          patch-setup.py.diff
37
38python.default_version 27
39
40conflicts           mercurial-devel
41
42build.cmd           make
43build.target        all PYTHON=${python.bin}
44
45subport mercurial-devel {
46    bitbucket.setup     seanfarley mercurial 1c518d69d994
47    name                mercurial-devel
48    version             3.9.99
49    revision            2
50
51    conflicts           mercurial
52    checksums           rmd160  ab131654dba0a6880f487c6628d57a05a51f5026 \
53                        sha256  e73492f244d98509559ac7321550df22c28ce665bceb11513bf8861064ec9934
54}
55
56# chg is not installed by default yet
57post-build {
58    system -W ${worksrcpath}/contrib/chg "${build.cmd} CC=\"${configure.cc} \
59        [get_canonical_archflags]\" CFLAGS=\"${configure.cflags}\" \
60        CPPFLAGS='-DHGPATH=\\\"${prefix}/bin/hg\\\"' \
61        PYTHON=${prefix}/bin/python2.7 HG=${prefix}/bin/hg \
62        HGEXTDIR=${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages/hgext"
63}
64
65post-destroot {
66    # configure ssl certificates
67    xinstall -d -m 755 ${destroot}${prefix}/etc/mercurial
68    xinstall -d -m 755 ${destroot}${prefix}/etc/mercurial/hgrc.d
69    xinstall -d -m 755 ${destroot}${prefix}/share/doc/mercurial
70    xinstall -m 644 ${filespath}/hgrc \
71        ${destroot}${prefix}/etc/mercurial/hgrc.default
72    reinplace "s|%%PREFIX%%|${prefix}|g" \
73        ${destroot}${prefix}/etc/mercurial/hgrc.default
74
75    # install html docs
76    xinstall -m 644 -W ${worksrcpath}/doc hg.1.html hgrc.5.html hgignore.5.html \
77            ${destroot}${prefix}/share/doc/mercurial
78
79    # install man pages
80    xinstall -m 644 -W ${worksrcpath}/doc hg.1 \
81            ${destroot}${prefix}/share/man/man1
82    xinstall -m 644 -W ${worksrcpath}/doc hgrc.5 hgignore.5 \
83            ${destroot}${prefix}/share/man/man5
84
85    # install contrib
86    xinstall -d -m 755 ${destroot}${prefix}/share/mercurial
87    file copy ${worksrcpath}/contrib ${destroot}${prefix}/share/mercurial/contrib
88
89    if {[string first "-devel" $subport] == 0} {
90        file copy ${worksrcpath}/contrib/mergetools.hgrc ${destroot}${prefix}/etc/mercurial/hgrc.d/mergetools.rc
91    }
92
93    # copy hgweb.cgi hgwebdir.cgi
94    file copy ${worksrcpath}/hgweb.cgi ${destroot}${prefix}/share/mercurial/
95
96    # copy hgk, the visual history browser
97    file copy ${worksrcpath}/contrib/hgk ${destroot}${prefix}/bin/hgk
98
99    # copy chg
100    file copy ${worksrcpath}/contrib/chg/chg ${destroot}${prefix}/bin
101
102    if {[variant_isset bash_completion]} {
103        set completions_path ${prefix}/share/bash-completion/completions
104        xinstall -d ${destroot}${completions_path}
105        xinstall -m 644 ${worksrcpath}/contrib/bash_completion ${destroot}${completions_path}/mercurial
106        ln -s ${completions_path}/mercurial ${destroot}${completions_path}/hg
107    }
108
109    if {[variant_isset zsh_completion]} {
110        set site-functions ${destroot}${prefix}/share/zsh/site-functions
111        xinstall -d ${site-functions}
112        xinstall ${worksrcpath}/contrib/zsh_completion ${site-functions}/_mercurial
113    }
114}
115
116post-activate {
117    if {![file exists ${prefix}/etc/mercurial/hgrc]} {
118        copy ${prefix}/etc/mercurial/hgrc.default ${prefix}/etc/mercurial/hgrc
119    }
120}
121
122variant bash_completion {
123    depends_run-append path:etc/bash_completion:bash-completion
124}
125
126variant zsh_completion description {Install mercurial zsh completion file} {
127    depends_run-append path:${prefix}/bin/zsh:zsh
128}
Note: See TracBrowser for help on using the repository browser.