# -*- 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                uni2ascii
version             4.20
revision            0
checksums           rmd160  27db1cbd14c2e2d3f51b566399a9912b4cd802b6 \
                    sha256  0c5002f54b262d937ba3a8249dd3148791a3f6ec383d80ec479ae60ee0de681a \
                    size    166554

categories          textproc
maintainers         nomaintainer
license             GPL-3
description         converts between UTF-8 Unicode and 7-bit ASCII equivalents
long_description    \
    uni2ascii and ascii2uni convert between UTF-8 Unicode and more than a \
    dozen 7-bit ASCII equivalents including: hexadecimal and decimal HTML \
    numeric character references, \u-escapes, standard hexadecimal, raw \
    hexadecimal, and RFC2396 URI format. Such ASCII equivalents are \
    encountered in a variety of circumstances, such as when Unicode text is \
    included in program source, when entering text into Web programs that can \
    handle the Unicode character set but are not 8-bit safe, and when debugging.

homepage            https://billposer.org/Software/uni2ascii.html
master_sites        https://billposer.org/Software/Downloads/
use_bzip2           yes

depends_build-append \
                    port:gettext
depends_lib-append  port:gettext-runtime

patchfiles          patch-configure.ac.diff \
                    implicit-int.patch \
                    implicit.patch

# We are patching configure.ac.
use_autoreconf      yes

# alignof is C23. Not neccessary to build
configure.checks.implicit_function_declaration.whitelist-append alignof
configure.checks.implicit_int \
                    no

configure.ldflags-append -lintl

post-destroot {
    xinstall -m 644 ${worksrcpath}/COPYING ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     ${name}-(\[0-9.\]+)\\.tar
