Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-plugins/alsa-plugins/
Date: Sun, 30 Jun 2019 11:23:07
Message-Id: 1561893769.852053b504a01ac36620344245bc9e460f9a8618.pacho@gentoo
1 commit: 852053b504a01ac36620344245bc9e460f9a8618
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 30 11:01:59 2019 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 30 11:22:49 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=852053b5
7
8 media-plugins/alsa-plugins: Symlink is needed for loading pulse config file
9
10 Closes: https://bugs.gentoo.org/670960
11 Package-Manager: Portage-2.3.67, Repoman-2.3.14
12 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
13
14 .../alsa-plugins/alsa-plugins-1.1.9-r1.ebuild | 103 +++++++++++++++++++++
15 1 file changed, 103 insertions(+)
16
17 diff --git a/media-plugins/alsa-plugins/alsa-plugins-1.1.9-r1.ebuild b/media-plugins/alsa-plugins/alsa-plugins-1.1.9-r1.ebuild
18 new file mode 100644
19 index 00000000000..783f916c139
20 --- /dev/null
21 +++ b/media-plugins/alsa-plugins/alsa-plugins-1.1.9-r1.ebuild
22 @@ -0,0 +1,103 @@
23 +# Copyright 1999-2019 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=7
27 +inherit autotools flag-o-matic multilib multilib-minimal
28 +
29 +DESCRIPTION="ALSA extra plugins"
30 +HOMEPAGE="http://www.alsa-project.org/"
31 +SRC_URI="mirror://alsaproject/plugins/${P}.tar.bz2"
32 +
33 +LICENSE="GPL-2 LGPL-2.1"
34 +SLOT="0"
35 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux"
36 +IUSE="arcam_av debug ffmpeg jack libav libsamplerate +mix oss pulseaudio speex +usb_stream"
37 +
38 +RDEPEND="
39 + >=media-libs/alsa-lib-${PV}:=[${MULTILIB_USEDEP}]
40 + ffmpeg? (
41 + libav? ( media-video/libav:= )
42 + !libav? ( media-video/ffmpeg:0= )
43 + )
44 + jack? ( virtual/jack[${MULTILIB_USEDEP}] )
45 + libsamplerate? ( >=media-libs/libsamplerate-0.1.8-r1:=[${MULTILIB_USEDEP}] )
46 + pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
47 + speex? (
48 + >=media-libs/speex-1.2.0:=[${MULTILIB_USEDEP}]
49 + media-libs/speexdsp[${MULTILIB_USEDEP}]
50 + )
51 +"
52 +DEPEND="${RDEPEND}"
53 +BDEPEND="virtual/pkgconfig"
54 +
55 +src_prepare() {
56 + default
57 +
58 + # For some reasons the polyp/pulse plugin does fail with alsaplayer with a
59 + # failed assert. As the code works just fine with asserts disabled, for now
60 + # disable them waiting for a better solution.
61 + sed -i \
62 + -e '/AM_CFLAGS/s:-Wall:-DNDEBUG -Wall:' \
63 + pulse/Makefile.am || die
64 +
65 + eautoreconf
66 +}
67 +
68 +multilib_src_configure() {
69 + use debug || append-cppflags -DNDEBUG
70 +
71 + local myeconfargs=(
72 + # default does not contain $prefix: bug #673464
73 + --with-alsalconfdir="${EPREFIX}"/etc/alsa/conf.d
74 +
75 + --with-speex="$(usex speex lib no)"
76 + $(use_enable arcam_av arcamav)
77 + $(use_enable ffmpeg libav)
78 + $(use_enable jack)
79 + $(use_enable libsamplerate samplerate)
80 + $(use_enable mix)
81 + $(use_enable oss)
82 + $(use_enable pulseaudio)
83 + $(use_enable speex speexdsp)
84 + $(use_enable usb_stream usbstream)
85 + )
86 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
87 +}
88 +
89 +multilib_src_install_all() {
90 + einstalldocs
91 +
92 + cd doc || die
93 + dodoc upmix.txt vdownmix.txt README-pcm-oss
94 + use jack && dodoc README-jack
95 + use libsamplerate && dodoc samplerate.txt
96 + use ffmpeg && dodoc lavrate.txt a52.txt
97 +
98 + if use pulseaudio; then
99 + dodoc README-pulse
100 + # install ALSA configuration files
101 + # making PA to be used by alsa clients
102 + insinto /usr/share/alsa
103 + doins "${FILESDIR}"/pulse-default.conf
104 + insinto /usr/share/alsa/alsa.conf.d
105 + doins "${FILESDIR}"/51-pulseaudio-probe.conf
106 + # bug #410261, comment 5+
107 + # seems to work fine without any path
108 + sed -i \
109 + -e "s:/usr/lib/alsa-lib/::" \
110 + "${ED%/}"/usr/share/alsa/alsa.conf.d/51-pulseaudio-probe.conf || die #410261
111 + dosym "${ED%/}"/usr/share/alsa/alsa.conf.d/51-pulseaudio-probe.conf \
112 + /etc/alsa/conf.d/51-pulseaudio-probe.conf #670960
113 + fi
114 +
115 + find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die
116 +}
117 +
118 +pkg_postinst() {
119 + if use pulseaudio; then
120 + einfo "The PulseAudio device is now set as the default device if the"
121 + einfo "PulseAudio server is found to be running. Any custom"
122 + einfo "configuration in /etc/asound.conf or ~/.asoundrc for this"
123 + einfo "purpose should now be unnecessary."
124 + fi
125 +}