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

github.setup        halfline git-stage-batch 0.25.0 v
github.tarball_from archive
revision            0

categories          devel python
license             MIT
maintainers         {sub-pop.net:link @subpop} openmaintainer
supported_archs     noarch
platforms           {darwin any}

description         Hunk-by-hunk and line-by-line staging for git
long_description    git-stage-batch provides hunk-by-hunk and line-by-line \
                    staging for git, designed for building clean commit \
                    history.

checksums           rmd160  35b37fc2fac344bb1bdcd19afacbdd99b1c84ce9 \
                    sha256  884c33a33a072c6d06bc69c0af8bdf996e644f4711b68140b18469c2d3f7be4c \
                    size    8212629

set py_ver          3.14
set py_ver_nodot    [string map {. {}} ${py_ver}]
set py_prefix       ${frameworks_dir}/Python.framework/Versions/${py_ver}
set py_pkgd         ${py_prefix}/lib/python${py_ver}/site-packages

depends_build-append \
                    port:gettext

depends_run-append  port:git \
                    port:python${py_ver_nodot}

# Point meson at the MacPorts Python interpreter
meson.native.binaries-append \
                    python=${prefix}/bin/python${py_ver}

# Install the Python package to the framework site-packages
# directory so it is on python's default sys.path.
configure.args-append \
                    -Dpython.purelibdir=${py_pkgd}

