# Description: A library for CD-ROM and CD image access.
# URL: https://github.com/libcdio/libcdio
# Maintainer: John McQuah, jmcquah at disroot dot org
# Depends on: libcddb ncurses

name=libcdio
version=2.3.0
release=1
source=(https://github.com/$name/$name/releases/download/$version/$name-$version.tar.bz2)

build() {
    cd $name-$version

    autoreconf -fi

    ./configure \
        --prefix=/usr \
        --disable-vcd-info \
        --enable-cpp-progs

    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

    make
    make DESTDIR="$PKG" install

    rm -r "$PKG"/usr/share/info
    rm "$PKG"/usr/lib/*.la
}
