# 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 # * bugfixing # New in this version: # * desowin's sed commands are easier to maintain than patches, so I've switched back to sed # * ossxmix should work again, thanks seawright for the patch 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" 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" 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 epatch "${FILESDIR}"/${PV}-ossxmix_fix_segfault.patch \ || die "epatch failed" } src_compile() { emake build || die "emake build failed" } src_install() { newinitd "${FILESDIR}"/oss oss cp -R prototype/* ${D} ewarn "In order to use OSSv4 you must run" ewarn "# /etc/init.d/oss start " ewarn "Enjoy OSSv4 !" }