public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-sound/alsa-utils/, media-sound/alsa-utils/files/
@ 2015-10-08 20:07 Mike Frysinger
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2015-10-08 20:07 UTC (permalink / raw
  To: gentoo-commits

commit:     9de99806960e82425fb2fde97216531a8bcdd6d5
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Thu Oct  8 20:07:17 2015 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Thu Oct  8 20:07:35 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9de99806

media-sound/alsa-utils: add upstream fix for cross-compiling

The configure script would blindly ignore $CC when cross-compiling.
Add the upstream commit that deletes that insanity.

 media-sound/alsa-utils/alsa-utils-1.0.29.ebuild    |  1 +
 .../files/alsa-utils-1.0.29-cross-compile.patch    | 44 ++++++++++++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/media-sound/alsa-utils/alsa-utils-1.0.29.ebuild b/media-sound/alsa-utils/alsa-utils-1.0.29.ebuild
index 284390b..120d48d 100644
--- a/media-sound/alsa-utils/alsa-utils-1.0.29.ebuild
+++ b/media-sound/alsa-utils/alsa-utils-1.0.29.ebuild
@@ -24,6 +24,7 @@ RDEPEND="${CDEPEND}
 	selinux? ( sec-policy/selinux-alsa )"
 
 src_prepare() {
+	epatch "${FILESDIR}"/${P}-cross-compile.patch
 	epatch_user
 }
 

diff --git a/media-sound/alsa-utils/files/alsa-utils-1.0.29-cross-compile.patch b/media-sound/alsa-utils/files/alsa-utils-1.0.29-cross-compile.patch
new file mode 100644
index 0000000..45aa8a9
--- /dev/null
+++ b/media-sound/alsa-utils/files/alsa-utils-1.0.29-cross-compile.patch
@@ -0,0 +1,44 @@
+fix from upstream
+
+From c0130c8ec22a89960d9304297a904a2a14979506 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Thu, 8 Oct 2015 12:14:05 -0400
+Subject: [PATCH alsa-utils] build: Do not try to detect cross-compiler
+
+cross compilers are passed via path may not be a gcc based cross
+compiler in such cases this check fails and try's to force gcc based
+cross compiler detection, This code is a convenience that limits the
+build system.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+---
+ configure.ac | 14 --------------
+ 1 file changed, 14 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8c2d1a5..79a9aaf 100644
+--- a/configure
++++ b/configure
+@@ -6192,21 +6192,6 @@ $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
+ 
+ 
+ 
+-if test "x$target" != "x$host" -a -z "`echo $CC | grep -e '-gcc'`";
+-then
+-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cross-compiler" >&5
+-$as_echo_n "checking for cross-compiler... " >&6; }
+-
+-  which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc
+-  which ${target_cpu}-${target_os}-gcc >/dev/null 2>&1 \
+-  && CC=${target_cpu}-${target-os}-gcc
+-  which ${target_cpu}-${target_vendor}-${target_os}-gcc >/dev/null 2>&1 \
+-  && CC=${target_cpu}-${target_vendor}-${target_os}-gcc
+-
+-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+-$as_echo "$CC" >&6; }
+-fi
+-
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-sound/alsa-utils/, media-sound/alsa-utils/files/
@ 2016-03-31 20:30 Lars Wendler
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2016-03-31 20:30 UTC (permalink / raw
  To: gentoo-commits

commit:     62072e53fd64e7d78092c89ada1d8ee0581c7229
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 31 19:52:39 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Mar 31 20:29:56 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62072e53

media-sound/alsa-utils: Bump to version 1.1.1

Package-Manager: portage-2.2.28
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 media-sound/alsa-utils/Manifest                 |  1 +
 media-sound/alsa-utils/alsa-utils-1.1.1.ebuild  | 74 +++++++++++++++++++++++++
 media-sound/alsa-utils/files/alsasound.initd-r6 |  4 +-
 3 files changed, 77 insertions(+), 2 deletions(-)

diff --git a/media-sound/alsa-utils/Manifest b/media-sound/alsa-utils/Manifest
index af489eb..2a85b3a 100644
--- a/media-sound/alsa-utils/Manifest
+++ b/media-sound/alsa-utils/Manifest
@@ -2,3 +2,4 @@ DIST alsa-utils-1.0.27.2.tar.bz2 1143802 SHA256 02bfac39092f3b68d743c23ad3d688d6
 DIST alsa-utils-1.0.28.tar.bz2 1146887 SHA256 f3ff4c89b0125a7797b1b13cd094cc92276e655458274967386e812d03642acc SHA512 faa5abf3f066106c80d019944efa2298e2d3157469c1c7bc52deb9aa1bcd5f5439a2e22b04ad9210e292fcef97bdacc27aa75fc275d0d7cae2c2f88729c84786 WHIRLPOOL d58587d9f302f3f1a7ab4de45c3889ce82e5be782e4aa9a953c39a908a4693e99c8ea9aeeb5669f0f606d980983beb7d5fc53e4c76ce1bb76500c7c2bcb45013
 DIST alsa-utils-1.0.29.tar.bz2 1154497 SHA256 5160058f3e14483ced5de919dd473f93932059454530a9b7ef97dcabd6833e9b SHA512 0d83805aa7b1c975524cc5ecd4aa6eb36126bc434458f9e9475e4bd1b14bbb4bf9691096ca7973342a3798e97a361451c078f4595f8f4275db64d6b443ca5928 WHIRLPOOL ccad5115148045e0c5f139d70306e801e250aa3946f60d9cd0a47c84c72f6d8689e53105030589309c98ddd4a7b871bb8dc03f00fcc3d46cc3e08c4718299407
 DIST alsa-utils-1.1.0.tar.bz2 1181085 SHA256 3b1c3135b76e14532d3dd23fb15759ddd7daf9ffbc183f7a9a0a3a86374748f1 SHA512 c61f056959feba015bb4a6f49980c4beb6a0c34be09e7196864583897ea86373b593a8807999a07df9c87a3a0c714075b9aae516752e83a946d0d60bc8f90f98 WHIRLPOOL 50d8e1506fb9f969b3dfcd618933efbeda6f938c3350eccf99526fb8329afd1ea4381ff1a548590f0f9bae12bdb63c1e8ab068641743d52b3ba609eae2d337e5
+DIST alsa-utils-1.1.1.tar.bz2 1186408 SHA256 89757c9abaf420831b088fce354d492acc170bd02bb50eb7392c175f594b8041 SHA512 3af1e43cb2eab7e5119d83036ab6f4eeb106b66b4a57122cc8df243b6dbda90d39a0290a2af3a904b4929e2d90e8fcded9eda2a38bae1fd8e371a6d7a043376e WHIRLPOOL ea7daaf4055469dd5cb128abbe9a986e2b99b27c59d964041a92e82667e520adadb1e87d38bfa83d5b8ffbc382d7d9401c9d4887ca19546e4d1f34ba1cf7d705

diff --git a/media-sound/alsa-utils/alsa-utils-1.1.1.ebuild b/media-sound/alsa-utils/alsa-utils-1.1.1.ebuild
new file mode 100644
index 0000000..9bd9df9
--- /dev/null
+++ b/media-sound/alsa-utils/alsa-utils-1.1.1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+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 ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="bat doc +libsamplerate +ncurses nls selinux"
+
+CDEPEND=">=media-libs/alsa-lib-${PV}
+	libsamplerate? ( media-libs/libsamplerate )
+	ncurses? ( >=sys-libs/ncurses-5.7-r7:0= )
+	bat? ( sci-libs/fftw:= )"
+DEPEND="${CDEPEND}
+	virtual/pkgconfig
+	doc? ( app-text/xmlto )"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-alsa )"
+
+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 bat) \
+		$(use_enable libsamplerate alsaloop) \
+		$(use_enable nls) \
+		$(use_enable ncurses alsamixer) \
+		--disable-alsaconf \
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
+		--with-udev-rules-dir="$(get_udevdir)"/rules.d \
+		${myconf}
+}
+
+src_install() {
+	default
+	dodoc 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
index 6a3196f..3f56b95 100644
--- a/media-sound/alsa-utils/files/alsasound.initd-r6
+++ b/media-sound/alsa-utils/files/alsasound.initd-r6
@@ -1,6 +1,6 @@
-#!/sbin/runscript
+#!/sbin/openrc-run
 # $Id$
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 alsastatedir=/var/lib/alsa


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-sound/alsa-utils/, media-sound/alsa-utils/files/
@ 2017-07-11  9:10 Lars Wendler
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2017-07-11  9:10 UTC (permalink / raw
  To: gentoo-commits

commit:     f79bf1ba54fd2cb5cb9b8fcbdc9e99fea1b9acc7
Author:     Virgil Dupras <hsoft <AT> hardcoded <DOT> net>
AuthorDate: Mon May  8 16:16:58 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Jul 11 09:10:20 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f79bf1ba

media-sound/alsa-utils: Fix initd delay script when there's no soundcard

Fixes #617782

Package-Manager: Portage-2.3.5, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/4570

 ...ils-1.1.4.ebuild => alsa-utils-1.1.4-r1.ebuild} |  2 +-
 media-sound/alsa-utils/files/alsasound.initd-r7    | 87 ++++++++++++++++++++++
 2 files changed, 88 insertions(+), 1 deletion(-)

diff --git a/media-sound/alsa-utils/alsa-utils-1.1.4.ebuild b/media-sound/alsa-utils/alsa-utils-1.1.4-r1.ebuild
similarity index 97%
rename from media-sound/alsa-utils/alsa-utils-1.1.4.ebuild
rename to media-sound/alsa-utils/alsa-utils-1.1.4-r1.ebuild
index 9c10bb2c4ec..87137657c10 100644
--- a/media-sound/alsa-utils/alsa-utils-1.1.4.ebuild
+++ b/media-sound/alsa-utils/alsa-utils-1.1.4-r1.ebuild
@@ -45,7 +45,7 @@ src_install() {
 	default
 	dodoc seq/*/README.*
 
-	newinitd "${FILESDIR}"/alsasound.initd-r6 alsasound
+	newinitd "${FILESDIR}"/alsasound.initd-r7 alsasound
 	newconfd "${FILESDIR}"/alsasound.confd-r4 alsasound
 
 	insinto /etc/modprobe.d

diff --git a/media-sound/alsa-utils/files/alsasound.initd-r7 b/media-sound/alsa-utils/files/alsasound.initd-r7
new file mode 100644
index 00000000000..da2d5b349b8
--- /dev/null
+++ b/media-sound/alsa-utils/files/alsasound.initd-r7
@@ -0,0 +1,87 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 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
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-sound/alsa-utils/, media-sound/alsa-utils/files/
@ 2019-01-08 23:43 Lars Wendler
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2019-01-08 23:43 UTC (permalink / raw
  To: gentoo-commits

commit:     5189ea86f1965e9b416f18d019c8e4bac4f72cde
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  8 23:27:49 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Jan  8 23:43:09 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5189ea86

media-sound/alsa-utils: Bump to version 1.1.8

Package-Manager: Portage-2.3.54, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 media-sound/alsa-utils/Manifest                    |  1 +
 media-sound/alsa-utils/alsa-utils-1.1.8.ebuild     | 77 ++++++++++++++++++++++
 .../files/alsa-utils-1.1.8-missing_header.patch    | 50 ++++++++++++++
 3 files changed, 128 insertions(+)

diff --git a/media-sound/alsa-utils/Manifest b/media-sound/alsa-utils/Manifest
index 4024be43235..6734ac3cbbf 100644
--- a/media-sound/alsa-utils/Manifest
+++ b/media-sound/alsa-utils/Manifest
@@ -1,3 +1,4 @@
 DIST alsa-utils-1.1.2.tar.bz2 1193140 BLAKE2B 8c9d3baae1530a399299379963e68c50d2d4fca63045b7c59b14240d5ad6316c37f1c7d6f4a7fa2cfeb8e5ae561440b9ad689475e006ab1fcaea2065b7c33015 SHA512 38dc3331e8410123085738e74ca34c860666027ee2f6aaa21f48e726c84d8e6264043c8c7111ce2b1e158a0f38142a04d72a128ee54e00173dc4e4ba514d2f14
 DIST alsa-utils-1.1.6.tar.bz2 1203722 BLAKE2B e098ecbc5835c8ecd311a4df1ab51a709200b0d3666437f7f059d3842f07e1200a934b951e8e2c8ecedbe0aef4e2c766d875df577662eb21ce989807941ab6b7 SHA512 24d0ffaeeccecb3276d7d35ef51e6de6026a63fa5a1a1e4605b024f54d8097717e97ec9d33cfe50830ad17e4a89268ca24b065039b0df7f9fbe02b570617aa58
 DIST alsa-utils-1.1.7.tar.bz2 1205754 BLAKE2B 419fa61fe85750ed26ab2b1dfe87adc7898f8c95dfe082993c0d5ee7755c4cb6563000555f44267608a2138d033e7011e7c67d98b714fdf1884cc03a8fd50ed3 SHA512 5da9b03e219d67634307bd5bb06b76734db5286221bec11658ce9c4dfca8ed639a4155ed90450f1d6c8db322960bb023ced0873e276500ce24f14fab17ceeb65
+DIST alsa-utils-1.1.8.tar.bz2 1262174 BLAKE2B 643017f8f31d88356a2a55b5b1249d5b705daa7bd38e6d5e8835a21a9aefeca2fb1a7444c5709516ace0eecdfd5b410b5b24008abebb7ca917763108637bbcca SHA512 f877b491840126420dd9847347d0af865b6d03eccac2e2c3853cdbc76e91899f5a5139753cc41a4db942e7999c8d53cf9bd57d2fd5e1d32c872871b2d25146d9

diff --git a/media-sound/alsa-utils/alsa-utils-1.1.8.ebuild b/media-sound/alsa-utils/alsa-utils-1.1.8.ebuild
new file mode 100644
index 00000000000..bcc1f868e6d
--- /dev/null
+++ b/media-sound/alsa-utils/alsa-utils-1.1.8.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit systemd udev
+
+DESCRIPTION="Advanced Linux Sound Architecture Utils (alsactl, alsamixer, etc.)"
+HOMEPAGE="https://alsa-project.org/"
+SRC_URI="mirror://alsaproject/utils/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0.9"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="bat doc +libsamplerate +ncurses nls selinux"
+
+CDEPEND=">=media-libs/alsa-lib-${PV}
+	libsamplerate? ( media-libs/libsamplerate )
+	ncurses? ( >=sys-libs/ncurses-5.7-r7:0= )
+	bat? ( sci-libs/fftw:= )"
+DEPEND="${CDEPEND}
+	doc? ( app-text/xmlto )"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-alsa )"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.1.8-missing_header.patch
+)
+
+src_configure() {
+	local myeconfargs=(
+		# --disable-alsaconf because it doesn't work with sys-apps/kmod wrt #456214
+		--disable-alsaconf
+		--disable-maintainer-mode
+		--with-asound-state-dir="${EPREFIX}"/var/lib/alsa
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+		--with-udev-rules-dir="${EPREFIX}/$(get_udevdir)"/rules.d
+		$(use_enable bat)
+		$(use_enable libsamplerate alsaloop)
+		$(use_enable ncurses alsamixer)
+		$(use_enable nls)
+		$(usex doc '' --disable-xmlto)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+src_install() {
+	default
+	dodoc seq/*/README.*
+
+	newinitd "${FILESDIR}"/alsasound.initd-r7 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/alsa-utils-1.1.8-missing_header.patch b/media-sound/alsa-utils/files/alsa-utils-1.1.8-missing_header.patch
new file mode 100644
index 00000000000..560d538a1cb
--- /dev/null
+++ b/media-sound/alsa-utils/files/alsa-utils-1.1.8-missing_header.patch
@@ -0,0 +1,50 @@
+--- alsa-utils-1.1.8/axfer/test/generator.h
++++ alsa-utils-1.1.8/axfer/test/generator.h
+@@ -0,0 +1,47 @@
++// SPDX-License-Identifier: GPL-2.0
++//
++// generator.c - a generator for test with buffers of PCM frames.
++//
++// Copyright (c) 2018 Takashi Sakamoto <o-takashi@sakamocchi.jp>
++//
++// Licensed under the terms of the GNU General Public License, version 2.
++
++#ifndef __ALSA_UTILS_AXFER_TEST_GENERATOR__H_
++#define __ALSA_UTILS_AXFER_TEST_GENERATOR__H_
++
++#include <stdint.h>
++#include <alsa/asoundlib.h>
++
++struct test_generator;
++typedef int (*generator_cb_t)(struct test_generator *gen,
++			      snd_pcm_access_t access,
++			      snd_pcm_format_t sample_format,
++			      unsigned int samples_per_frame,
++			      void *frame_buffer, unsigned int frame_count);
++
++struct test_generator {
++	int fd;
++	uint64_t access_mask;
++	uint64_t sample_format_mask;
++	unsigned int min_samples_per_frame;
++	unsigned int max_samples_per_frame;
++	unsigned int min_frame_count;
++	unsigned int max_frame_count;
++	unsigned int step_frame_count;
++
++	generator_cb_t cb;
++	void *private_data;
++};
++
++int generator_context_init(struct test_generator *gen,
++			   uint64_t access_mask, uint64_t sample_format_mask,
++			   unsigned int min_samples_per_frame,
++			   unsigned int max_samples_per_frame,
++			   unsigned int min_frame_count,
++			   unsigned int max_frame_count,
++			   unsigned int step_frame_count,
++			   unsigned int private_size);
++int generator_context_run(struct test_generator *gen, generator_cb_t cb);
++void generator_context_destroy(struct test_generator *gen);
++
++#endif


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-sound/alsa-utils/, media-sound/alsa-utils/files/
@ 2020-02-20 15:49 Lars Wendler
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2020-02-20 15:49 UTC (permalink / raw
  To: gentoo-commits

commit:     b874f477016d1d4e4eecd72e3ac2c7b73050c1a9
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 20 15:47:32 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Feb 20 15:49:33 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b874f477

media-sound/alsa-utils: Removed old

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 media-sound/alsa-utils/Manifest                    |   3 -
 media-sound/alsa-utils/alsa-utils-1.1.2.ebuild     |  73 ------
 media-sound/alsa-utils/alsa-utils-1.1.6.ebuild     |  73 ------
 media-sound/alsa-utils/alsa-utils-1.1.9.ebuild     |  78 -------
 ...fix-invalid-comparison-of-64-bit-storage-.patch | 249 ---------------------
 media-sound/alsa-utils/files/alsasound.initd-r6    |  87 -------
 6 files changed, 563 deletions(-)

diff --git a/media-sound/alsa-utils/Manifest b/media-sound/alsa-utils/Manifest
index e317f7bc46e..532eb02ac71 100644
--- a/media-sound/alsa-utils/Manifest
+++ b/media-sound/alsa-utils/Manifest
@@ -1,6 +1,3 @@
-DIST alsa-utils-1.1.2.tar.bz2 1193140 BLAKE2B 8c9d3baae1530a399299379963e68c50d2d4fca63045b7c59b14240d5ad6316c37f1c7d6f4a7fa2cfeb8e5ae561440b9ad689475e006ab1fcaea2065b7c33015 SHA512 38dc3331e8410123085738e74ca34c860666027ee2f6aaa21f48e726c84d8e6264043c8c7111ce2b1e158a0f38142a04d72a128ee54e00173dc4e4ba514d2f14
-DIST alsa-utils-1.1.6.tar.bz2 1203722 BLAKE2B e098ecbc5835c8ecd311a4df1ab51a709200b0d3666437f7f059d3842f07e1200a934b951e8e2c8ecedbe0aef4e2c766d875df577662eb21ce989807941ab6b7 SHA512 24d0ffaeeccecb3276d7d35ef51e6de6026a63fa5a1a1e4605b024f54d8097717e97ec9d33cfe50830ad17e4a89268ca24b065039b0df7f9fbe02b570617aa58
 DIST alsa-utils-1.1.8.tar.bz2 1262174 BLAKE2B 643017f8f31d88356a2a55b5b1249d5b705daa7bd38e6d5e8835a21a9aefeca2fb1a7444c5709516ace0eecdfd5b410b5b24008abebb7ca917763108637bbcca SHA512 f877b491840126420dd9847347d0af865b6d03eccac2e2c3853cdbc76e91899f5a5139753cc41a4db942e7999c8d53cf9bd57d2fd5e1d32c872871b2d25146d9
-DIST alsa-utils-1.1.9.tar.bz2 1268833 BLAKE2B 56fe00bd7dce21969f9f91d1d82a6644da338208bfa646fc2a46d38f2d1d937b55b90acc5f75bb630aa288dee458c9f555a5727990c5cd7a59b627cb1ecf1e2c SHA512 92fa689ea5897150972d5376e7999ff060cad09cb0b06991d81c87b61a243ecec944e2a4c7ad38878596cd8b4246e44c5a3a35e5bc6452c02ebf35c9bed91970
 DIST alsa-utils-1.2.1.tar.bz2 1270194 BLAKE2B e5cb4d6c94f09f1eb9044a7f34904bc662ac2eb9ae734f333cf22271b4add1de1032ac38cf064807146095edc2eae452c197b98b4dd63f0004e1705f8e322e4f SHA512 b7729659cd9809197dc30042f522f5103ff41ddc047f13f9c733c93f7e91a26f90cd864c70e654d12ef7a552b1d9ebe2727a24ec9fad03560cb7cdea906662ec
 DIST alsa-utils-1.2.2.tar.bz2 1274821 BLAKE2B 79b6cd719dbf36ca65b186c6682c9617fb89cb76aa530e4f40850004170703990054b5e96f700c652b11781e0086490824ce2433e33b17c03655fea089f59ceb SHA512 30598c658f3f2ad71a5ce7911b09ae13add54b293bcf3bebb053371d84a91528bd64fd376f167456b2e27e2546a2279019678e099247513e5142b283af756fd9

diff --git a/media-sound/alsa-utils/alsa-utils-1.1.2.ebuild b/media-sound/alsa-utils/alsa-utils-1.1.2.ebuild
deleted file mode 100644
index ced234f3433..00000000000
--- a/media-sound/alsa-utils/alsa-utils-1.1.2.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit eutils systemd udev
-
-DESCRIPTION="Advanced Linux Sound Architecture Utils (alsactl, alsamixer, etc.)"
-HOMEPAGE="https://alsa-project.org/"
-SRC_URI="https://www.alsa-project.org/files/pub/utils/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0.9"
-KEYWORDS="~alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86"
-IUSE="bat doc +libsamplerate +ncurses nls selinux"
-
-CDEPEND=">=media-libs/alsa-lib-${PV}
-	libsamplerate? ( media-libs/libsamplerate )
-	ncurses? ( >=sys-libs/ncurses-5.7-r7:0= )
-	bat? ( sci-libs/fftw:= )"
-DEPEND="${CDEPEND}
-	virtual/pkgconfig
-	doc? ( app-text/xmlto )"
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-alsa )"
-
-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 bat) \
-		$(use_enable libsamplerate alsaloop) \
-		$(use_enable nls) \
-		$(use_enable ncurses alsamixer) \
-		--disable-alsaconf \
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \
-		--with-udev-rules-dir="$(get_udevdir)"/rules.d \
-		${myconf}
-}
-
-src_install() {
-	default
-	dodoc 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/alsa-utils-1.1.6.ebuild b/media-sound/alsa-utils/alsa-utils-1.1.6.ebuild
deleted file mode 100644
index 757dbfdfeb7..00000000000
--- a/media-sound/alsa-utils/alsa-utils-1.1.6.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit systemd udev
-
-DESCRIPTION="Advanced Linux Sound Architecture Utils (alsactl, alsamixer, etc.)"
-HOMEPAGE="https://alsa-project.org/"
-SRC_URI="https://www.alsa-project.org/files/pub/utils/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0.9"
-KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~sh sparc x86"
-IUSE="bat doc +libsamplerate +ncurses nls selinux"
-
-CDEPEND=">=media-libs/alsa-lib-${PV}
-	libsamplerate? ( media-libs/libsamplerate )
-	ncurses? ( >=sys-libs/ncurses-5.7-r7:0= )
-	bat? ( sci-libs/fftw:= )"
-DEPEND="${CDEPEND}
-	virtual/pkgconfig
-	doc? ( app-text/xmlto )"
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-alsa )"
-
-src_configure() {
-	local myeconfargs=(
-		# --disable-alsaconf because it doesn't work with sys-apps/kmod wrt #456214
-		--disable-alsaconf
-		--disable-maintainer-mode
-		--with-asound-state-dir="${EPREFIX}"/var/lib/alsa
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-		--with-udev-rules-dir="${EPREFIX}/$(get_udevdir)"/rules.d
-		$(use_enable bat)
-		$(use_enable libsamplerate alsaloop)
-		$(use_enable ncurses alsamixer)
-		$(use_enable nls)
-		$(usex doc '' --disable-xmlto)
-	)
-	econf "${myeconfargs[@]}"
-}
-
-src_install() {
-	default
-	dodoc seq/*/README.*
-
-	newinitd "${FILESDIR}"/alsasound.initd-r7 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/alsa-utils-1.1.9.ebuild b/media-sound/alsa-utils/alsa-utils-1.1.9.ebuild
deleted file mode 100644
index 280d4466e12..00000000000
--- a/media-sound/alsa-utils/alsa-utils-1.1.9.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit systemd udev
-
-DESCRIPTION="Advanced Linux Sound Architecture Utils (alsactl, alsamixer, etc.)"
-HOMEPAGE="https://alsa-project.org/"
-SRC_URI="https://www.alsa-project.org/files/pub/utils/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0.9"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh sparc ~x86"
-IUSE="bat doc +libsamplerate +ncurses nls selinux"
-
-CDEPEND=">=media-libs/alsa-lib-${PV}
-	libsamplerate? ( media-libs/libsamplerate )
-	ncurses? ( >=sys-libs/ncurses-5.7-r7:0= )
-	bat? ( sci-libs/fftw:= )"
-DEPEND="${CDEPEND}
-	doc? ( app-text/xmlto )"
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-alsa )"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-1.1.8-missing_header.patch
-	"${FILESDIR}"/${P}-axfer-test-fix-invalid-comparison-of-64-bit-storage-.patch
-)
-
-src_configure() {
-	local myeconfargs=(
-		# --disable-alsaconf because it doesn't work with sys-apps/kmod wrt #456214
-		--disable-alsaconf
-		--disable-maintainer-mode
-		--with-asound-state-dir="${EPREFIX}"/var/lib/alsa
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-		--with-udev-rules-dir="${EPREFIX}/$(get_udevdir)"/rules.d
-		$(use_enable bat)
-		$(use_enable libsamplerate alsaloop)
-		$(use_enable ncurses alsamixer)
-		$(use_enable nls)
-		$(usex doc '' --disable-xmlto)
-	)
-	econf "${myeconfargs[@]}"
-}
-
-src_install() {
-	default
-	dodoc seq/*/README.*
-
-	newinitd "${FILESDIR}"/alsasound.initd-r8 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/alsa-utils-1.1.9-axfer-test-fix-invalid-comparison-of-64-bit-storage-.patch b/media-sound/alsa-utils/files/alsa-utils-1.1.9-axfer-test-fix-invalid-comparison-of-64-bit-storage-.patch
deleted file mode 100644
index 65435839973..00000000000
--- a/media-sound/alsa-utils/files/alsa-utils-1.1.9-axfer-test-fix-invalid-comparison-of-64-bit-storage-.patch
+++ /dev/null
@@ -1,249 +0,0 @@
-From fbb222c9bccb407750cea61e3bb6285cb8c1b330 Mon Sep 17 00:00:00 2001
-From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-Date: Sun, 28 Jul 2019 13:48:50 +0900
-Subject: [PATCH] axfer: test: fix invalid comparison of 64 bit storage in
- ILP32 data type
-
-In system V ABIs with ILP32 data model, bit shift for '1ul' can brings
-undefined behaviour when the calculation result is over 32 bit width.
-
-This commit fixes the bug.
-
-Reported-by: Rolf Eike Beer <eike@sf-mail.de>
-Reference: https://bugs.gentoo.org/681652
-Reference: https://github.com/alsa-project/alsa-utils/issues/23
-Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-Signed-off-by: Takashi Iwai <tiwai@suse.de>
----
- axfer/test/container-test.c | 142 ++++++++++++++++++------------------
- axfer/test/generator.c      |   4 +-
- axfer/test/mapper-test.c    |  24 +++---
- 3 files changed, 85 insertions(+), 85 deletions(-)
-
-diff --git a/axfer/test/container-test.c b/axfer/test/container-test.c
-index 0e2e6e9..9b30ae3 100644
---- a/axfer/test/container-test.c
-+++ b/axfer/test/container-test.c
-@@ -172,82 +172,82 @@ int main(int argc, const char *argv[])
- {
- 	static const uint64_t sample_format_masks[] = {
- 		[CONTAINER_FORMAT_RIFF_WAVE] =
--			(1ul << SND_PCM_FORMAT_U8) |
--			(1ul << SND_PCM_FORMAT_S16_LE) |
--			(1ul << SND_PCM_FORMAT_S16_BE) |
--			(1ul << SND_PCM_FORMAT_S24_LE) |
--			(1ul << SND_PCM_FORMAT_S24_BE) |
--			(1ul << SND_PCM_FORMAT_S32_LE) |
--			(1ul << SND_PCM_FORMAT_S32_BE) |
--			(1ul << SND_PCM_FORMAT_FLOAT_LE) |
--			(1ul << SND_PCM_FORMAT_FLOAT_BE) |
--			(1ul << SND_PCM_FORMAT_FLOAT64_LE) |
--			(1ul << SND_PCM_FORMAT_FLOAT64_BE) |
--			(1ul << SND_PCM_FORMAT_MU_LAW) |
--			(1ul << SND_PCM_FORMAT_A_LAW) |
--			(1ul << SND_PCM_FORMAT_S24_3LE) |
--			(1ul << SND_PCM_FORMAT_S24_3BE) |
--			(1ul << SND_PCM_FORMAT_S20_3LE) |
--			(1ul << SND_PCM_FORMAT_S20_3BE) |
--			(1ul << SND_PCM_FORMAT_S18_3LE) |
--			(1ul << SND_PCM_FORMAT_S18_3BE),
-+			(1ull << SND_PCM_FORMAT_U8) |
-+			(1ull << SND_PCM_FORMAT_S16_LE) |
-+			(1ull << SND_PCM_FORMAT_S16_BE) |
-+			(1ull << SND_PCM_FORMAT_S24_LE) |
-+			(1ull << SND_PCM_FORMAT_S24_BE) |
-+			(1ull << SND_PCM_FORMAT_S32_LE) |
-+			(1ull << SND_PCM_FORMAT_S32_BE) |
-+			(1ull << SND_PCM_FORMAT_FLOAT_LE) |
-+			(1ull << SND_PCM_FORMAT_FLOAT_BE) |
-+			(1ull << SND_PCM_FORMAT_FLOAT64_LE) |
-+			(1ull << SND_PCM_FORMAT_FLOAT64_BE) |
-+			(1ull << SND_PCM_FORMAT_MU_LAW) |
-+			(1ull << SND_PCM_FORMAT_A_LAW) |
-+			(1ull << SND_PCM_FORMAT_S24_3LE) |
-+			(1ull << SND_PCM_FORMAT_S24_3BE) |
-+			(1ull << SND_PCM_FORMAT_S20_3LE) |
-+			(1ull << SND_PCM_FORMAT_S20_3BE) |
-+			(1ull << SND_PCM_FORMAT_S18_3LE) |
-+			(1ull << SND_PCM_FORMAT_S18_3BE),
- 		[CONTAINER_FORMAT_AU] =
--			(1ul << SND_PCM_FORMAT_S8) |
--			(1ul << SND_PCM_FORMAT_S16_BE) |
--			(1ul << SND_PCM_FORMAT_S32_BE) |
--			(1ul << SND_PCM_FORMAT_FLOAT_BE) |
--			(1ul << SND_PCM_FORMAT_FLOAT64_BE) |
--			(1ul << SND_PCM_FORMAT_MU_LAW) |
--			(1ul << SND_PCM_FORMAT_A_LAW),
-+			(1ull << SND_PCM_FORMAT_S8) |
-+			(1ull << SND_PCM_FORMAT_S16_BE) |
-+			(1ull << SND_PCM_FORMAT_S32_BE) |
-+			(1ull << SND_PCM_FORMAT_FLOAT_BE) |
-+			(1ull << SND_PCM_FORMAT_FLOAT64_BE) |
-+			(1ull << SND_PCM_FORMAT_MU_LAW) |
-+			(1ull << SND_PCM_FORMAT_A_LAW),
- 		[CONTAINER_FORMAT_VOC] =
--			(1ul << SND_PCM_FORMAT_U8) |
--			(1ul << SND_PCM_FORMAT_S16_LE) |
--			(1ul << SND_PCM_FORMAT_MU_LAW) |
--			(1ul << SND_PCM_FORMAT_A_LAW),
-+			(1ull << SND_PCM_FORMAT_U8) |
-+			(1ull << SND_PCM_FORMAT_S16_LE) |
-+			(1ull << SND_PCM_FORMAT_MU_LAW) |
-+			(1ull << SND_PCM_FORMAT_A_LAW),
- 		[CONTAINER_FORMAT_RAW] =
--			(1ul << SND_PCM_FORMAT_S8) |
--			(1ul << SND_PCM_FORMAT_U8) |
--			(1ul << SND_PCM_FORMAT_S16_LE) |
--			(1ul << SND_PCM_FORMAT_S16_BE) |
--			(1ul << SND_PCM_FORMAT_U16_LE) |
--			(1ul << SND_PCM_FORMAT_U16_BE) |
--			(1ul << SND_PCM_FORMAT_S24_LE) |
--			(1ul << SND_PCM_FORMAT_S24_BE) |
--			(1ul << SND_PCM_FORMAT_U24_LE) |
--			(1ul << SND_PCM_FORMAT_U24_BE) |
--			(1ul << SND_PCM_FORMAT_S32_LE) |
--			(1ul << SND_PCM_FORMAT_S32_BE) |
--			(1ul << SND_PCM_FORMAT_U32_LE) |
--			(1ul << SND_PCM_FORMAT_U32_BE) |
--			(1ul << SND_PCM_FORMAT_FLOAT_LE) |
--			(1ul << SND_PCM_FORMAT_FLOAT_BE) |
--			(1ul << SND_PCM_FORMAT_FLOAT64_LE) |
--			(1ul << SND_PCM_FORMAT_FLOAT64_BE) |
--			(1ul << SND_PCM_FORMAT_IEC958_SUBFRAME_LE) |
--			(1ul << SND_PCM_FORMAT_IEC958_SUBFRAME_BE) |
--			(1ul << SND_PCM_FORMAT_MU_LAW) |
--			(1ul << SND_PCM_FORMAT_A_LAW) |
--			(1ul << SND_PCM_FORMAT_S24_3LE) |
--			(1ul << SND_PCM_FORMAT_S24_3BE) |
--			(1ul << SND_PCM_FORMAT_U24_3LE) |
--			(1ul << SND_PCM_FORMAT_U24_3BE) |
--			(1ul << SND_PCM_FORMAT_S20_3LE) |
--			(1ul << SND_PCM_FORMAT_S20_3BE) |
--			(1ul << SND_PCM_FORMAT_U20_3LE) |
--			(1ul << SND_PCM_FORMAT_U20_3BE) |
--			(1ul << SND_PCM_FORMAT_S18_3LE) |
--			(1ul << SND_PCM_FORMAT_S18_3BE) |
--			(1ul << SND_PCM_FORMAT_U18_3LE) |
--			(1ul << SND_PCM_FORMAT_U18_3BE) |
--			(1ul << SND_PCM_FORMAT_DSD_U8) |
--			(1ul << SND_PCM_FORMAT_DSD_U16_LE) |
--			(1ul << SND_PCM_FORMAT_DSD_U32_LE) |
--			(1ul << SND_PCM_FORMAT_DSD_U16_BE) |
--			(1ul << SND_PCM_FORMAT_DSD_U32_BE),
-+			(1ull << SND_PCM_FORMAT_S8) |
-+			(1ull << SND_PCM_FORMAT_U8) |
-+			(1ull << SND_PCM_FORMAT_S16_LE) |
-+			(1ull << SND_PCM_FORMAT_S16_BE) |
-+			(1ull << SND_PCM_FORMAT_U16_LE) |
-+			(1ull << SND_PCM_FORMAT_U16_BE) |
-+			(1ull << SND_PCM_FORMAT_S24_LE) |
-+			(1ull << SND_PCM_FORMAT_S24_BE) |
-+			(1ull << SND_PCM_FORMAT_U24_LE) |
-+			(1ull << SND_PCM_FORMAT_U24_BE) |
-+			(1ull << SND_PCM_FORMAT_S32_LE) |
-+			(1ull << SND_PCM_FORMAT_S32_BE) |
-+			(1ull << SND_PCM_FORMAT_U32_LE) |
-+			(1ull << SND_PCM_FORMAT_U32_BE) |
-+			(1ull << SND_PCM_FORMAT_FLOAT_LE) |
-+			(1ull << SND_PCM_FORMAT_FLOAT_BE) |
-+			(1ull << SND_PCM_FORMAT_FLOAT64_LE) |
-+			(1ull << SND_PCM_FORMAT_FLOAT64_BE) |
-+			(1ull << SND_PCM_FORMAT_IEC958_SUBFRAME_LE) |
-+			(1ull << SND_PCM_FORMAT_IEC958_SUBFRAME_BE) |
-+			(1ull << SND_PCM_FORMAT_MU_LAW) |
-+			(1ull << SND_PCM_FORMAT_A_LAW) |
-+			(1ull << SND_PCM_FORMAT_S24_3LE) |
-+			(1ull << SND_PCM_FORMAT_S24_3BE) |
-+			(1ull << SND_PCM_FORMAT_U24_3LE) |
-+			(1ull << SND_PCM_FORMAT_U24_3BE) |
-+			(1ull << SND_PCM_FORMAT_S20_3LE) |
-+			(1ull << SND_PCM_FORMAT_S20_3BE) |
-+			(1ull << SND_PCM_FORMAT_U20_3LE) |
-+			(1ull << SND_PCM_FORMAT_U20_3BE) |
-+			(1ull << SND_PCM_FORMAT_S18_3LE) |
-+			(1ull << SND_PCM_FORMAT_S18_3BE) |
-+			(1ull << SND_PCM_FORMAT_U18_3LE) |
-+			(1ull << SND_PCM_FORMAT_U18_3BE) |
-+			(1ull << SND_PCM_FORMAT_DSD_U8) |
-+			(1ull << SND_PCM_FORMAT_DSD_U16_LE) |
-+			(1ull << SND_PCM_FORMAT_DSD_U32_LE) |
-+			(1ull << SND_PCM_FORMAT_DSD_U16_BE) |
-+			(1ull << SND_PCM_FORMAT_DSD_U32_BE),
- 	};
- 	static const uint64_t access_mask =
--		(1ul << SND_PCM_ACCESS_MMAP_INTERLEAVED) |
--		(1ul << SND_PCM_ACCESS_RW_INTERLEAVED);
-+		(1ull << SND_PCM_ACCESS_MMAP_INTERLEAVED) |
-+		(1ull << SND_PCM_ACCESS_RW_INTERLEAVED);
- 	struct test_generator gen = {0};
- 	struct container_trial *trial;
- 	int i;
-diff --git a/axfer/test/generator.c b/axfer/test/generator.c
-index cdea2c9..bde8c5f 100644
---- a/axfer/test/generator.c
-+++ b/axfer/test/generator.c
-@@ -220,7 +220,7 @@ static int test_sample_format(struct test_generator *gen,
- 	int err = 0;
- 
- 	for (i = 0; i <= SND_PCM_FORMAT_LAST; ++i) {
--		if (!((1ul << i) & gen->sample_format_mask))
-+		if (!((1ull << i) & gen->sample_format_mask))
- 			continue;
- 
- 		err = test_samples_per_frame(gen, access, i);
-@@ -237,7 +237,7 @@ static int test_access(struct test_generator *gen)
- 	int err = 0;
- 
- 	for (i = 0; i <= SND_PCM_ACCESS_LAST; ++i) {
--		if (!((1ul << i) & gen->access_mask))
-+		if (!((1ull << i) & gen->access_mask))
- 			continue;
- 
- 		err = test_sample_format(gen, i);
-diff --git a/axfer/test/mapper-test.c b/axfer/test/mapper-test.c
-index 6b24d54..f0376c7 100644
---- a/axfer/test/mapper-test.c
-+++ b/axfer/test/mapper-test.c
-@@ -396,13 +396,13 @@ int main(int argc, const char *argv[])
- {
- 	// Test 8/16/18/20/24/32/64 bytes per sample.
- 	static const uint64_t sample_format_mask =
--			(1ul << SND_PCM_FORMAT_U8) |
--			(1ul << SND_PCM_FORMAT_S16_LE) |
--			(1ul << SND_PCM_FORMAT_S18_3LE) |
--			(1ul << SND_PCM_FORMAT_S20_3LE) |
--			(1ul << SND_PCM_FORMAT_S24_LE) |
--			(1ul << SND_PCM_FORMAT_S32_LE) |
--			(1ul << SND_PCM_FORMAT_FLOAT64_LE);
-+			(1ull << SND_PCM_FORMAT_U8) |
-+			(1ull << SND_PCM_FORMAT_S16_LE) |
-+			(1ull << SND_PCM_FORMAT_S18_3LE) |
-+			(1ull << SND_PCM_FORMAT_S20_3LE) |
-+			(1ull << SND_PCM_FORMAT_S24_LE) |
-+			(1ull << SND_PCM_FORMAT_S32_LE) |
-+			(1ull << SND_PCM_FORMAT_FLOAT64_LE);
- 	uint64_t access_mask;
- 	struct test_generator gen = {0};
- 	struct mapper_trial *trial;
-@@ -451,13 +451,13 @@ int main(int argc, const char *argv[])
- 			goto end;
- 		}
- 
--		access_mask = 1ul << access;
-+		access_mask = 1ull << access;
- 		verbose = true;
- 	} else {
--		access_mask = (1ul << SND_PCM_ACCESS_MMAP_INTERLEAVED) |
--			      (1ul << SND_PCM_ACCESS_MMAP_NONINTERLEAVED) |
--			      (1ul << SND_PCM_ACCESS_RW_INTERLEAVED) |
--			      (1ul << SND_PCM_ACCESS_RW_NONINTERLEAVED);
-+		access_mask = (1ull << SND_PCM_ACCESS_MMAP_INTERLEAVED) |
-+			      (1ull << SND_PCM_ACCESS_MMAP_NONINTERLEAVED) |
-+			      (1ull << SND_PCM_ACCESS_RW_INTERLEAVED) |
-+			      (1ull << SND_PCM_ACCESS_RW_NONINTERLEAVED);
- 		verbose = false;
- 	}
- 
--- 
-2.21.0
-

diff --git a/media-sound/alsa-utils/files/alsasound.initd-r6 b/media-sound/alsa-utils/files/alsasound.initd-r6
deleted file mode 100644
index f80a3518f3e..00000000000
--- a/media-sound/alsa-utils/files/alsasound.initd-r6
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 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
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-sound/alsa-utils/, media-sound/alsa-utils/files/
@ 2021-06-05 20:09 Lars Wendler
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2021-06-05 20:09 UTC (permalink / raw
  To: gentoo-commits

commit:     c458266658aadf51451562dd8fe14eeca1071cfc
Author:     Niklāvs Koļesņikovs <89q1r14hd <AT> relay <DOT> firefox <DOT> com>
AuthorDate: Thu Jun  3 20:17:57 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Jun  5 20:09:17 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4582666

media-sound/alsa-utils: adds two likely relevant upstream patches

Adds an upstream commit as a patch that according to Joakim Tjernlund
accompanies the one we need to fix alsa-lib 1.2.5 missing many HDMI
profiles.

Additionally adds another patch that fixes a possible crash.

Thanks-to: Joakim Tjernlund <joakim.tjernlund <AT> infinera.com>
Bug: https://bugs.gentoo.org/793410
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd <AT> relay.firefox.com>
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 ...ils-1.2.5.ebuild => alsa-utils-1.2.5-r1.ebuild} |  2 +
 ....5-fix-potential-null-pointer-from-strchr.patch | 49 ++++++++++++++++++++++
 ...alsa-utils-1.2.5-fix-the-nested-iteration.patch | 28 +++++++++++++
 3 files changed, 79 insertions(+)

diff --git a/media-sound/alsa-utils/alsa-utils-1.2.5.ebuild b/media-sound/alsa-utils/alsa-utils-1.2.5-r1.ebuild
similarity index 93%
rename from media-sound/alsa-utils/alsa-utils-1.2.5.ebuild
rename to media-sound/alsa-utils/alsa-utils-1.2.5-r1.ebuild
index 507876a36c1..fb1160d0c31 100644
--- a/media-sound/alsa-utils/alsa-utils-1.2.5.ebuild
+++ b/media-sound/alsa-utils/alsa-utils-1.2.5-r1.ebuild
@@ -24,6 +24,8 @@ RDEPEND="${CDEPEND}
 BDEPEND="virtual/pkgconfig"
 
 PATCHES=(
+	"${FILESDIR}"/${PN}-1.2.5-fix-the-nested-iteration.patch # bug #793410
+	"${FILESDIR}"/${PN}-1.2.5-fix-potential-null-pointer-from-strchr.patch # bug #793410
 	"${FILESDIR}"/${PN}-1.1.8-missing_header.patch
 )
 

diff --git a/media-sound/alsa-utils/files/alsa-utils-1.2.5-fix-potential-null-pointer-from-strchr.patch b/media-sound/alsa-utils/files/alsa-utils-1.2.5-fix-potential-null-pointer-from-strchr.patch
new file mode 100644
index 00000000000..f06756a8af9
--- /dev/null
+++ b/media-sound/alsa-utils/files/alsa-utils-1.2.5-fix-potential-null-pointer-from-strchr.patch
@@ -0,0 +1,49 @@
+From 3d7a6facd9e1f962eef6c4ba3aa4cdc22477a6ac Mon Sep 17 00:00:00 2001
+From: Chao Song <chao.song@linux.intel.com>
+Date: Mon, 31 May 2021 10:29:57 +0800
+Subject: [PATCH] topology: fix potential null pointer from strchr
+
+This patch adds check to the return pointer from strchr,
+because it may be null and cause segment fault, if component
+is not properly constructed.
+
+Fixes: https://github.com/alsa-project/alsa-utils/pull/91
+Signed-off-by: Chao Song <chao.song@linux.intel.com>
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+---
+ topology/pre-process-dapm.c   | 5 +++++
+ topology/pre-process-object.c | 5 +++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/topology/pre-process-dapm.c b/topology/pre-process-dapm.c
+index 450ca717..dbaf2f11 100644
+--- a/topology/pre-process-dapm.c
++++ b/topology/pre-process-dapm.c
+@@ -146,6 +146,11 @@ static int tplg_pp_get_widget_name(struct tplg_pre_processor *tplg_pp,
+
+ 	/* get class name */
+ 	args = strchr(string, '.');
++	if (!args) {
++		SNDERR("Error getting class name for %s\n", string);
++		return -EINVAL;
++	}
++
+ 	class_name = calloc(1, strlen(string) - strlen(args) + 1);
+ 	if (!class_name)
+ 		return -ENOMEM;
+diff --git a/topology/pre-process-object.c b/topology/pre-process-object.c
+index 09aa3758..ac8caeca 100644
+--- a/topology/pre-process-object.c
++++ b/topology/pre-process-object.c
+@@ -492,6 +492,11 @@ static int tplg_pp_add_object_tuple_section(struct tplg_pre_processor *tplg_pp,
+ 	}
+
+ 	type = strchr(token_ref, '.');
++	if(!type) {
++		SNDERR("Error getting type for %s\n", token_ref);
++		return -EINVAL;
++	}
++
+ 	token = calloc(1, strlen(token_ref) - strlen(type) + 1);
+ 	if (!token)
+ 		return -ENOMEM;

diff --git a/media-sound/alsa-utils/files/alsa-utils-1.2.5-fix-the-nested-iteration.patch b/media-sound/alsa-utils/files/alsa-utils-1.2.5-fix-the-nested-iteration.patch
new file mode 100644
index 00000000000..e175287a559
--- /dev/null
+++ b/media-sound/alsa-utils/files/alsa-utils-1.2.5-fix-the-nested-iteration.patch
@@ -0,0 +1,28 @@
+From 78212445de4c8e07873cbc7dff2abcacd031f151 Mon Sep 17 00:00:00 2001
+From: Jaroslav Kysela <perex@perex.cz>
+Date: Tue, 1 Jun 2021 17:47:42 +0200
+Subject: [PATCH] alsactl: fix the nested iteration
+
+There may be nested iterations for hw: card names.
+Handle this card name in snd_card_iterator_sinit().
+
+BugLink: https://github.com/alsa-project/alsa-lib/issues/142
+Fixes: eefc2c6 ("alsactl: use card iterator functions for all card loops")
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+---
+ alsactl/utils.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/alsactl/utils.c b/alsactl/utils.c
+index c79fd951..881b5053 100644
+--- a/alsactl/utils.c
++++ b/alsactl/utils.c
+@@ -247,6 +247,8 @@ int snd_card_iterator_sinit(struct snd_card_iterator *iter, const char *cardname
+ 	int cardno = -1;
+ 
+ 	if (cardname) {
++		if (strncmp(cardname, "hw:", 3) == 0)
++			cardname += 3;
+ 		cardno = snd_card_get_index(cardname);
+ 		if (cardno < 0) {
+ 			error("Cannot find soundcard '%s'...", cardname);


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-05 20:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-20 15:49 [gentoo-commits] repo/gentoo:master commit in: media-sound/alsa-utils/, media-sound/alsa-utils/files/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2021-06-05 20:09 Lars Wendler
2019-01-08 23:43 Lars Wendler
2017-07-11  9:10 Lars Wendler
2016-03-31 20:30 Lars Wendler
2015-10-08 20:07 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox