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

name=libcdio
version=2.1.0
release=1
source=(https://ftp.gnu.org/gnu/$name/$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

	sed -i "/LIBCDIO_SOURCE_PATH/s|.*|/* #undef LIBCDIO_SOURCE_PATH */|" \
		$PKG/usr/include/cdio/cdio_config.h

	rm -r $PKG/usr/share/info
}
