# -*- 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

PortSystem              1.0
PortGroup               python 1.0

name                    hg-git
version                 1.2.0
revision                1

categories              devel
license                 GPL-2
platforms               {darwin any}
supported_archs         noarch
maintainers             {danchr @danchr}

homepage                https://www.mercurial-scm.org/wiki/HgGit
description             Push to and pull from a Git server repository from Mercurial.
long_description        This is the Hg-Git plugin for Mercurial, adding the ability \
                        to push to and pull from a Git server repository from Mercurial.\
                        This means you can collaborate on Git based projects from Mercurial, \
                        or use a Git server as a collaboration point for a team with \
                        developers using both Git and Mercurial.

checksums               rmd160  627a7a05819674cf126329c27d9838e04e6f24bf \
                        sha256  3ebfab364a81b9b565b100b2a9de6676bf03df9ec5cd27772aecf911679ecfc3 \
                        size    227333

distname                [string map {- _} ${python.rootname}]-${version}
python.default_version  313
python.pep517           yes

depends_build-append    port:py${python.version}-setuptools_scm

depends_lib-append      port:mercurial port:py${python.version}-dulwich

# used by urllib3 for better compression when cloning using HTTP, e.g.
# from Github
depends_lib-append      port:py${python.version}-brotli

depends_test-append     port:git port:gnupg2 \
                        port:py${python.version}-pygments \
                        port:py${python.version}-pyflakes \
                        port:dash

notes               "
To enable hggit, add the following to your ~/.hgrc:

\[extensions\]
hggit =
"

test.run               yes

pre-test {
    # output some useful diagnostics
    system -W ${worksrcpath} {
        set -x
        hg debuginstall
        hg --config extensions.hggit=./hggit version -v
    }
}

test.cmd               ${python.bin} ./run-tests.py
test.args              -j ${build.jobs} --shell=${prefix}/bin/dash
test.target
test.dir               ${worksrcpath}/tests
