# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Open Sound System" HOMEPAGE="http://www.opensound.com/" SRC_URI="http://voimakentta.vpalvelin.com/sources/stable/oss-v4.0-build${PV}-src-gpl.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86 amd64" IUSE="" DEPEND="" RDEPEND="${DEPEND}" S=${WORKDIR}/build src_unpack() { unpack ${A} mkdir build cd "${S}" } src_compile() { ${WORKDIR}/oss-v4.0-build${PV}-src-gpl/configure cp ${WORKDIR}/build/cmd/ossxmix/Makefile ${WORKDIR}/build/cmd/ossxmix/Makefile.bak sed -i \ -e 's/$(CFLAGS) $(OSFLAGS)//' \ ${WORKDIR}/build/cmd/*/Makefile \ || die "sed failed" sed -i \ -e 's/$(CFLAGS) $(LIBRARIES)//' \ ${WORKDIR}/build/cmd/*/Makefile \ ${WORKDIR}/build/os_cmd/Linux/ossvermagic/Makefile \ || die "sed failed" sed -i \ -e 's/$(CFLAGS) $(OSFLAGS)//' \ ${WORKDIR}/build/os_cmd/Linux/ossvermagic/Makefile \ || die "sed failed" sed -i \ -e 's/$(INCLUDES) ui_X.c/$(CFLAGS) $(INCLUDES) ui_X.c/' \ ${WORKDIR}/build/cmd/ossctl/Makefile \ || die "sed failed" mv ${WORKDIR}/build/cmd/ossxmix/Makefile.bak ${WORKDIR}/build/cmd/ossxmix/Makefile make || die "emake failed" } src_install() { cd ${WORKDIR}/build/setup/Linux/ sed -i \ -e 's/cp -R prototype\/\* \///' \ make.local \ || die "sed failed" sed -i \ -e 's/cd \/usr\/lib\/oss\/build/exit 0/' \ spec.tmpl \ || die "sed failed" head make.local -n$((`wc make.local -l | cut -f1 -d" "` - 3)) > make.local.bak mv make.local.bak make.local cd "${S}" make install cp -R prototype/* ${D} }