# -*- 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.2 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  c76e5ac5c8cb23a30681bae7e19208ab43f3680f \
                    sha256  87a941abc2f7773a2bf6fea4e49ed0eb3c5be78b1110733322f1ddc413a6dbcb \
                    size    13096

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
}
