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

name                iso-codes
version             4.20.1
revision            0
checksums           rmd160  cb8a98a246df60715d66736388d0a03603fad592 \
                    sha256  5d551f3ddb32548c4321e9011720fd97751af0107592f79ebffc939bd32f2268 \
                    size    4702640

categories          devel
platforms           any
supported_archs     noarch
license             LGPL-2.1+
maintainers         {ryandesign @ryandesign} openmaintainer

description         ISO country, language and currency codes and translations
long_description    This package aims to provide the list of the country and \
                    language (and currency) names in one place, rather than \
                    repeated in many programs.

homepage            https://salsa.debian.org/iso-codes-team/iso-codes
master_sites        debian:i/iso-codes

use_xz              yes
distfiles           ${name}_${version}.orig${extract.suffix}

set python_version  3.14

depends_build       port:gettext \
                    port:python[string map {. {}} ${python_version}]

build.env           PATH=${frameworks_dir}/Python.framework/Versions/${python_version}/bin:$env(PATH)

post-destroot {
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 0644 -W ${worksrcpath} CHANGELOG.md LICENSES/LGPL-2.1-or-later.txt README.md TODO.md \
        ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.url       https://salsa.debian.org/iso-codes-team/iso-codes/-/tags
livecheck.regex     (?:${name}-|v)(\\d+(?:\\.\\d+)*)\\.tar
