# -*- 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
# $Id: Portfile 67248 2010-05-03 13:07:06Z rmsfisher@macports.org $

PortSystem          1.0

name                iso-codes
version             3.16
categories          devel
platforms           darwin
license             LGPLv2.1
maintainers         nomaintainer

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            http://pkg-isocodes.alioth.debian.org/
master_sites        debian:i/iso-codes/
use_bzip2           yes
distfiles           ${name}_${version}.orig${extract.suffix}

checksums           md5     fe87d95d81cd1426a2170b10deb6974c \
                    sha1    09130b8cc0f9b53c2e329265f025f7bff88baa48 \
                    rmd160  b9a61407068ace2623aba767df0b4fb0d4d4d921

depends_build       port:gettext

post-patch {
    reinplace "s|#!/usr/bin/env python|#!/usr/bin/python|g" \
        ${worksrcpath}/iso2pot.py
}

use_parallel_build  yes

post-destroot {
    xinstall -d ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} ChangeLog LICENSE README TODO \
        ${destroot}${prefix}/share/doc/${name}
}

if {[info exists supported_archs]} {
    supported_archs noarch
} else {
    universal_variant no
}

livecheck.type      regex
livecheck.url       http://ftp.us.debian.org/debian/pool/main/i/iso-codes/
livecheck.regex     ${name}_(\\d+(?:\\.\\d+)*).orig${extract.suffix}
