# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils versionator # For the news, see the commit messages. 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="+midi -oss_ali5455 -oss_audigyls -oss_audiopci -oss_digi96 -oss_envy24ht -oss_hdaudio -oss_sblive -oss_ymf7xx -oss_allegro -oss_audiocs -oss_cmi878x -oss_cs4281 -oss_emu10k1x -oss_fmedia -oss_ich -oss_sbpci -oss_trident -oss_via823x -oss_atiaudio -oss_cmpci -oss_cs461x -oss_envy24 -oss_geode -oss_imux -oss_sadasupport -oss_sbxfi -oss_via97" DEPEND="sys-apps/gawk >=x11-libs/gtk+-2 >=sys-kernel/linux-headers-2.6.11 !media-sound/oss-devel" RDEPEND="${DEPEND}" RESTRICT="mirror" MY_PV=$(get_version_component_range 1-2) MY_BUILD=$(get_version_component_range 3) MY_P="oss-v${MY_PV}-build${MY_BUILD}-src-gpl" SRC_URI="http://www.4front-tech.com/developer/sources/stable/gpl/${MY_P}.tar.bz2" S="${WORKDIR}/${MY_P}" src_unpack() { unpack "${A}" mkdir "${WORKDIR}/build" cd "${S}" einfo "Applying patches..." epatch "${FILESDIR}/${P}-Werror_fix.patch" \ || die "osscore_new_kernels patch failed" einfo "Replacing init script with gentoo friendly one..." cp "${FILESDIR}/oss" "${S}/setup/Linux/oss/etc/S89oss" } src_compile() { OSS_CARDS="osscore,oss_solo,oss_userdev,oss_audioloop,oss_usb" if use oss_ali5455; then OSS_CARDS="${OSS_CARDS},oss_ali5455"; fi if use oss_audigyls; then OSS_CARDS="${OSS_CARDS},oss_audigyls"; fi if use oss_audiopci; then OSS_CARDS="${OSS_CARDS},oss_audiopci"; fi if use oss_digi96; then OSS_CARDS="${OSS_CARDS},oss_digi96"; fi if use oss_envy24ht; then OSS_CARDS="${OSS_CARDS},oss_envy24ht"; fi if use oss_hdaudio; then OSS_CARDS="${OSS_CARDS},oss_hdaudio"; fi if use oss_sblive; then OSS_CARDS="${OSS_CARDS},oss_sblive"; fi if use oss_ymf7xx; then OSS_CARDS="${OSS_CARDS},oss_ymf7xx"; fi if use oss_allegro; then OSS_CARDS="${OSS_CARDS},oss_allegro"; fi if use oss_audiocs; then OSS_CARDS="${OSS_CARDS},oss_audiocs"; fi if use oss_cmi878x; then OSS_CARDS="${OSS_CARDS},oss_cmi878x"; fi if use oss_cs4281; then OSS_CARDS="${OSS_CARDS},oss_cs4281"; fi if use oss_emu10k1x; then OSS_CARDS="${OSS_CARDS},oss_emu10k1x"; fi if use oss_fmedia; then OSS_CARDS="${OSS_CARDS},oss_fmedia"; fi if use oss_ich; then OSS_CARDS="${OSS_CARDS},oss_ich"; fi if use oss_sbpci; then OSS_CARDS="${OSS_CARDS},oss_sbpci"; fi if use oss_trident; then OSS_CARDS="${OSS_CARDS},oss_trident"; fi if use oss_via823x; then OSS_CARDS="${OSS_CARDS},oss_via823x"; fi if use oss_atiaudio; then OSS_CARDS="${OSS_CARDS},oss_atiaudio"; fi if use oss_cmpci; then OSS_CARDS="${OSS_CARDS},oss_cmpci"; fi if use oss_cs461x; then OSS_CARDS="${OSS_CARDS},oss_cs461x"; fi if use oss_envy24; then OSS_CARDS="${OSS_CARDS},oss_envy24"; fi if use oss_geode; then OSS_CARDS="${OSS_CARDS},oss_geode"; fi if use oss_sadasupport; then OSS_CARDS="${OSS_CARDS},oss_sadasupport"; fi if use oss_sbxfi; then OSS_CARDS="${OSS_CARDS},oss_sbxfi"; fi if use oss_via97; then OSS_CARDS="${OSS_CARDS},oss_via97"; fi myconf="--enable-libsalsa=NO --only-drv=${OSS_CARDS}" if use midi; then myconf="${myconf} --config-midi=YES" fi # Configure has to be run from build dir with full path. cd "${WORKDIR}/build" "${S}"/configure \ ${myconf} || die "configure failed" emake build || die "emake build failed" } src_install() { newinitd "${FILESDIR}/oss" oss cd "${WORKDIR}/build" cp -R prototype/* "${D}" } pkg_postinst() { elog "PLEASE NOTE:" elog "" elog "In order to use OSSv4.1 you must run" elog "# /etc/init.d/oss start " elog "" elog "If you are upgrading from a previous build of OSSv4.1 you must run" elog "# /etc/init.d/oss restart " elog "" elog "Enjoy OSSv4.1 !" }