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

github.setup        chrisstaite lameenc 1.8.4 v
github.tarball_from archive
revision            0
name                py-lameenc

categories-append   audio
license             LGPL-3
maintainers         {pguyot @pguyot} openmaintainer
supported_archs     arm64 x86_64

description         Python wrapper around the LAME MP3 encoder

long_description    lameenc is a Python module that wraps the LAME MP3 \
                    encoding library, allowing MP3 encoding from Python.

checksums           rmd160  5bf8d0ac2a778a3c1406fcfa1f7489c326dd18fa \
                    sha256  70c7a23830c98139f2b8e2ebdd56990b3e8e50bb8eaf22daa7b8861b1f6bffcb \
                    size    13499

python.versions     313 314

# Disable PEP 517 build - setup.py needs custom --libdir/--incdir args
# and setuptools-scm fails without a git repo
python.pep517       no

if {${name} ne ${subport}} {
    depends_build-append \
                    port:py${python.version}-setuptools \
                    port:py${python.version}-setuptools_scm

    depends_lib-append \
                    port:lame

    build.env-append \
                    SETUPTOOLS_SCM_PRETEND_VERSION=${version}

    destroot.env-append \
                    SETUPTOOLS_SCM_PRETEND_VERSION=${version}

    build.args-append \
                    --libdir=${prefix}/lib \
                    --incdir=${prefix}/include/lame

    destroot.args-append \
                    --libdir=${prefix}/lib \
                    --incdir=${prefix}/include/lame
}
