# -*- 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.9.0 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  fb8428300e6d981c8634e7ac43e6843465406fe8 \
                    sha256  1d96b6d818d00d5d479ecfc01c8939f3fde1ee002a133577d6f42354181044f7 \
                    size    13900

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
}
