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-sound/pulseaudio/
Date: Sat, 02 Jul 2016 17:12:33
Message-Id: 1467479470.d6d501bd5386c9b09b80278196d2b36f7c909861.pacho@gentoo
1 commit: d6d501bd5386c9b09b80278196d2b36f7c909861
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 2 16:12:46 2016 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 2 17:11:10 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6d501bd
7
8 media-sound/pulseaudio: Version bump
9
10 Package-Manager: portage-2.3.0_rc1
11
12 media-sound/pulseaudio/Manifest | 1 +
13 media-sound/pulseaudio/pulseaudio-9.0.ebuild | 366 +++++++++++++++++++++++++++
14 2 files changed, 367 insertions(+)
15
16 diff --git a/media-sound/pulseaudio/Manifest b/media-sound/pulseaudio/Manifest
17 index 4b078c9..6604e54 100644
18 --- a/media-sound/pulseaudio/Manifest
19 +++ b/media-sound/pulseaudio/Manifest
20 @@ -1,2 +1,3 @@
21 DIST pulseaudio-7.1.tar.xz 1506504 SHA256 e667514a28328f92aceea754a224a0150dddfe7e9a71b4c6d31489220153b9d9 SHA512 21f621bd76268b9dd6e5be2231b0e779a8e0cfdece44c46c8ac96a4e1d4df52fe5b9791ef95a0909a3c177bbfa5eab7d52fed9b43362840a9c8a6001e821175e WHIRLPOOL 940801193832d6e9903ef547666ed1a84910a075ec8f42a32c038efdb1d111608ccf3aa97b35970d726e4157459f98edb5e228dc82cdeb3029bd15b3fd3fe691
22 DIST pulseaudio-8.0.tar.xz 1517656 SHA256 690eefe28633466cfd1ab9d85ebfa9376f6b622deec6bfee5091ac9737cd1989 SHA512 7008abf768f720839353038ffd3e35e442f82452aa7e27d446f75d403096b042643d2b2b1d153454302bd5a51f9217f4979c8995b80ba2695f141e6a29e164fa WHIRLPOOL 1b4efd629bfb5d1a40c4c4709854de1226f811345146e2bb34315d4690060d8b5ad691502c25d80272cb894473ba664b172b36a31ecb89b789a9bcd161392003
23 +DIST pulseaudio-9.0.tar.xz 1537568 SHA256 c3d3d66b827f18fbe903fe3df647013f09fc1e2191c035be1ee2d82a9e404686 SHA512 2177d4ab2ab7ded43d6eb5ece763504bdd614f9bdc27ab007894f8f7eed3fd0006a5b7550e5fd099d1877423524bc2baa22775372c8cefd9b772c28134d3e55a WHIRLPOOL 46f7accbae648143f14a51673014d8f20d578b618f79e681062d612f8cc83a3269bbe1ade769fad8b876bddd53d7ed15b04c01c3a518aa9e5fbbf2aca6253d20
24
25 diff --git a/media-sound/pulseaudio/pulseaudio-9.0.ebuild b/media-sound/pulseaudio/pulseaudio-9.0.ebuild
26 new file mode 100644
27 index 0000000..a30fc36
28 --- /dev/null
29 +++ b/media-sound/pulseaudio/pulseaudio-9.0.ebuild
30 @@ -0,0 +1,366 @@
31 +# Copyright 1999-2016 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +# $Id$
34 +
35 +EAPI=6
36 +inherit autotools bash-completion-r1 eutils flag-o-matic gnome2-utils linux-info systemd user versionator udev multilib-minimal
37 +
38 +DESCRIPTION="A networked sound server with an advanced plugin system"
39 +HOMEPAGE="http://www.pulseaudio.org/"
40 +SRC_URI="https://freedesktop.org/software/pulseaudio/releases/${P}.tar.xz"
41 +
42 +# libpulse-simple and libpulse link to libpulse-core; this is daemon's
43 +# library and can link to gdbm and other GPL-only libraries. In this
44 +# cases, we have a fully GPL-2 package. Leaving the rest of the
45 +# GPL-forcing USE flags for those who use them.
46 +LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 )"
47 +
48 +SLOT="0"
49 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
50 +
51 +# +alsa-plugin as discussed in bug #519530
52 +IUSE="+alsa +alsa-plugin +asyncns bluetooth +caps dbus doc equalizer +gdbm +glib
53 +gnome gtk ipv6 jack libsamplerate libressl lirc native-headset neon ofono-headset
54 ++orc oss qt4 realtime selinux sox ssl systemd system-wide tcpd test +udev
55 ++webrtc-aec +X xen zeroconf"
56 +
57 +# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
58 +REQUIRED_USE="
59 + bluetooth? ( dbus )
60 + ofono-headset? ( bluetooth )
61 + native-headset? ( bluetooth )
62 + udev? ( || ( alsa oss ) )
63 +"
64 +
65 +# libpcre needed in some cases, bug #472228
66 +RDEPEND="
67 + || (
68 + elibc_glibc? ( virtual/libc )
69 + elibc_uclibc? ( virtual/libc )
70 + dev-libs/libpcre
71 + )
72 + >=media-libs/libsndfile-1.0.20[${MULTILIB_USEDEP}]
73 + X? (
74 + >=x11-libs/libX11-1.4.0[${MULTILIB_USEDEP}]
75 + >=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}]
76 + x11-libs/libSM[${MULTILIB_USEDEP}]
77 + x11-libs/libICE[${MULTILIB_USEDEP}]
78 + x11-libs/libXtst[${MULTILIB_USEDEP}]
79 + )
80 + caps? ( >=sys-libs/libcap-2.22-r2[${MULTILIB_USEDEP}] )
81 + libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 )
82 + alsa? ( >=media-libs/alsa-lib-1.0.19 )
83 + glib? ( >=dev-libs/glib-2.4.0:2[${MULTILIB_USEDEP}] )
84 + zeroconf? ( >=net-dns/avahi-0.6.12[dbus] )
85 + jack? ( virtual/jack )
86 + tcpd? ( sys-apps/tcp-wrappers[${MULTILIB_USEDEP}] )
87 + lirc? ( app-misc/lirc )
88 + dbus? ( >=sys-apps/dbus-1.0.0[${MULTILIB_USEDEP}] )
89 + gtk? ( x11-libs/gtk+:3 )
90 + gnome? ( >=gnome-base/gconf-2.4.0 )
91 + bluetooth? (
92 + >=net-wireless/bluez-5
93 + >=sys-apps/dbus-1.0.0
94 + media-libs/sbc
95 + )
96 + asyncns? ( net-libs/libasyncns[${MULTILIB_USEDEP}] )
97 + udev? ( >=virtual/udev-143[hwdb(+)] )
98 + realtime? ( sys-auth/rtkit )
99 + equalizer? ( sci-libs/fftw:3.0 )
100 + ofono-headset? ( >=net-misc/ofono-1.13 )
101 + orc? ( >=dev-lang/orc-0.4.15 )
102 + sox? ( >=media-libs/soxr-0.1.1 )
103 + ssl? (
104 + !libressl? ( dev-libs/openssl:0= )
105 + libressl? ( dev-libs/libressl:= )
106 + )
107 + >=media-libs/speex-1.2_rc1
108 + gdbm? ( sys-libs/gdbm )
109 + webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2 )
110 + xen? ( app-emulation/xen-tools )
111 + systemd? ( sys-apps/systemd:0=[${MULTILIB_USEDEP}] )
112 + >=dev-libs/json-c-0.11[${MULTILIB_USEDEP}]
113 + dev-libs/libltdl:0
114 + selinux? ( sec-policy/selinux-pulseaudio )
115 +"
116 +# it's a valid RDEPEND, libltdl.so is used for native abi
117 +
118 +DEPEND="${RDEPEND}
119 + sys-devel/m4
120 + doc? ( app-doc/doxygen )
121 + test? ( dev-libs/check )
122 + X? (
123 + x11-proto/xproto[${MULTILIB_USEDEP}]
124 + >=x11-libs/libXtst-1.0.99.2[${MULTILIB_USEDEP}]
125 + )
126 + dev-libs/libatomic_ops
127 + virtual/pkgconfig
128 + system-wide? ( || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) )
129 + dev-util/intltool
130 + >=sys-devel/gettext-0.18.1
131 +"
132 +# This is a PDEPEND to avoid a circular dep
133 +PDEPEND="
134 + alsa? ( alsa-plugin? ( >=media-plugins/alsa-plugins-1.0.27-r1[pulseaudio,${MULTILIB_USEDEP}] ) )
135 +"
136 +
137 +# alsa-utils dep is for the alsasound init.d script (see bug #155707)
138 +# bluez dep is for the bluetooth init.d script
139 +# PyQt4 dep is for the qpaeq script
140 +RDEPEND="${RDEPEND}
141 + equalizer? ( qt4? ( dev-python/PyQt4[dbus] ) )
142 + system-wide? (
143 + alsa? ( media-sound/alsa-utils )
144 + bluetooth? ( >=net-wireless/bluez-5 )
145 + )
146 +"
147 +
148 +pkg_pretend() {
149 + CONFIG_CHECK="~HIGH_RES_TIMERS"
150 + WARNING_HIGH_RES_TIMERS="CONFIG_HIGH_RES_TIMERS:\tis not set (required for enabling timer-based scheduling in pulseaudio)\n"
151 + check_extra_config
152 +
153 + if linux_config_exists; then
154 + local snd_hda_prealloc_size=$(linux_chkconfig_string SND_HDA_PREALLOC_SIZE)
155 + if [ -n "${snd_hda_prealloc_size}" ] && [ "${snd_hda_prealloc_size}" -lt 2048 ]; then
156 + ewarn "A preallocated buffer-size of 2048 (kB) or higher is recommended for the HD-audio driver!"
157 + ewarn "CONFIG_SND_HDA_PREALLOC_SIZE=${snd_hda_prealloc_size}"
158 + fi
159 + fi
160 +}
161 +
162 +pkg_setup() {
163 + linux-info_pkg_setup
164 + gnome2_environment_reset #543364
165 +
166 + enewgroup audio 18 # Just make sure it exists
167 +
168 + if use system-wide; then
169 + enewgroup pulse-access
170 + enewgroup pulse
171 + enewuser pulse -1 -1 /var/run/pulse pulse,audio
172 + fi
173 +}
174 +
175 +src_prepare() {
176 + default
177 +
178 + # Skip test that cannot work with sandbox, bug #501846
179 + sed -i -e '/lock-autospawn-test/d' src/Makefile.am || die
180 +
181 + eautoreconf
182 +}
183 +
184 +multilib_src_configure() {
185 + local myconf=()
186 +
187 + if use gdbm; then
188 + myconf+=( --with-database=gdbm )
189 + else
190 + myconf+=( --with-database=simple )
191 + fi
192 +
193 + if use bluetooth; then
194 + if multilib_is_native_abi; then
195 + myconf+=( --enable-bluez5 --disable-bluez4
196 + $(use_enable native-headset bluez5-native-headset)
197 + $(use_enable ofono-headset bluez5-ofono-headset) )
198 + fi
199 + else
200 + myconf+=( --disable-bluez5 --disable-bluez4 )
201 + fi
202 +
203 + myconf+=(
204 + --enable-largefile
205 + $(use_enable glib glib2)
206 + --disable-solaris
207 + $(use_enable asyncns)
208 + $(use_enable oss oss-output)
209 + $(use_enable alsa)
210 + $(use_enable lirc)
211 + $(use_enable neon neon-opt)
212 + $(use_enable tcpd tcpwrap)
213 + $(use_enable jack)
214 + $(use_enable zeroconf avahi)
215 + $(use_enable dbus)
216 + $(use_enable gnome gconf)
217 + $(use_enable gtk gtk3)
218 + $(use_enable libsamplerate samplerate)
219 + $(use_enable orc)
220 + $(use_enable X x11)
221 + $(use_enable test default-build-tests)
222 + $(use_enable udev)
223 + $(use_with sox soxr)
224 + $(use_enable systemd systemd-daemon)
225 + $(use_enable systemd systemd-login)
226 + $(use_enable systemd systemd-journal)
227 + $(use_enable ipv6)
228 + $(use_enable ssl openssl)
229 + $(use_enable webrtc-aec)
230 + $(use_enable xen)
231 + $(use_with caps)
232 + $(use_with equalizer fftw)
233 + --disable-adrian-aec
234 + --disable-esound
235 + --localstatedir="${EPREFIX}"/var
236 + --with-udev-rules-dir="${EPREFIX}/$(get_udevdir)"/rules.d
237 + --with-systemduserunitdir=$(systemd_get_userunitdir)
238 + )
239 +
240 + if ! multilib_is_native_abi; then
241 + # disable all the modules and stuff
242 + myconf+=(
243 + --disable-oss-output
244 + --disable-alsa
245 + --disable-lirc
246 + --disable-jack
247 + --disable-avahi
248 + --disable-gconf
249 + --disable-gtk3
250 + --disable-samplerate
251 + --disable-bluez4
252 + --disable-bluez5
253 + --disable-udev
254 + --disable-openssl
255 + --disable-orc
256 + --disable-webrtc-aec
257 + --disable-xen
258 + --without-fftw
259 + --without-soxr
260 +
261 + # tests involve random modules, so just do them for the native
262 + --disable-default-build-tests
263 +
264 + # hack around unnecessary checks
265 + # (results don't matter, we're not building anything using it)
266 + ac_cv_lib_ltdl_lt_dladvise_init=yes
267 + --with-database=simple
268 + LIBSPEEX_CFLAGS=' '
269 + LIBSPEEX_LIBS=' '
270 + )
271 + fi
272 +
273 + ECONF_SOURCE=${S} \
274 + econf "${myconf[@]}"
275 +}
276 +
277 +multilib_src_compile() {
278 + if multilib_is_native_abi; then
279 + emake
280 + use doc && emake doxygen
281 + else
282 + local targets=( libpulse.la libpulse-simple.la )
283 + use glib && targets+=( libpulse-mainloop-glib.la )
284 + emake -C src libpulse{,dsp,-simple,-mainloop-glib}.la
285 + fi
286 +}
287 +
288 +multilib_src_test() {
289 + # We avoid running the toplevel check target because that will run
290 + # po/'s tests too, and they are broken. Officially, it should work
291 + # with intltool 0.41, but that doesn't look like a stable release.
292 + if multilib_is_native_abi; then
293 + emake -C src check
294 + fi
295 +}
296 +
297 +multilib_src_install() {
298 + if multilib_is_native_abi; then
299 + emake -j1 DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)" install
300 + use doc && dohtml -r doxygen/html/
301 + else
302 + local targets=( libpulse.la libpulse-simple.la )
303 + use glib && targets+=( libpulse-mainloop-glib.la )
304 + emake DESTDIR="${D}" install-pkgconfigDATA
305 + emake DESTDIR="${D}" -C src \
306 + install-libLTLIBRARIES \
307 + install-padsplibLTLIBRARIES \
308 + lib_LTLIBRARIES="${targets[*]}" \
309 + install-pulseincludeHEADERS
310 + fi
311 +}
312 +
313 +multilib_src_install_all() {
314 + # Drop the script entirely if X is disabled
315 + use X || rm "${ED}"/usr/bin/start-pulseaudio-x11
316 +
317 + if use system-wide; then
318 + newconfd "${FILESDIR}/pulseaudio.conf.d" pulseaudio
319 +
320 + use_define() {
321 + local define=${2:-$(echo $1 | tr '[:lower:]' '[:upper:]')}
322 +
323 + use "$1" && echo "-D$define" || echo "-U$define"
324 + }
325 +
326 + unifdef $(use_define zeroconf AVAHI) \
327 + $(use_define alsa) \
328 + $(use_define bluetooth) \
329 + $(use_define udev) \
330 + "${FILESDIR}/pulseaudio.init.d-5" \
331 + > "${T}/pulseaudio"
332 +
333 + doinitd "${T}/pulseaudio"
334 +
335 + systemd_dounit "${FILESDIR}/${PN}.service"
336 + fi
337 +
338 + use zeroconf && sed -i -e '/module-zeroconf-publish/s:^#::' "${ED}/etc/pulse/default.pa"
339 +
340 + dodoc NEWS README todo
341 +
342 + # Create the state directory
343 + use prefix || diropts -o pulse -g pulse -m0755
344 +
345 + # We need /var/run/pulse, bug #442852
346 + use system-wide && systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}.conf"
347 +
348 + # Prevent warnings when system-wide is not used, bug #447694
349 + use system-wide || rm "${ED}"/etc/dbus-1/system.d/pulseaudio-system.conf
350 +
351 + prune_libtool_files --all
352 +}
353 +
354 +pkg_postinst() {
355 + if use system-wide; then
356 + elog "You have enabled the 'system-wide' USE flag for pulseaudio."
357 + elog "This mode should only be used on headless servers, embedded systems,"
358 + elog "or thin clients. It will usually require manual configuration, and is"
359 + elog "incompatible with many expected pulseaudio features."
360 + elog "On normal desktop systems, system-wide mode is STRONGLY DISCOURAGED."
361 + elog "For more information, see"
362 + elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/"
363 + elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/"
364 + elog " https://wiki.gentoo.org/wiki/PulseAudio#Headless_server"
365 + if use gnome ; then
366 + elog
367 + elog "By enabling gnome USE flag, you enabled gconf support. Please note"
368 + elog "that you might need to remove the gnome USE flag or disable the"
369 + elog "gconf module on /etc/pulse/system.pa to be able to use PulseAudio"
370 + elog "with a system-wide instance."
371 + fi
372 + fi
373 +
374 + if use equalizer && ! use qt4; then
375 + elog "You've enabled the 'equalizer' USE-flag but not the 'qt4' USE-flag."
376 + elog "This will build the equalizer module, but the 'qpaeq' tool"
377 + elog "which is required to set equalizer levels will not work."
378 + fi
379 +
380 + if use native-headset && use ofono-headset; then
381 + elog "You have enabled both native and ofono headset profiles. The runtime decision"
382 + elog "which to use is done via the 'headset' argument of module-bluetooth-discover."
383 + fi
384 +
385 + if use libsamplerate; then
386 + elog "The libsamplerate based resamplers are now deprecated, because they offer no"
387 + elog "particular advantage over speex. Upstream suggests disabling them."
388 + fi
389 +
390 + # Needed for pulseaudio-6.0 update from older versions
391 + if use udev; then
392 + if ! version_is_at_least 6.0 ${REPLACING_VERSIONS}; then
393 + udevadm control --reload && udevadm trigger
394 + fi
395 + fi
396 +}