# -*- 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
PortGroup           bitbucket 1.0

bitbucket.setup     facebook hg-experimental 05ed5d06b353
version             0.0.20181109
name                py-hgexperimental
categories-append   devel
platforms           darwin
maintainers         nomaintainer
supported_archs     noarch
license             GPL-2+

description         This is a collection of proof-of-concept Mercurial \
                    extensions written at Facebook: smartlog, githelp, \
                    backups, and fbamend.
long_description    ${description}

checksums           rmd160  b9214c19753f59e336239b1cfb255902fb5fc7b7 \
                    sha256  ecb2095113b966074c3a2e1e0bdf36c9aba5afeafebe1dbc8308668a4fc1bad4 \
                    size    935261

python.versions     27

if {${name} ne ${subport}} {
    depends_build-append \
                        bin:cargo:cargo
    depends_lib-append  port:mercurial \
                        port:py27-cython \
                        port:lz4

    # fix error: 'register' storage class specifier is deprecated and incompatible with C++17
    # see upstream issue https://bitbucket.org/facebook/hg-experimental/issues/15/build-fail-on-macos-1014
    patchfiles-append   patch-setup.py.diff

    post-destroot {
        set sp ${destroot}${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/site-packages

        # conflicts with hg and is not needed
        delete {*}[glob ${sp}/hgext3rd/__init__.py*]
    }

    notes               "
To enable all of the extensions in hgexperimental, add the following to your ~/.hgrc:

\[extensions\]
smartlog =
githelp =
backups =
fbamend =
chistedit =
sparse =
"

    livecheck.type      none
}
