From 8694f28879ac87f4009a88944e694b367a973cbf Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Mon, 24 Mar 2014 01:04:56 -0500 Subject: [PATCH] media-plugins/alsaequal: work around false error --- media-plugins/alsaequal/Manifest | 6 ++ .../alsaequal/alsaequal-0.6-r3.ebuild | 47 ++++++++++++++ .../alsaequal/alsaequal-0.6-r3.reason | 2 + .../files/alsaequal-0.6-asneeded.patch | 16 +++++ .../files/alsaequal-0.6-eq-name.patch | 63 +++++++++++++++++++ .../files/alsaequal-0.6-false-error.patch | 13 ++++ 6 files changed, 147 insertions(+) create mode 100644 media-plugins/alsaequal/Manifest create mode 100644 media-plugins/alsaequal/alsaequal-0.6-r3.ebuild create mode 100644 media-plugins/alsaequal/alsaequal-0.6-r3.reason create mode 100644 media-plugins/alsaequal/files/alsaequal-0.6-asneeded.patch create mode 100644 media-plugins/alsaequal/files/alsaequal-0.6-eq-name.patch create mode 100644 media-plugins/alsaequal/files/alsaequal-0.6-false-error.patch diff --git a/media-plugins/alsaequal/Manifest b/media-plugins/alsaequal/Manifest new file mode 100644 index 0000000..ffe5ef2 --- /dev/null +++ b/media-plugins/alsaequal/Manifest @@ -0,0 +1,6 @@ +AUX alsaequal-0.6-asneeded.patch 481 SHA256 24718bedfa184b9a59127020f09105cc831b5f188be4b05f21b530bf13155a52 SHA512 e1aa6a169b28d5828c3a07a5d1cef75b30659e2385c2898fa80b914a9644fdc36cca8939e247e0c81c0d40f8f8dd116928f3ea49d28750a3b708af4ac04d4082 WHIRLPOOL 81202761729c3cb0aeb54951f75b39e95605af2053619a9ec663526550335bea471442b017f4317010736a60cde8a33c7cd669dd2ed60151b73cffab5f09bb27 +AUX alsaequal-0.6-eq-name.patch 2081 SHA256 c2b54a73ba9f5a7b13380e7a5e0357f29d4e3e65775ff46a82f175b5988667c8 SHA512 17d8280da936684b2e525aa0d55b6568de02d44490c974a2a31e274bdaa130589f74f41f9157df6885ccef87a9c927f3184bfd2b8ea2368b921db201de0f8413 WHIRLPOOL 12d889005f3d378dc726646927578a3118e481066939b976408c698044c7fd17cfdc74e40a4374b48a5f1983da530f44395761d2c9a23455281f2fd1670211b3 +AUX alsaequal-0.6-false-error.patch 585 SHA256 1e901c798101bca1cd072f17f158143745c5fb3cfc072e77068cd9a03927e5fb SHA512 58ab9d7e2ee8994a9b335e252a9b6a2c79d66f7560c73457d7c42cd61513a33ccacbc625cdfd234189b3eed22b268a7a41064e5a2ff41906eaa20e47b76c502a WHIRLPOOL 5081bb51f85cb619e063bd31198e28d75d641967c19ab38f7ea6874b1e0b3ea9c8449f54256e483a9568d698071b5a054eca633b353a8e4b6910ff533fdbeb21 +DIST alsaequal-0.6.tar.bz2 23562 SHA256 916e7d152added24617efc350142438a46099efe062bd8781d36dbf10b4e6ff0 SHA512 53a73469682eb7b641849151d4e91a3ac031daa5f11f7ad328bdd0bcf5251112814c75d27dceb8baf8582c749bf80f055414397259d24b749e7edbc03472bc6a WHIRLPOOL 991467670e6913829b402d6ba46b019317bcc49f98c45620ee2501c950d7b655c72a5dd65a76e68c59b4f2bbedc9c2c4a78d00a6b80bbfd34a37d8845eb43d85 +EBUILD alsaequal-0.6-r3.ebuild 1308 SHA256 60aec61dc0509f133e6e93223b2a06c1ffa97369ba7841b4d91fb6dcb1dcf086 SHA512 a33886f21c77c37086eb943ddfcd830eb3af50ceebb5874af7aae157a3ebb4984e8273f74457e4b2b9db6d9d1cf9773c86f1f44c833016bb4b786dc4571feef0 WHIRLPOOL a7ae3a2944bdfef64d02b71041676c0389fb96de5f604cd687f4f11dce9850afefd97000b9f3f08b926efea0ca916f14b5023a8ceb3cb00e3ce3f42b6ef0c709 +MISC alsaequal-0.6-r3.reason 135 SHA256 58548837f1824f7f6cce54640108c0a90f4920a07a6d13a432b59cfba1d39573 SHA512 761a073bb5ac3776707b274bfe87c2e43ecf129ee2ed503b46d0bb696de3f79e3d6858fe563dae5e487e45d924f0cd187d17b5b877e2585a4011fd8298e5ecd8 WHIRLPOOL 41f8232b9ead2283c36efa6f98080f68cbcdb67a4c22d9714aed080ac195245120824d709b0b4c2bb1378dffcd3f95ab0ad4a265bf3b77d93cf7d78d12d91d4d diff --git a/media-plugins/alsaequal/alsaequal-0.6-r3.ebuild b/media-plugins/alsaequal/alsaequal-0.6-r3.ebuild new file mode 100644 index 0000000..fdd2d6d --- /dev/null +++ b/media-plugins/alsaequal/alsaequal-0.6-r3.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-plugins/alsaequal/alsaequal-0.6-r2.ebuild,v 1.2 2014/02/15 08:53:11 pacho Exp $ + +EAPI=5 +inherit eutils multilib toolchain-funcs multilib-minimal + +DESCRIPTION="a real-time adjustable equalizer plugin for ALSA" +HOMEPAGE="http://www.thedigitalmachine.net/alsaequal.html" +SRC_URI="http://www.thedigitalmachine.net/tools/${P}.tar.bz2" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 ~x86" +IUSE="" + +RDEPEND="media-libs/alsa-lib[${MULTILIB_USEDEP}] + >=media-plugins/caps-plugins-0.9.11[${MULTILIB_USEDEP}] + abi_x86_32? ( !<=app-emulation/emul-linux-x86-soundlibs-20130224-r3 + !app-emulation/emul-linux-x86-soundlibs[-abi_x86_32(-)] )" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${PN} +DOCS=( README ) + +src_prepare() { + epatch "${FILESDIR}"/${P}-asneeded.patch + epatch "${FILESDIR}"/${P}-eq-name.patch + epatch "${FILESDIR}"/${P}-false-error.patch + multilib_copy_sources +} + +multilib_src_compile() { + emake \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS} -Wall -fPIC -DPIC" \ + LD="$(tc-getCC)" \ + LDFLAGS="${LDFLAGS} -shared" \ + Q= \ + SND_PCM_LIBS="-lasound" \ + SND_CTL_LIBS="-lasound" || die +} + +multilib_src_install() { + exeinto /usr/$(get_libdir)/alsa-lib + doexe *.so || die +} diff --git a/media-plugins/alsaequal/alsaequal-0.6-r3.reason b/media-plugins/alsaequal/alsaequal-0.6-r3.reason new file mode 100644 index 0000000..b1413a9 --- /dev/null +++ b/media-plugins/alsaequal/alsaequal-0.6-r3.reason @@ -0,0 +1,2 @@ +ALSA lib ctl_equal.c:268:(_snd_ctl_equal_open) Problem with control file .alsaequal.bin, 3. +cannot open mixer: Operation not permitted diff --git a/media-plugins/alsaequal/files/alsaequal-0.6-asneeded.patch b/media-plugins/alsaequal/files/alsaequal-0.6-asneeded.patch new file mode 100644 index 0000000..50a95e6 --- /dev/null +++ b/media-plugins/alsaequal/files/alsaequal-0.6-asneeded.patch @@ -0,0 +1,16 @@ +--- Makefile ++++ Makefile +@@ -29,11 +29,11 @@ + + $(SND_PCM_BIN): $(SND_PCM_OBJECTS) + @echo LD $@ +- $(Q)$(LD) $(LDFLAGS) $(SND_PCM_LIBS) $(SND_PCM_OBJECTS) -o $(SND_PCM_BIN) ++ $(Q)$(LD) $(LDFLAGS) $(SND_PCM_OBJECTS) -o $(SND_PCM_BIN) $(SND_PCM_LIBS) + + $(SND_CTL_BIN): $(SND_CTL_OBJECTS) + @echo LD $@ +- $(Q)$(LD) $(LDFLAGS) $(SND_CTL_LIBS) $(SND_CTL_OBJECTS) -o $(SND_CTL_BIN) ++ $(Q)$(LD) $(LDFLAGS) $(SND_CTL_OBJECTS) -o $(SND_CTL_BIN) $(SND_CTL_LIBS) + + %.o: %.c + @echo GCC $< diff --git a/media-plugins/alsaequal/files/alsaequal-0.6-eq-name.patch b/media-plugins/alsaequal/files/alsaequal-0.6-eq-name.patch new file mode 100644 index 0000000..7317214 --- /dev/null +++ b/media-plugins/alsaequal/files/alsaequal-0.6-eq-name.patch @@ -0,0 +1,63 @@ +Description: Fix CAPS Eq plugin name +Origin: vendor +Bug-Debian: http://bugs.debian.org/721355 +Forwarded: no +Author: Alessandro Ghedini +Last-Update: 2013-08-30 + +--- a/ctl_equal.c ++++ b/ctl_equal.c +@@ -167,7 +167,7 @@ + snd_ctl_equal_t *equal; + const char *controls = ".alsaequal.bin"; + const char *library = "/usr/lib/ladspa/caps.so"; +- const char *module = "Eq"; ++ const char *module = "Eq10"; + long channels = 2; + const char *sufix = " Playback Volume"; + int err, i, index; +--- a/pcm_equal.c ++++ b/pcm_equal.c +@@ -151,7 +151,7 @@ + snd_config_t *sconf = NULL; + const char *controls = ".alsaequal.bin"; + const char *library = "/usr/lib/ladspa/caps.so"; +- const char *module = "Eq"; ++ const char *module = "Eq10"; + long channels = 2; + int err; + +--- a/README ++++ b/README +@@ -1,11 +1,11 @@ + Alsaequal is a real-time adjustable equalizer plugin for ALSA. It can + be adjusted using any ALSA compatible mixer, e.g. alsamixergui. + +-Alsaequal uses the Eq CAPS LADSPA Plugin for audio processing, actually ++Alsaequal uses the Eq10 CAPS LADSPA Plugin for audio processing, actually + alsaequal is a generic LADSPA plugin interface with real-time access to + the LADSPA controls (the LADSPA plugin included with alsa doesn't allow + for real-time controls) but it was developed for and only tested with +-Eq CAPS LADSPA plugin. You are welcome to try it with other plugins, it ++Eq10 CAPS LADSPA plugin. You are welcome to try it with other plugins, it + may work. Let me know how it goes, you can reach me at + . + +@@ -66,7 +66,7 @@ + library -- location of the LADSPA library, the default is + "/usr/lib/ladspa/caps.so" + module -- module name within the LADSPA library, the deafault +- is "Eq" ++ is "Eq10" + channels -- number of channels, the default is 2 + } + +@@ -81,7 +81,7 @@ + library -- location of the LADSPA library, the default is + "/usr/lib/ladspa/caps.so" + module -- module name within the LADSPA library, the deafault +- is "Eq" ++ is "Eq10" + channels -- number of channels, the default is 2 + } + diff --git a/media-plugins/alsaequal/files/alsaequal-0.6-false-error.patch b/media-plugins/alsaequal/files/alsaequal-0.6-false-error.patch new file mode 100644 index 0000000..0d0677b --- /dev/null +++ b/media-plugins/alsaequal/files/alsaequal-0.6-false-error.patch @@ -0,0 +1,13 @@ +--- ctl_equal.c 2009-01-31 14:06:47.000000000 -0800 ++++ ctl_equal.c 2013-01-28 17:30:02.756060314 -0800 +@@ -263,8 +263,8 @@ + for(i = 0; i < equal->num_input_controls; i++) { + if(equal->control_data->control[i].type == LADSPA_CNTRL_INPUT) { + index = equal->control_data->control[i].index; +- if(equal->klass->PortDescriptors[index] != +- (LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) { ++ if((equal->klass->PortDescriptors[index] & ++ (LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) == 0) { + SNDERR("Problem with control file %s, %d.", controls, index); + return -1; + } -- 2.42.0