# -*- 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 92358 2012-04-26 03:32:18Z rmstonecipher@macports.org $

PortSystem          1.0

name                iso-codes
version             3.34
categories          devel
platforms           darwin
supported_archs     noarch
license             LGPL-2.1+
maintainers         l2g 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            http://pkg-isocodes.alioth.debian.org/
master_sites        debian:i/iso-codes/
use_bzip2           yes
distfiles           ${name}_${version}.orig${extract.suffix}

checksums           sha1    b41e379a6282544b7d49f157ca85d4c8bd004909 \
                    rmd160  1077a98820f9d98d0844c23a3401f4ccb4b4373f

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}
}

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