# $Id: Portfile 54303 2009-07-24 18:43:45Z toby@macports.org $

PortSystem              1.0
PortGroup               muniversal 1.0

name                    gettext
version                 0.17
revision                4
categories              devel
maintainers             ryandesign
homepage                http://www.gnu.org/software/gettext/
master_sites            gnu
platforms               darwin freebsd linux
use_parallel_build      yes

description \
    GNU gettext package

long_description \
    This is the GNU gettext package. It is interesting for \
    authors or maintainers of other packages or programs \
    which they want to see internationalized. As one \
    step the handling of messages in different languages \
    should be implemented. For this task GNU gettext \
    provides the needed tools and library functions.

checksums \
    md5 58a2bc6d39c0ba57823034d55d65d606 \
    sha1 c51803d9f745f6ace36bd09c0486d5735ce399cf \
    rmd160 36df9d4ad2848ec26729781e0d7e25b419e7d261

patchfiles \
    patch-gettext-tools-Makefile.in

configure.cppflags \
    -no-cpp-precomp

configure.args \
    --disable-csharp \
    --without-emacs \
    --with-included-gettext \
    --with-included-glib \
    --with-included-libcroco \
    --with-included-libxml

depends_lib \
    port:libiconv \
    port:ncurses \
    port:expat

test.run                yes
test.target             check

post-destroot {
    if {[file exists ${destroot}${prefix}/lib/charset.alias]} {
        delete ${destroot}${prefix}/lib/charset.alias
    }
    if {[file exists ${destroot}${prefix}/share/locale/locale.alias]} {
        delete ${destroot}${prefix}/share/locale/locale.alias
    }
}

livecheck.check         regex
livecheck.url           http://ftp.gnu.org/gnu/gettext/?C=M&O=D
livecheck.regex         ${name}-(\[0-9.\]+)\\.tar
