summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2014-06-23 21:34:42 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2014-06-23 21:34:42 +0000
commitc4da65bed80708220a466039c43392f4c35ef18a (patch)
treeec1022444a050ad4a9aaeee3243bb9000bf638f9 /media-sound
parentVersion bump wrt #513670 by "PG". Use PYTHON_REQUIRED_USE wrt #509308 by Maci... (diff)
downloadgentoo-2-c4da65bed80708220a466039c43392f4c35ef18a.tar.gz
gentoo-2-c4da65bed80708220a466039c43392f4c35ef18a.tar.bz2
gentoo-2-c4da65bed80708220a466039c43392f4c35ef18a.zip
Version bump wrt #513670 by "PG". Don't save pulseaudio state files to filesystem root directory / wrt #438844 by Alexander Tsoy.
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
Diffstat (limited to 'media-sound')
-rw-r--r--media-sound/alsa-utils/ChangeLog9
-rw-r--r--media-sound/alsa-utils/alsa-utils-1.0.28.ebuild75
-rw-r--r--media-sound/alsa-utils/files/alsasound.initd-r688
3 files changed, 171 insertions, 1 deletions
diff --git a/media-sound/alsa-utils/ChangeLog b/media-sound/alsa-utils/ChangeLog
index c4a4aed810c8..43c6bc2ab837 100644
--- a/media-sound/alsa-utils/ChangeLog
+++ b/media-sound/alsa-utils/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-sound/alsa-utils
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/ChangeLog,v 1.371 2014/04/05 19:21:11 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/ChangeLog,v 1.372 2014/06/23 21:34:42 ssuominen Exp $
+
+*alsa-utils-1.0.28 (23 Jun 2014)
+
+ 23 Jun 2014; Samuli Suominen <ssuominen@gentoo.org> +alsa-utils-1.0.28.ebuild,
+ +files/alsasound.initd-r6:
+ Version bump wrt #513670 by "PG". Don't save pulseaudio state files to
+ filesystem root directory / wrt #438844 by Alexander Tsoy.
05 Apr 2014; Samuli Suominen <ssuominen@gentoo.org> metadata.xml:
Remove unused USE="minimal" description from metadata.xml
diff --git a/media-sound/alsa-utils/alsa-utils-1.0.28.ebuild b/media-sound/alsa-utils/alsa-utils-1.0.28.ebuild
new file mode 100644
index 000000000000..dc7866570146
--- /dev/null
+++ b/media-sound/alsa-utils/alsa-utils-1.0.28.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/alsa-utils-1.0.28.ebuild,v 1.1 2014/06/23 21:34:42 ssuominen Exp $
+
+EAPI=5
+inherit eutils systemd udev
+
+DESCRIPTION="Advanced Linux Sound Architecture Utils (alsactl, alsamixer, etc.)"
+HOMEPAGE="http://www.alsa-project.org/"
+SRC_URI="mirror://alsaproject/utils/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0.9"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="doc +libsamplerate +ncurses nls selinux"
+
+RDEPEND=">=media-libs/alsa-lib-${PV}
+ libsamplerate? ( media-libs/libsamplerate )
+ ncurses? ( >=sys-libs/ncurses-5.7-r7 )
+ selinux? ( sec-policy/selinux-alsa )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-text/xmlto )"
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ local myconf
+ use doc || myconf='--disable-xmlto'
+
+ # --disable-alsaconf because it doesn't work with sys-apps/kmod wrt #456214
+ econf \
+ --disable-maintainer-mode \
+ $(use_enable libsamplerate alsaloop) \
+ $(use_enable nls) \
+ $(use_enable ncurses alsamixer) \
+ --disable-alsaconf \
+ "$(systemd_with_unitdir)" \
+ --with-udev-rules-dir="$(get_udevdir)"/rules.d \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc ChangeLog README TODO seq/*/README.*
+
+ newinitd "${FILESDIR}"/alsasound.initd-r6 alsasound
+ newconfd "${FILESDIR}"/alsasound.confd-r4 alsasound
+
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}"/alsa-modules.conf-rc alsa.conf
+
+ keepdir /var/lib/alsa
+
+ # ALSA lib parser.c:1266:(uc_mgr_scan_master_configs) error: could not
+ # scan directory /usr/share/alsa/ucm: No such file or directory
+ # alsaucm: unable to obtain card list: No such file or directory
+ keepdir /usr/share/alsa/ucm
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog
+ elog "To take advantage of the init script, and automate the process of"
+ elog "saving and restoring sound-card mixer levels you should"
+ elog "add alsasound to the boot runlevel. You can do this as"
+ elog "root like so:"
+ elog "# rc-update add alsasound boot"
+ ewarn
+ ewarn "The ALSA core should be built into the kernel or loaded through other"
+ ewarn "means. There is no longer any modular auto(un)loading in alsa-utils."
+ fi
+}
diff --git a/media-sound/alsa-utils/files/alsasound.initd-r6 b/media-sound/alsa-utils/files/alsasound.initd-r6
new file mode 100644
index 000000000000..2eddfd308db4
--- /dev/null
+++ b/media-sound/alsa-utils/files/alsasound.initd-r6
@@ -0,0 +1,88 @@
+#!/sbin/runscript
+# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsasound.initd-r6,v 1.1 2014/06/23 21:34:42 ssuominen Exp $
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+alsastatedir=/var/lib/alsa
+alsascrdir=/etc/alsa.d
+alsahomedir=/var/run/alsasound
+
+extra_commands="save restore"
+
+depend() {
+ need localmount
+ after bootmisc modules isapnp coldplug hotplug
+}
+
+restore() {
+ ebegin "Restoring Mixer Levels"
+
+ checkpath -q -d -m 0700 -o root:root ${alsahomedir} || return 1
+
+ if [ ! -r "${alsastatedir}/asound.state" ] ; then
+ ewarn "No mixer config in ${alsastatedir}/asound.state, you have to unmute your card!"
+ eend 0
+ return 0
+ fi
+
+ local cards="$(sed -n -e 's/ *\([[:digit:]]*\) .*/\1/p' /proc/asound/cards)"
+ local CARDNUM
+ for cardnum in ${cards}; do
+ [ -e /dev/snd/controlC${cardnum} ] || sleep 2
+ [ -e /dev/snd/controlC${cardnum} ] || sleep 2
+ [ -e /dev/snd/controlC${cardnum} ] || sleep 2
+ [ -e /dev/snd/controlC${cardnum} ] || sleep 2
+ alsactl -E HOME="${alsahomedir}" -I -f "${alsastatedir}/asound.state" restore ${cardnum} \
+ || ewarn "Errors while restoring defaults, ignoring"
+ done
+
+ for ossfile in "${alsastatedir}"/oss/card*_pcm* ; do
+ [ -e "${ossfile}" ] || continue
+ # We use cat because I'm not sure if cp works properly on /proc
+ local procfile=${ossfile##${alsastatedir}/oss}
+ procfile="$(echo "${procfile}" | sed -e 's,_,/,g')"
+ if [ -e /proc/asound/"${procfile}"/oss ] ; then
+ cat "${ossfile}" > /proc/asound/"${procfile}"/oss
+ fi
+ done
+
+ eend 0
+}
+
+save() {
+ ebegin "Storing ALSA Mixer Levels"
+
+ checkpath -q -d -m 0700 -o root:root ${alsahomedir} || return 1
+
+ mkdir -p "${alsastatedir}"
+ if ! alsactl -E HOME="${alsahomedir}" -f "${alsastatedir}/asound.state" store; then
+ eerror "Error saving levels."
+ eend 1
+ return 1
+ fi
+
+ for ossfile in /proc/asound/card*/pcm*/oss; do
+ [ -e "${ossfile}" ] || continue
+ local device=${ossfile##/proc/asound/} ; device=${device%%/oss}
+ device="$(echo "${device}" | sed -e 's,/,_,g')"
+ mkdir -p "${alsastatedir}/oss/"
+ cp "${ossfile}" "${alsastatedir}/oss/${device}"
+ done
+
+ eend 0
+}
+
+start() {
+ if [ "${RESTORE_ON_START}" = "yes" ]; then
+ restore
+ fi
+
+ return 0
+}
+
+stop() {
+ if [ "${SAVE_ON_STOP}" = "yes" ]; then
+ save
+ fi
+ return 0
+}