# -*- 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.1.4
revision                0

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  bfdf652506deda7e1cd908ddea9888f4f59a0872 \
                        sha256  5c5f6f02dbd42b9c913f83b166ff37fc00368dd7b9b7bcdade3aa0cae5dce5e5 \
                        size    219977

distname                [string map {- _} ${python.rootname}]-${version}
python.default_version  311
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