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

name                    unac
version                 1.8.0
revision                1
categories              textproc
maintainers             nomaintainer
license                 GPL-2+

description             library that removes accents from characters

long_description        ${name} is a ${description}.

homepage                https://savannah.nongnu.org/projects/unac
master_sites            debian:u/${name}

distname                ${name}_${version}.orig
worksrcdir              ${name}-${version}.orig

checksums               rmd160  6cc899d4e55fe740ecaf96342a9904555601156b \
                        sha256  29d316e5b74615d49237556929e95e0d68c4b77a0a0cfc346dc61cf0684b90bf \
                        size    281807

patchfiles              patch-configure.diff
patchfiles-append       gcc-4-fix-bug-556379.patch

use_autoreconf          yes
autoreconf.cmd          ./autogen.sh

depends_build-append    port:perl5 \
                        port:autoconf \
                        port:automake \
                        port:gettext \
                        port:libtool

depends_lib-append      port:libiconv

# Provide missing configuration files to fix build
post-extract {
    copy ${prefix}/share/gettext/config.rpath ${worksrcpath}/config.rpath
    reinplace -W ${worksrcpath} "s|libtoolize|glibtoolize|" autogen.sh
}
