# 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, with some help from 4Front # * better initscript # * bugfixing # New in this version (2007-11-30): # * version bump to v4.1 test0 build 071126 # * modified my patches so they can patch cleanly against most updates 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}" RESTRICT="mirror" MY_PV=$(get_version_component_range 1-2) MY_TEST=$(get_version_component_range 3) MY_BUILD=$(get_version_component_range 4) SRC_URI="http://www.4front-tech.com/developer/sources/testing/oss-v${MY_PV}test${MY_TEST}-${MY_BUILD}-src-gpl.tar.bz2 \ http://voimakentta.vpalvelin.com/sources/testing/oss-v${MY_PV}test${MY_TEST}-${MY_BUILD}-src-gpl.tar.bz2 \ http://developer.opensound.com/sources/testing/oss-v${MY_PV}test${MY_TEST}-${MY_BUILD}-src-gpl.tar.bz2 " S="${WORKDIR}/build" src_unpack() { unpack ${A} mkdir build cd "${WORKDIR}"/oss-v${MY_PV}test${MY_TEST}-${MY_BUILD}-src-gpl einfo "Applying patches..." patch -p0 -g0 -E --no-backup-if-mismatch < "${FILESDIR}"/${P}-srcconf.patch \ || die "srcconf patch failed" patch -p0 -g0 -E --no-backup-if-mismatch < "${FILESDIR}"/${P}-soundon_no_libsalsa.patch \ || die "soundon_no_libsalsa patch failed" cd "${S}" einfo "Running configure..." ${WORKDIR}/oss-v${MY_PV}test${MY_TEST}-${MY_BUILD}-src-gpl/configure || die "configure failed" cp ${WORKDIR}/build/cmd/ossxmix/Makefile \ ${WORKDIR}/build/cmd/ossxmix/Makefile.bak einfo "Stripping compiler flags..." sed -i -e 's/$(CFLAGS) $(OSFLAGS)//;s/$(CFLAGS) $(LIBRARIES)//' \ ${WORKDIR}/build/cmd/*/Makefile \ ${WORKDIR}/build/os_cmd/Linux/ossvermagic/Makefile \ ${WORKDIR}/build/os_cmd/Linux/ossdetect/Makefile \ || die "sed failed" mv ${WORKDIR}/build/cmd/ossxmix/Makefile.bak \ ${WORKDIR}/build/cmd/ossxmix/Makefile einfo "Replacing init script with gentoo friendly one..." cp ${FILESDIR}/oss ${WORKDIR}/build/setup/Linux/oss/etc/S89oss } src_compile() { emake build || die "emake build failed" } src_install() { newinitd "${FILESDIR}"/oss oss cp -R prototype/* ${D} ewarn "PLEASE NOTE:" ewarn "" ewarn "In order to use OSSv4 you must run" ewarn "# /etc/init.d/oss start " ewarn "" ewarn "If you are upgrading from a previous build of OSSv4 you must run" ewarn "# /etc/init.d/oss restart " ewarn "" ewarn "Enjoy OSSv4 !" }