# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils versionator # TODO: # * properly check for the kernel version, using the check-kernel.eclass # * get rid of the sed commands and the ossxmix patch, with some help from 4Front # * better initscript # * bugfixing # New in this version (2007-10-11): # * version bump to build 1008 # * got rid of a sed command # * added more items in the SRC_URI # * made the ossxmix patch name version-independent DESCRIPTION="Open Sound System - portable, mixing-capable, high quality sound system for Unix." HOMEPAGE="http://developer.opensound.com/" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" DEPEND="sys-apps/gawk >=x11-libs/gtk+-2 >=sys-kernel/linux-headers-2.6.11" RDEPEND="${DEPEND}" MY_PV=$(get_version_component_range 1-2) MY_BUILD=$(get_version_component_range 3) SRC_URI="http://www.4front-tech.com/developer/sources/stable/oss-v${MY_PV}-build${MY_BUILD}-src-gpl.tar.bz2 \ http://voimakentta.vpalvelin.com/sources/stable/oss-v${MY_PV}-build${MY_BUILD}-src-gpl.tar.bz2 \ http://developer.opensound.com/sources/stable/oss-v${MY_PV}-build${MY_BUILD}-src-gpl.tar.bz2 " S="${WORKDIR}/build" src_unpack() { unpack ${A} mkdir build cd "${S}" ${WORKDIR}/oss-v${MY_PV}-build${MY_BUILD}-src-gpl/configure || die "configure failed" cp ${WORKDIR}/build/cmd/ossxmix/Makefile \ ${WORKDIR}/build/cmd/ossxmix/Makefile.bak sed -i -e 's/$(CFLAGS) $(OSFLAGS)//;s/$(CFLAGS) $(LIBRARIES)//' \ ${WORKDIR}/build/cmd/*/Makefile \ ${WORKDIR}/build/os_cmd/Linux/ossdetect/Makefile \ ${WORKDIR}/build/os_cmd/Linux/ossvermagic/Makefile \ || die "sed failed" mv ${WORKDIR}/build/cmd/ossxmix/Makefile.bak \ ${WORKDIR}/build/cmd/ossxmix/Makefile epatch "${FILESDIR}"/ossxmix_fix_segfault.patch \ || die "epatch failed" } src_compile() { emake build || die "emake build failed" } src_install() { newinitd "${FILESDIR}"/oss oss4 cp -R prototype/* ${D} ewarn "In order to use OSSv4 you must run" ewarn "# /etc/init.d/oss start " ewarn "Enjoy OSSv4 !" }