# -*- 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                libtranscript
version             0.3.4
revision            0

homepage            https://os.ghalkes.nl/

description         \
    ${name} is a character-set conversion library, much like the iconv set of \
    functions.

long_description    \
    {*}${description} The library allows great control over the conversions. \
    It was designed for use in programs which use Unicode internally, using \
    UTF-8, UTF-16 or UTF-32/UCS-4.

categories          devel textproc
installs_libs       no
license             GPL-3
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

checksums           rmd160  344dee03249150f595330e23b9a0c73bc9ff373c \
                    sha256  daaa09038f6f3b785b86d152014b3893910f9b9e4e430c015e41b05b34c37ea7 \
                    size    1967777

depends_build-append \
                    port:libtool \
                    path:bin/pkg-config:pkgconfig

master_sites        ${homepage}/dist/
distname            ${name}-${version}
use_bzip2           yes

configure.env-append \
                    LIBTOOL=${prefix}/bin/glibtool
configure.args-append \
                    --without-gettext

# configure's libtool check links its test library with -rpath /usr/lib, which
# gives it an install_name in the shared cache region. ld then refuses the
# -undefined dynamic_lookup that libtool passes, so the check fails and
# configure aborts. Point the throwaway test at ${prefix}/lib instead.
post-patch {
    reinplace "s|-rpath /usr/lib|-rpath ${prefix}/lib|" ${worksrcpath}/configure
}
