# -*- 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                libcdio
version             0.94

categories          devel
platforms           darwin
license             GPL-3+
maintainers         nomaintainer

description         Compact Disc Input and Control Library
long_description    The libcdio package contains a library which \
                    encapsulates CD-ROM reading and control. \
                    Applications wishing to be oblivious of the \
                    OS- and device-dependent properties of a CD-ROM \
                    can use this library.
homepage            http://www.gnu.org/software/libcdio/

depends_build       port:pkgconfig
depends_lib         port:gettext \
                    port:libcddb \
                    port:libiconv \
                    port:ncurses \
                    port:popt

master_sites        gnu
checksums           rmd160  795a72a5fa0b6f23e969051f0f59ec9f1ca588c2 \
                    sha256  96e2c903f866ae96f9f5b9048fa32db0921464a2286f5b586c0f02699710025a

# Required to get a newer libtool that understands -stdlib.
use_autoreconf          yes
autoreconf.args-append  --force

configure.args      --disable-silent-rules

# This is a hack because libcdio incorrectly registers the detected
# libiconv linking options *for libtool* in its .pc files.
# Should probably be handled another way?
post-configure {
    foreach pcfile [glob ${worksrcpath}/*.pc] {
        reinplace -W "${worksrcpath}/lib/pkgconfig" "s/-R/-Wl,-rpath,/g" "${pcfile}"
    }
}

test.run            yes
test.target         check