summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2003-02-11 05:37:39 +0000
committerMike Frysinger <vapier@gentoo.org>2003-02-11 05:37:39 +0000
commita4dd26784fc9b45edeb1b3f01c5bd497c4bc5a30 (patch)
treeb6ebda904ac2d84c7d216a208b59910b798247fc /media-sound/emu10k1
parentAnother minor local script fix. (diff)
downloadgentoo-2-a4dd26784fc9b45edeb1b3f01c5bd497c4bc5a30.tar.gz
gentoo-2-a4dd26784fc9b45edeb1b3f01c5bd497c4bc5a30.tar.bz2
gentoo-2-a4dd26784fc9b45edeb1b3f01c5bd497c4bc5a30.zip
add wrapper script to handle all sb cards #14777
Diffstat (limited to 'media-sound/emu10k1')
-rw-r--r--media-sound/emu10k1/ChangeLog8
-rw-r--r--media-sound/emu10k1/emu10k1-0.20a-r3.ebuild103
-rw-r--r--media-sound/emu10k1/files/digest-emu10k1-0.20a-r31
-rw-r--r--media-sound/emu10k1/files/emu10k1-script18
-rw-r--r--media-sound/emu10k1/files/emu10k1.conf-gentoo-header8
-rw-r--r--media-sound/emu10k1/files/modules-emu10k14
6 files changed, 139 insertions, 3 deletions
diff --git a/media-sound/emu10k1/ChangeLog b/media-sound/emu10k1/ChangeLog
index 25a0cf4e5c97..958a03b05d2f 100644
--- a/media-sound/emu10k1/ChangeLog
+++ b/media-sound/emu10k1/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-sound/emu10k1
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/emu10k1/ChangeLog,v 1.7 2003/02/03 07:21:12 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/emu10k1/ChangeLog,v 1.8 2003/02/11 05:37:39 vapier Exp $
+
+*emu10k1-0.20a-r3 (11 Feb 2003)
+
+ 11 Feb 2003; Mike Frysinger <vapier@gentoo.org> :
+ Added a wrapper script to handle both audigy and emu
+ based cards ... this fixes bug #14777.
*emu10k1-0.20a-r2 (03 Feb 2003)
diff --git a/media-sound/emu10k1/emu10k1-0.20a-r3.ebuild b/media-sound/emu10k1/emu10k1-0.20a-r3.ebuild
new file mode 100644
index 000000000000..964cf07b4e05
--- /dev/null
+++ b/media-sound/emu10k1/emu10k1-0.20a-r3.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/emu10k1/emu10k1-0.20a-r3.ebuild,v 1.1 2003/02/11 05:37:39 vapier Exp $
+
+MY_P="${P/-/-v}"
+DESCRIPTION="Drivers, utilities, and effects for Sound Blaster cards (SBLive!, SB512, Audigy)"
+SRC_URI="mirror://sourceforge/emu10k1/${MY_P}.tar.bz2"
+HOMEPAGE="http://www.sourceforge.net/projects/emu10k1/"
+
+DEPEND="virtual/linux-sources"
+RDEPEND="media-sound/aumix"
+
+KEYWORDS="x86 -ppc -sparc -alpha"
+SLOT="${KV}"
+LICENSE="GPL-2"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ [ -z "$KV" ] && die "Couldn't detect kernel version. Does /usr/src/linux exist?"
+ return 0
+}
+
+src_compile() {
+ echo "SEQUENCER_SUPPORT := y" > config
+ echo "MODVERSIONS := y" >> config
+ echo "DBGEMU := n" >> config
+
+ export KERNEL_SOURCE=/usr/src/linux
+ make || die "make failed"
+ make all || die "make all failed"
+ make tools || die "make tools failed"
+}
+
+src_install() {
+ insinto /etc/modules.d
+ newins ${FILESDIR}/modules-emu10k1 emu10k1
+
+ # first install the main parts
+ make DESTDIR=${D} install || die "could not install"
+ rm -f docs/*patch
+ dodoc docs/*
+
+ # now fix up the script so it'll install into /usr and not /usr/local
+ for f in ${S}/utils/{Makefile.config,scripts/{audigy,emu}-script} ; do
+ cp ${f} ${f}.old
+ sed -e 's:/usr/local:/usr:g' ${f}.old > ${f}
+ done
+ make man_prefix=${D}/usr/share/man DESTDIR=${D} install-tools || die "could not install tools"
+
+ # clean up the /usr/etc directory
+ cd ${D}/usr/etc
+ mv `find -type f -perm +1` ../bin/
+ mv * ${D}/etc/
+ cd ${D}
+ rm -rf ${D}/usr/etc
+
+ # add wrapper script to handle audigy and emu cards
+ dobin ${FILESDIR}/emu10k1-script
+ cd ${D}/etc
+ cp emu10k1.conf ${T}/
+ {
+ cat ${FILESDIR}/emu10k1.conf-gentoo-header
+ cat ${T}/emu10k1.conf
+ } > emu10k1.conf
+
+ # clean up the scripts
+ dosed 's:$BASE_PATH/etc:/etc:g' /usr/bin/emu-script
+ dosed 's:$BASE_PATH/etc:/etc:g' /usr/bin/audigy-script
+ dosed 's:.aumixrc:aumixrc:g' /usr/bin/audigy-script
+ dosed 's:/bin/aumix-minimal:/usr/bin/aumix:g' /usr/bin/audigy-script
+ dosed 's:/etc/.aumixrc:/etc/aumixrc:g' /usr/bin/audigy-script
+
+ # change default settings
+ dosed 's:AC3PASSTHROUGH=no:AC3PASSTHROUGH=yes:' /etc/emu10k1.conf
+ dosed 's:ANALOG_FRONT_BOOST=no:ANALOG_FRONT_BOOST=yes:' /etc/emu10k1.conf
+ dosed 's:SURROUND=no:SURROUND=yes:' /etc/emu10k1.conf
+}
+
+pkg_postinst() {
+ /sbin/depmod -a
+ /sbin/update-modules
+
+ einfo "In order for the module to work correctly you must"
+ einfo "Enable the following options in your kernel:"
+ echo
+ einfo "Sound/Sound card support (module or builtin)"
+ einfo "Sound/OSS sound modules (module or builtin)"
+ echo
+ einfo "In addition, ensure that the following modules are"
+ einfo "*not* built in to your kernel, or are at least"
+ einfo "built as modules are not currently loaded."
+ echo
+ einfo "Sound/Creative SBLive! (EMU10K1) (disabled or module)"
+ einfo "Sound/Creative SBLive! MIDI (disabled or module)"
+ echo
+ einfo "If you have not yet done this, rebuild and install"
+ einfo "your kernel modules and re-emerge this package."
+ echo
+ ewarn "You must edit /etc/emu10k1.conf and set the"
+ ewarn "CARD_TYPE that reflects the soundblaster card"
+ ewarn "you have in your computer."
+}
diff --git a/media-sound/emu10k1/files/digest-emu10k1-0.20a-r3 b/media-sound/emu10k1/files/digest-emu10k1-0.20a-r3
new file mode 100644
index 000000000000..c5afcbd75a1f
--- /dev/null
+++ b/media-sound/emu10k1/files/digest-emu10k1-0.20a-r3
@@ -0,0 +1 @@
+MD5 ffeab46e1b5ff9fd834dc78e240edf4b emu10k1-v0.20a.tar.bz2 286000
diff --git a/media-sound/emu10k1/files/emu10k1-script b/media-sound/emu10k1/files/emu10k1-script
new file mode 100644
index 000000000000..379159074c36
--- /dev/null
+++ b/media-sound/emu10k1/files/emu10k1-script
@@ -0,0 +1,18 @@
+#!/bin/bash
+. /sbin/functions.sh
+. /etc/emu10k1.conf
+
+case "${CARD_TYPE}" in
+ audigy)
+ audigy-script $@
+ ;;
+ emu)
+ emu-script $@
+ ;;
+ *)
+ eerror "You have not told me what kind of sound card you have."
+ eerror "Please edit /etc/emu10k1.conf and set the CARD_TYPE"
+ eerror "variable. You will find it at the top of the file."
+ exit 1
+ ;;
+esac
diff --git a/media-sound/emu10k1/files/emu10k1.conf-gentoo-header b/media-sound/emu10k1/files/emu10k1.conf-gentoo-header
new file mode 100644
index 000000000000..9c96e7eee292
--- /dev/null
+++ b/media-sound/emu10k1/files/emu10k1.conf-gentoo-header
@@ -0,0 +1,8 @@
+# Set your card type on the next line so that loading the
+# kernel module works correctly.
+#
+# Accepted values are 'emu' and 'audigy'
+# use 'audigy' if you have an audigy based sound card,
+# otherwise use 'emu'
+CARD_TYPE="set_me"
+
diff --git a/media-sound/emu10k1/files/modules-emu10k1 b/media-sound/emu10k1/files/modules-emu10k1
index 6ca828827f64..d2beec537e63 100644
--- a/media-sound/emu10k1/files/modules-emu10k1
+++ b/media-sound/emu10k1/files/modules-emu10k1
@@ -1,2 +1,2 @@
-post-install emu10k1 /usr/bin/emu-script restore
-pre-remove emu10k1 /usr/bin/emu-script save
+post-install emu10k1 /usr/bin/emu10k1-script restore
+pre-remove emu10k1 /usr/bin/emu10k1-script save