# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: WANT_AUTOMAKE="latest" WANT_AUTOCONF="2.1" inherit eutils flag-o-matic libtool toolchain-funcs versionator autotools MY_P=${PN}-III-$(get_version_component_range 2)$(get_version_component_range 3) S=${WORKDIR}/${MY_P} DESCRIPTION="an advanced CDDA reader with error correction" HOMEPAGE="http://www.xiph.org/paranoia/" SRC_URI="http://downloads.xiph.org/releases/cdparanoia/${MY_P}.src.tgz" LICENSE="GPL-2" SLOT="0" KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd" IUSE="kernel_linux" src_unpack() { unpack ${A} cd "${S}" # cdda_paranoia.h should include cdda_interface_h, else most configure # scripts testing for support fails (gnome-vfs, etc). epatch "${FILESDIR}/cdparanoia-3.9.8-include-cdda_interface_h.patch" # if libdir is specified, cdparanoia causes sandbox violations, and using # einstall doesnt work around it. so lets patch in DESTDIR support epatch "${FILESDIR}/cdparanoia-3.9.8-use-destdir.patch" epatch "${FILESDIR}/cdparanoia-3.10-respectflags-pio.patch" # Let portage handle the stripping of binaries sed -i -e "/strip cdparanoia/d" Makefile.in # Fix Makefiles for parallel building. Bug #136128. sed -i \ -e "s/^lib: $/lib: \$(OFILES)/" \ -e "s/^slib: $/slib: \$(OFILES)/" \ -e "/\$(MAKE) lessmessy$/d" \ interface/Makefile.in paranoia/Makefile.in # You don't want to know. mv configure.guess config.guess mv configure.sub config.sub sed -i -e '/configure.\(guess\|sub\)/d' "${S}"/configure.in eautoconf elibtoolize } src_compile() { tc-export CC AR RANLIB append-flags -I"${S}/interface" econf || die emake OPT="${CFLAGS}" || die } src_install() { dodir /usr/{bin,lib,include} /usr/share/man/man1 emake DESTDIR="${D}" install || die dodoc FAQ.txt README }