source: trunk/dports/devel/mercurial/Portfile @ 142626

Last change on this file since 142626 was 142626, checked in by sean@…, 3 years ago

mercurial-devel: update to newest commit

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.6 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 142626 2015-11-17 21:54:22Z sean@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           bitbucket 1.0
7
8bitbucket.setup     seanfarley mercurial 3.6.1
9revision            0
10categories          devel python
11license             GPL-2+
12maintainers         sean openmaintainer
13description         A fast, lightweight, distributed SCM system written in \
14                    Python.
15long_description    Mercurial is a fast, lightweight Source Control Management \
16                    system designed for efficient handling of very large \
17                    distributed projects. A distributed SCM tool is designed \
18                    to support a model in which each Repository is loosely \
19                    coupled to many others. Each Repository contains a \
20                    complete set of metadata describing one or more projects. \
21                    These repositories may be located almost anywhere. \
22                    Individual developers only need access to their own \
23                    repositories, not to a central one, in order to commit \
24                    changes. Changes can be share via the builtin webserver, \
25                    CGI, SSH or a stream of patch emails. Mercurial supports \
26                    Apples' FileMerge for merges.
27
28homepage            http://www.selenic.com/mercurial/
29platforms           darwin
30checksums           rmd160  28c09cf05ebd1cb45470f366bf4aeeb946bf472f \
31                    sha256  2b2554c1d302d0110668da830ba81f197753cdc0fc54a56b296c91e875719cf2
32
33depends_build       port:py27-docutils
34
35depends_run         path:share/curl/curl-ca-bundle.crt:curl-ca-bundle
36
37patchfiles          patch-setup.py.diff
38
39python.default_version 27
40
41conflicts           mercurial-devel
42
43build.cmd           make
44build.target        all PYTHON=${python.bin}
45
46subport mercurial-devel {
47    bitbucket.setup     seanfarley mercurial 2da6a2dbfc42
48    name                mercurial-devel
49    version             3.6.99
50    revision            1
51
52    conflicts           mercurial
53    checksums           rmd160  28e52372fb1ac83128c440b9cb3412bec813c17f \
54                        sha256  152e3150dd676098cd34fcd7b09df0837bc0d479d8d5a46f681547fcce8eb031
55}
56
57post-destroot {
58    # configure ssl certificates
59    xinstall -d -m 755 ${destroot}${prefix}/etc/mercurial
60    xinstall -d -m 755 ${destroot}${prefix}/etc/mercurial/hgrc.d
61    xinstall -d -m 755 ${destroot}${prefix}/share/doc/mercurial
62    xinstall -m 644 ${filespath}/hgrc \
63        ${destroot}${prefix}/etc/mercurial/hgrc.default
64    reinplace "s|%%PREFIX%%|${prefix}|g" \
65        ${destroot}${prefix}/etc/mercurial/hgrc.default
66
67    # install html docs
68    xinstall -m 644 -W ${worksrcpath}/doc hg.1.html hgrc.5.html hgignore.5.html \
69            ${destroot}${prefix}/share/doc/mercurial
70
71    # install man pages
72    xinstall -m 644 -W ${worksrcpath}/doc hg.1 \
73            ${destroot}${prefix}/share/man/man1
74    xinstall -m 644 -W ${worksrcpath}/doc hgrc.5 hgignore.5 \
75            ${destroot}${prefix}/share/man/man5
76
77    # install contrib
78    xinstall -d -m 755 ${destroot}${prefix}/share/mercurial
79    file copy ${worksrcpath}/contrib ${destroot}${prefix}/share/mercurial/contrib
80
81    if {[string first "-devel" $subport] == 0} {
82        file copy ${worksrcpath}/contrib/mergetools.hgrc ${destroot}${prefix}/etc/mercurial/hgrc.d/mergetools.rc
83    }
84
85    # copy hgweb.cgi hgwebdir.cgi
86    file copy ${worksrcpath}/hgweb.cgi ${destroot}${prefix}/share/mercurial/
87
88    # copy hgk, the visual history browser
89    file copy ${worksrcpath}/contrib/hgk ${destroot}${prefix}/bin/hgk
90
91    if {[variant_isset bash_completion]} {
92        set completions_path ${prefix}/share/bash-completion/completions
93        xinstall -d ${destroot}${completions_path}
94        xinstall -m 644 ${worksrcpath}/contrib/bash_completion ${destroot}${completions_path}/mercurial
95        ln -s ${completions_path}/mercurial ${destroot}${completions_path}/hg
96    }
97
98    if {[variant_isset zsh_completion]} {
99        set site-functions ${destroot}${prefix}/share/zsh/site-functions
100        xinstall -d ${site-functions}
101        xinstall ${worksrcpath}/contrib/zsh_completion ${site-functions}/_mercurial
102    }
103}
104
105post-activate {
106    if {![file exists ${prefix}/etc/mercurial/hgrc]} {
107        copy ${prefix}/etc/mercurial/hgrc.default ${prefix}/etc/mercurial/hgrc
108    }
109}
110
111variant bash_completion {
112    depends_run-append path:etc/bash_completion:bash-completion
113}
114
115variant zsh_completion description {Install mercurial zsh completion file} {
116    depends_run-append path:${prefix}/bin/zsh:zsh
117}
118
119python.link_binaries_suffix
Note: See TracBrowser for help on using the repository browser.