Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/pulseaudio/, media-sound/pulseaudio/files/
Date: Fri, 28 Dec 2018 07:48:59
Message-Id: 1545983308.0dbf02ad82b088f6f71bb8d3dfbeedbf9d0ab85c.leio@gentoo
1 commit: 0dbf02ad82b088f6f71bb8d3dfbeedbf9d0ab85c
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 28 07:47:23 2018 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 28 07:48:28 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dbf02ad
7
8 media-sound/pulseaudio: remove old
9
10 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
11 Package-Manager: Portage-2.3.52, Repoman-2.3.11
12
13 media-sound/pulseaudio/Manifest | 1 -
14 .../files/pulseaudio-11.1-glibc-2.27.patch | 59 ----
15 .../files/pulseaudio-11.1-qpaeq-pyqt5-1.patch | 198 -----------
16 .../files/pulseaudio-11.1-qpaeq-pyqt5-2.patch | 31 --
17 media-sound/pulseaudio/metadata.xml | 14 +-
18 media-sound/pulseaudio/pulseaudio-11.1-r1.ebuild | 363 ---------------------
19 6 files changed, 2 insertions(+), 664 deletions(-)
20
21 diff --git a/media-sound/pulseaudio/Manifest b/media-sound/pulseaudio/Manifest
22 index 2dcd18e020a..51ef3ffb093 100644
23 --- a/media-sound/pulseaudio/Manifest
24 +++ b/media-sound/pulseaudio/Manifest
25 @@ -1,2 +1 @@
26 -DIST pulseaudio-11.1.tar.xz 1648924 BLAKE2B eea767efb6529436a6c2aa7d5ccaccdbda2338ad8db639ad333598b1589d259acf71ef34e904a240710f5343864fa868789eaa7f7cae1b07902ebd989fe83e12 SHA512 8863d8d7aede0d9a4d158e84e7bece91747c335f9ac98c7b21fafe76b762f8817e1125307aa46e561e540d2c40525e91f51a55ec34ac55d58fd5980199856a7a
27 DIST pulseaudio-12.2.tar.xz 1665092 BLAKE2B 2e36efc5142c1e379cc2b135f4126f03a31831b26efe60f7cdf128af6e23fab25706a5609644d0b387530021055f87525fe60d527cd3a087f51bfd58e810644f SHA512 877754c1838b3cb042dbc18a5f1cc3cf313ffcaee7a64703330406d1f86279c34f1107634ac3083b158365e6757fbacf5ec406bc3c5788d291de67b77a561a4e
28
29 diff --git a/media-sound/pulseaudio/files/pulseaudio-11.1-glibc-2.27.patch b/media-sound/pulseaudio/files/pulseaudio-11.1-glibc-2.27.patch
30 deleted file mode 100644
31 index a89167b603d..00000000000
32 --- a/media-sound/pulseaudio/files/pulseaudio-11.1-glibc-2.27.patch
33 +++ /dev/null
34 @@ -1,59 +0,0 @@
35 -From: Tanu Kaskinen <tanuk@×××.fi>
36 -Date: Wed, 24 Jan 2018 03:51:49 +0200
37 -Subject: memfd-wrappers: only define memfd_create() if not already defined
38 -
39 -glibc 2.27 is to be released soon, and it will provide memfd_create().
40 -If glibc provides the function, we must not define it ourselves,
41 -otherwise building fails due to conflict between the two implementations
42 -of the same function.
43 -
44 -BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=104733
45 -(cherry picked from commit dfb0460fb4743aec047cdf755a660a9ac2d0f3fb)
46 ----
47 - configure.ac | 3 +++
48 - src/pulsecore/memfd-wrappers.h | 7 ++++---
49 - 2 files changed, 7 insertions(+), 3 deletions(-)
50 -
51 -diff --git a/configure.ac b/configure.ac
52 -index 77b5ff5..3a71fd8 100644
53 ---- a/configure.ac
54 -+++ b/configure.ac
55 -@@ -607,6 +607,9 @@ AS_IF([test "x$enable_memfd" = "xyes" && test "x$HAVE_MEMFD" = "x0"],
56 - [AC_MSG_ERROR([*** Your Linux kernel does not support memfd shared memory.
57 - *** Use linux v3.17 or higher for such a feature.])])
58 -
59 -+AS_IF([test "x$HAVE_MEMFD" = "x1"],
60 -+ AC_CHECK_FUNCS([memfd_create]))
61 -+
62 - AC_SUBST(HAVE_MEMFD)
63 - AM_CONDITIONAL([HAVE_MEMFD], [test "x$HAVE_MEMFD" = x1])
64 - AS_IF([test "x$HAVE_MEMFD" = "x1"], AC_DEFINE([HAVE_MEMFD], 1, [Have memfd shared memory.]))
65 -diff --git a/src/pulsecore/memfd-wrappers.h b/src/pulsecore/memfd-wrappers.h
66 -index 3bed9b2..c7aadfd 100644
67 ---- a/src/pulsecore/memfd-wrappers.h
68 -+++ b/src/pulsecore/memfd-wrappers.h
69 -@@ -20,13 +20,14 @@
70 - License along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
71 - ***/
72 -
73 --#ifdef HAVE_MEMFD
74 -+#if defined(HAVE_MEMFD) && !defined(HAVE_MEMFD_CREATE)
75 -
76 - #include <sys/syscall.h>
77 - #include <fcntl.h>
78 -
79 - /*
80 -- * No glibc wrappers exist for memfd_create(2), so provide our own.
81 -+ * Before glibc version 2.27 there was no wrapper for memfd_create(2),
82 -+ * so we have to provide our own.
83 - *
84 - * Also define memfd fcntl sealing macros. While they are already
85 - * defined in the kernel header file <linux/fcntl.h>, that file as
86 -@@ -63,6 +64,6 @@ static inline int memfd_create(const char *name, unsigned int flags) {
87 - #define F_SEAL_WRITE 0x0008 /* prevent writes */
88 - #endif
89 -
90 --#endif /* HAVE_MEMFD */
91 -+#endif /* HAVE_MEMFD && !HAVE_MEMFD_CREATE */
92 -
93 - #endif
94
95 diff --git a/media-sound/pulseaudio/files/pulseaudio-11.1-qpaeq-pyqt5-1.patch b/media-sound/pulseaudio/files/pulseaudio-11.1-qpaeq-pyqt5-1.patch
96 deleted file mode 100644
97 index 62012c12147..00000000000
98 --- a/media-sound/pulseaudio/files/pulseaudio-11.1-qpaeq-pyqt5-1.patch
99 +++ /dev/null
100 @@ -1,198 +0,0 @@
101 -From: =?utf-8?q?Andrius_=C5=A0tikonas?= <andrius@××××××××.eu>
102 -Date: Mon, 20 Nov 2017 19:56:53 +0000
103 -Subject: qpaeq: port to PyQt5
104 -
105 -(cherry picked from commit 480e0e74f43565d7ece72141666961ae8cc2ed75)
106 ----
107 - src/utils/qpaeq | 68 ++++++++++++++++++++++++++++-----------------------------
108 - 1 file changed, 34 insertions(+), 34 deletions(-)
109 -
110 -diff --git a/src/utils/qpaeq b/src/utils/qpaeq
111 -index ac4b9e4..508b233 100755
112 ---- a/src/utils/qpaeq
113 -+++ b/src/utils/qpaeq
114 -@@ -18,13 +18,13 @@
115 -
116 - import os,math,sys
117 - try:
118 -- import PyQt4,sip
119 -- from PyQt4 import QtGui,QtCore
120 -+ import PyQt5,sip
121 -+ from PyQt5 import QtWidgets,QtCore
122 - import dbus.mainloop.qt
123 - import dbus
124 - except ImportError as e:
125 - sys.stderr.write('There was an error importing needed libraries\n'
126 -- 'Make sure you have qt4 and dbus-python installed\n'
127 -+ 'Make sure you have qt5 and dbus-python installed\n'
128 - 'The error that occured was:\n'
129 - '\t%s\n' % (str(e)))
130 - sys.exit(-1)
131 -@@ -62,7 +62,7 @@ def connect():
132 - prop_iface='org.freedesktop.DBus.Properties'
133 - eq_iface='org.PulseAudio.Ext.Equalizing1.Equalizer'
134 - device_iface='org.PulseAudio.Core1.Device'
135 --class QPaeq(QtGui.QWidget):
136 -+class QPaeq(QtWidgets.QWidget):
137 - manager_path='/org/pulseaudio/equalizing1'
138 - manager_iface='org.PulseAudio.Ext.Equalizing1.Manager'
139 - core_iface='org.PulseAudio.Core1'
140 -@@ -70,7 +70,7 @@ class QPaeq(QtGui.QWidget):
141 - module_name='module-equalizer-sink'
142 -
143 - def __init__(self):
144 -- QtGui.QWidget.__init__(self)
145 -+ QtWidgets.QWidget.__init__(self)
146 - self.setWindowTitle('qpaeq')
147 - self.slider_widget=None
148 - self.sink_name=None
149 -@@ -84,50 +84,50 @@ class QPaeq(QtGui.QWidget):
150 - self.setMinimumSize(self.sizeHint())
151 -
152 - def create_layout(self):
153 -- self.main_layout=QtGui.QVBoxLayout()
154 -+ self.main_layout=QtWidgets.QVBoxLayout()
155 - self.setLayout(self.main_layout)
156 -- toprow_layout=QtGui.QHBoxLayout()
157 -- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
158 -+ toprow_layout=QtWidgets.QHBoxLayout()
159 -+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
160 - sizePolicy.setHorizontalStretch(0)
161 - sizePolicy.setVerticalStretch(0)
162 - #sizePolicy.setHeightForWidth(self.profile_box.sizePolicy().hasHeightForWidth())
163 -
164 -- toprow_layout.addWidget(QtGui.QLabel('Sink'))
165 -- self.sink_box = QtGui.QComboBox()
166 -+ toprow_layout.addWidget(QtWidgets.QLabel('Sink'))
167 -+ self.sink_box = QtWidgets.QComboBox()
168 - self.sink_box.setSizePolicy(sizePolicy)
169 - self.sink_box.setDuplicatesEnabled(False)
170 -- self.sink_box.setInsertPolicy(QtGui.QComboBox.InsertAlphabetically)
171 -- #self.sink_box.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
172 -+ self.sink_box.setInsertPolicy(QtWidgets.QComboBox.InsertAlphabetically)
173 -+ #self.sink_box.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToContents)
174 - toprow_layout.addWidget(self.sink_box)
175 -
176 -- toprow_layout.addWidget(QtGui.QLabel('Channel'))
177 -- self.channel_box = QtGui.QComboBox()
178 -+ toprow_layout.addWidget(QtWidgets.QLabel('Channel'))
179 -+ self.channel_box = QtWidgets.QComboBox()
180 - self.channel_box.setSizePolicy(sizePolicy)
181 - toprow_layout.addWidget(self.channel_box)
182 -
183 -- toprow_layout.addWidget(QtGui.QLabel('Preset'))
184 -- self.profile_box = QtGui.QComboBox()
185 -+ toprow_layout.addWidget(QtWidgets.QLabel('Preset'))
186 -+ self.profile_box = QtWidgets.QComboBox()
187 - self.profile_box.setSizePolicy(sizePolicy)
188 -- self.profile_box.setInsertPolicy(QtGui.QComboBox.InsertAlphabetically)
189 -- #self.profile_box.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
190 -+ self.profile_box.setInsertPolicy(QtWidgets.QComboBox.InsertAlphabetically)
191 -+ #self.profile_box.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToContents)
192 - toprow_layout.addWidget(self.profile_box)
193 -
194 -- large_icon_size=self.style().pixelMetric(QtGui.QStyle.PM_LargeIconSize)
195 -+ large_icon_size=self.style().pixelMetric(QtWidgets.QStyle.PM_LargeIconSize)
196 - large_icon_size=QtCore.QSize(large_icon_size,large_icon_size)
197 -- save_profile=QtGui.QToolButton()
198 -- save_profile.setIcon(self.style().standardIcon(QtGui.QStyle.SP_DriveFDIcon))
199 -+ save_profile=QtWidgets.QToolButton()
200 -+ save_profile.setIcon(self.style().standardIcon(QtWidgets.QStyle.SP_DriveFDIcon))
201 - save_profile.setIconSize(large_icon_size)
202 - save_profile.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
203 - save_profile.clicked.connect(self.save_profile)
204 -- remove_profile=QtGui.QToolButton()
205 -- remove_profile.setIcon(self.style().standardIcon(QtGui.QStyle.SP_TrashIcon))
206 -+ remove_profile=QtWidgets.QToolButton()
207 -+ remove_profile.setIcon(self.style().standardIcon(QtWidgets.QStyle.SP_TrashIcon))
208 - remove_profile.setIconSize(large_icon_size)
209 - remove_profile.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
210 - remove_profile.clicked.connect(self.remove_profile)
211 - toprow_layout.addWidget(save_profile)
212 - toprow_layout.addWidget(remove_profile)
213 -
214 -- reset_button = QtGui.QPushButton('Reset')
215 -+ reset_button = QtWidgets.QPushButton('Reset')
216 - reset_button.clicked.connect(self.reset)
217 - toprow_layout.addStretch()
218 - toprow_layout.addWidget(reset_button)
219 -@@ -192,11 +192,11 @@ class QPaeq(QtGui.QWidget):
220 - def save_profile(self):
221 - #popup dialog box for name
222 - current=self.profile_box.currentIndex()
223 -- profile,ok=QtGui.QInputDialog.getItem(self,'Preset Name','Preset',self.profiles,current)
224 -+ profile,ok=QtWidgets.QInputDialog.getItem(self,'Preset Name','Preset',self.profiles,current)
225 - if not ok or profile=='':
226 - return
227 - if profile in self.profiles:
228 -- mbox=QtGui.QMessageBox(self)
229 -+ mbox=QtWidgets.QMessageBox(self)
230 - mbox.setText('%s preset already exists'%(profile,))
231 - mbox.setInformativeText('Do you want to save over it?')
232 - mbox.setStandardButtons(mbox.Save|mbox.Discard|mbox.Cancel)
233 -@@ -217,7 +217,7 @@ class QPaeq(QtGui.QWidget):
234 - profile=self.profile_box.itemText(x)
235 - self.filter_state.load_profile(profile)
236 - def select_channel(self,x):
237 -- self.filter_state.channel = self.channel_box.itemData(x).toPyObject()
238 -+ self.filter_state.channel = self.channel_box.itemData(x)
239 - self._set_profile_name()
240 - self.filter_state.readback()
241 -
242 -@@ -295,13 +295,13 @@ class QPaeq(QtGui.QWidget):
243 - self.profile_box.blockSignals(False)
244 -
245 -
246 --class SliderArray(QtGui.QWidget):
247 -+class SliderArray(QtWidgets.QWidget):
248 - def __init__(self,filter_state,parent=None):
249 - super(SliderArray,self).__init__(parent)
250 - #self.setStyleSheet('padding: 0px; border-width: 0px; margin: 0px;')
251 - #self.setStyleSheet('font-family: monospace;'+outline%('blue'))
252 - self.filter_state=filter_state
253 -- self.setLayout(QtGui.QHBoxLayout())
254 -+ self.setLayout(QtWidgets.QHBoxLayout())
255 - self.sub_array=None
256 - self.set_sub_array(SliderArraySub(self.filter_state))
257 - self.inhibit_resize=0
258 -@@ -359,11 +359,11 @@ class SliderArray(QtGui.QWidget):
259 - self.set_sub_array(SliderArraySub(self.filter_state))
260 - self.inhibit_resize-=1
261 -
262 --class SliderArraySub(QtGui.QWidget):
263 -+class SliderArraySub(QtWidgets.QWidget):
264 - def __init__(self,filter_state,parent=None):
265 - super(SliderArraySub,self).__init__(parent)
266 - self.filter_state=filter_state
267 -- self.setLayout(QtGui.QGridLayout())
268 -+ self.setLayout(QtWidgets.QGridLayout())
269 - self.slider=[None]*len(self.filter_state.frequencies)
270 - self.label=[None]*len(self.slider)
271 - #self.setStyleSheet('padding: 0px; border-width: 0px; margin: 0px;')
272 -@@ -375,7 +375,7 @@ class SliderArraySub(QtGui.QWidget):
273 - self.layout().addWidget(label,1,c,qt.AlignHCenter)
274 - self.layout().setColumnMinimumWidth(c,max(label.sizeHint().width(),slider.sizeHint().width()))
275 - def create_slider(slider_label):
276 -- slider=QtGui.QSlider(QtCore.Qt.Vertical,self)
277 -+ slider=QtWidgets.QSlider(QtCore.Qt.Vertical,self)
278 - label=SliderLabel(slider_label,filter_state,self)
279 - slider.setRange(-1000,2000)
280 - slider.setSingleStep(1)
281 -@@ -461,7 +461,7 @@ class SliderArraySub(QtGui.QWidget):
282 - return int((x-1.0)*1000)
283 - outline='border-width: 1px; border-style: solid; border-color: %s;'
284 -
285 --class SliderLabel(QtGui.QLabel):
286 -+class SliderLabel(QtWidgets.QLabel):
287 - clicked=QtCore.pyqtSignal()
288 - def __init__(self,label_text,filter_state,parent=None):
289 - super(SliderLabel,self).__init__(parent)
290 -@@ -566,7 +566,7 @@ def subdivide(xs, t_points):
291 -
292 - def main():
293 - dbus.mainloop.qt.DBusQtMainLoop(set_as_default=True)
294 -- app=QtGui.QApplication(sys.argv)
295 -+ app=QtWidgets.QApplication(sys.argv)
296 - qpaeq_main=QPaeq()
297 - qpaeq_main.show()
298 - sys.exit(app.exec_())
299
300 diff --git a/media-sound/pulseaudio/files/pulseaudio-11.1-qpaeq-pyqt5-2.patch b/media-sound/pulseaudio/files/pulseaudio-11.1-qpaeq-pyqt5-2.patch
301 deleted file mode 100644
302 index 7706bfb3416..00000000000
303 --- a/media-sound/pulseaudio/files/pulseaudio-11.1-qpaeq-pyqt5-2.patch
304 +++ /dev/null
305 @@ -1,31 +0,0 @@
306 -From: Felipe Sateler <fsateler@××××××.org>
307 -Date: Thu, 5 Apr 2018 15:44:26 -0300
308 -Subject: Use the pyqt5 dbus mainloop integration
309 -
310 -Forwarded: https://bugs.freedesktop.org/show_bug.cgi?id=102572
311 ----
312 - src/utils/qpaeq | 4 ++--
313 - 1 file changed, 2 insertions(+), 2 deletions(-)
314 -
315 -diff --git a/src/utils/qpaeq b/src/utils/qpaeq
316 -index 508b233..a319dad 100755
317 ---- a/src/utils/qpaeq
318 -+++ b/src/utils/qpaeq
319 -@@ -20,7 +20,7 @@ import os,math,sys
320 - try:
321 - import PyQt5,sip
322 - from PyQt5 import QtWidgets,QtCore
323 -- import dbus.mainloop.qt
324 -+ import dbus.mainloop.pyqt5
325 - import dbus
326 - except ImportError as e:
327 - sys.stderr.write('There was an error importing needed libraries\n'
328 -@@ -565,7 +565,7 @@ def subdivide(xs, t_points):
329 - return left+right
330 -
331 - def main():
332 -- dbus.mainloop.qt.DBusQtMainLoop(set_as_default=True)
333 -+ dbus.mainloop.pyqt5.DBusQtMainLoop(set_as_default=True)
334 - app=QtWidgets.QApplication(sys.argv)
335 - qpaeq_main=QPaeq()
336 - qpaeq_main.show()
337
338 diff --git a/media-sound/pulseaudio/metadata.xml b/media-sound/pulseaudio/metadata.xml
339 index 25a2d372c61..a0d16e0c781 100644
340 --- a/media-sound/pulseaudio/metadata.xml
341 +++ b/media-sound/pulseaudio/metadata.xml
342 @@ -21,28 +21,18 @@
343 Ensure <pkg>gnome-base/gconf</pkg> is present for pulseaudio GConf
344 to GSettings module automatic migration (keeping the user configuration)
345 </flag>
346 - <flag name="gnome">
347 - Use GConf to store user preferences on streams and so on. Don't
348 - enable this flag if you want to use a system wide instance. If
349 - unsure, enable this flag.
350 - </flag>
351 <flag name="oss">
352 Enable OSS sink/source (output/input). Deprecated, upstream does
353 not support this on systems where other sink/source systems are
354 available (i.e.: Linux). The padsp wrapper is now always build
355 if the system supports OSS at all.
356 </flag>
357 - <flag name="glib" restrict="&lt;media-sound/pulseaudio-12.0">
358 - Add support to <pkg>dev-libs/glib</pkg>-based mainloop for the
359 - libpulse client library, to allow using libpulse on glib-based
360 - programs.
361 - </flag>
362 - <flag name="glib" restrict="&gt;=media-sound/pulseaudio-12.0">
363 + <flag name="glib">
364 Add support to <pkg>dev-libs/glib</pkg>-based mainloop for the
365 libpulse client library, to allow using libpulse on glib-based
366 programs. Build the GSettings PA module.
367 </flag>
368 - <flag name="system-wide" restrict="&gt;=media-sound/pulseaudio-0.9.21.1">
369 + <flag name="system-wide">
370 Allow preparation and installation of the system-wide init
371 script for PulseAudio. Since this support is only supported for
372 embedded situations, do not enable without reading the upstream
373
374 diff --git a/media-sound/pulseaudio/pulseaudio-11.1-r1.ebuild b/media-sound/pulseaudio/pulseaudio-11.1-r1.ebuild
375 deleted file mode 100644
376 index 760c88ca121..00000000000
377 --- a/media-sound/pulseaudio/pulseaudio-11.1-r1.ebuild
378 +++ /dev/null
379 @@ -1,363 +0,0 @@
380 -# Copyright 1999-2018 Gentoo Foundation
381 -# Distributed under the terms of the GNU General Public License v2
382 -
383 -EAPI=6
384 -
385 -inherit autotools bash-completion-r1 eutils flag-o-matic gnome2-utils linux-info systemd user versionator udev multilib-minimal
386 -
387 -DESCRIPTION="A networked sound server with an advanced plugin system"
388 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/"
389 -SRC_URI="https://freedesktop.org/software/pulseaudio/releases/${P}.tar.xz"
390 -
391 -# libpulse-simple and libpulse link to libpulse-core; this is daemon's
392 -# library and can link to gdbm and other GPL-only libraries. In this
393 -# cases, we have a fully GPL-2 package. Leaving the rest of the
394 -# GPL-forcing USE flags for those who use them.
395 -# qpaeq equalizer pyqt GUI frontend is AGPL-3+
396 -LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 ) equalizer? ( AGPL-3+ )"
397 -
398 -SLOT="0"
399 -KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
400 -
401 -# +alsa-plugin as discussed in bug #519530
402 -IUSE="+alsa +alsa-plugin +asyncns bluetooth +caps dbus doc equalizer +gdbm +glib
403 -gnome gtk ipv6 jack libsamplerate libressl lirc native-headset neon ofono-headset
404 -+orc oss qt5 realtime selinux sox ssl systemd system-wide tcpd test +udev
405 -+webrtc-aec +X zeroconf"
406 -
407 -# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
408 -REQUIRED_USE="
409 - bluetooth? ( dbus )
410 - equalizer? ( dbus )
411 - ofono-headset? ( bluetooth )
412 - native-headset? ( bluetooth )
413 - udev? ( || ( alsa oss ) )
414 -"
415 -
416 -# libpcre needed in some cases, bug #472228
417 -RDEPEND="
418 - || (
419 - elibc_glibc? ( virtual/libc )
420 - elibc_uclibc? ( virtual/libc )
421 - dev-libs/libpcre
422 - )
423 - >=media-libs/libsndfile-1.0.20[${MULTILIB_USEDEP}]
424 - X? (
425 - >=x11-libs/libX11-1.4.0[${MULTILIB_USEDEP}]
426 - >=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}]
427 - x11-libs/libSM[${MULTILIB_USEDEP}]
428 - x11-libs/libICE[${MULTILIB_USEDEP}]
429 - x11-libs/libXtst[${MULTILIB_USEDEP}]
430 - )
431 - caps? ( >=sys-libs/libcap-2.22-r2[${MULTILIB_USEDEP}] )
432 - libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 )
433 - alsa? ( >=media-libs/alsa-lib-1.0.19 )
434 - glib? ( >=dev-libs/glib-2.4.0:2[${MULTILIB_USEDEP}] )
435 - zeroconf? ( >=net-dns/avahi-0.6.12[dbus] )
436 - jack? ( virtual/jack )
437 - tcpd? ( sys-apps/tcp-wrappers[${MULTILIB_USEDEP}] )
438 - lirc? ( app-misc/lirc )
439 - dbus? ( >=sys-apps/dbus-1.0.0[${MULTILIB_USEDEP}] )
440 - gtk? ( x11-libs/gtk+:3 )
441 - gnome? ( >=gnome-base/gconf-2.4.0 )
442 - bluetooth? (
443 - >=net-wireless/bluez-5
444 - >=sys-apps/dbus-1.0.0
445 - media-libs/sbc
446 - )
447 - asyncns? ( net-libs/libasyncns[${MULTILIB_USEDEP}] )
448 - udev? ( >=virtual/udev-143[hwdb(+)] )
449 - realtime? ( sys-auth/rtkit )
450 - equalizer? ( sci-libs/fftw:3.0 )
451 - ofono-headset? ( >=net-misc/ofono-1.13 )
452 - orc? ( >=dev-lang/orc-0.4.15 )
453 - sox? ( >=media-libs/soxr-0.1.1 )
454 - ssl? (
455 - !libressl? ( dev-libs/openssl:0= )
456 - libressl? ( dev-libs/libressl:= )
457 - )
458 - media-libs/speexdsp
459 - gdbm? ( sys-libs/gdbm:= )
460 - webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2 )
461 - systemd? ( sys-apps/systemd:0=[${MULTILIB_USEDEP}] )
462 - dev-libs/libltdl:0
463 - selinux? ( sec-policy/selinux-pulseaudio )
464 -"
465 -# it's a valid RDEPEND, libltdl.so is used for native abi
466 -
467 -DEPEND="${RDEPEND}
468 - sys-devel/m4
469 - doc? ( app-doc/doxygen )
470 - test? ( >=dev-libs/check-0.9.10 )
471 - X? (
472 - x11-base/xorg-proto
473 - >=x11-libs/libXtst-1.0.99.2[${MULTILIB_USEDEP}]
474 - )
475 - dev-libs/libatomic_ops
476 - virtual/pkgconfig
477 - system-wide? ( || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) )
478 - dev-util/intltool
479 - >=sys-devel/gettext-0.18.1
480 -"
481 -# This is a PDEPEND to avoid a circular dep
482 -PDEPEND="
483 - alsa? ( alsa-plugin? ( >=media-plugins/alsa-plugins-1.0.27-r1[pulseaudio,${MULTILIB_USEDEP}] ) )
484 -"
485 -
486 -# alsa-utils dep is for the alsasound init.d script (see bug #155707)
487 -# bluez dep is for the bluetooth init.d script
488 -# PyQt5 dep is for the qpaeq script
489 -RDEPEND="${RDEPEND}
490 - equalizer? ( qt5? ( dev-python/PyQt5[dbus,widgets] ) )
491 - system-wide? (
492 - alsa? ( media-sound/alsa-utils )
493 - bluetooth? ( >=net-wireless/bluez-5 )
494 - )
495 -"
496 -
497 -PATCHES=(
498 - "${FILESDIR}/${P}"-qpaeq-pyqt5-{1,2}.patch
499 - "${FILESDIR}/${P}"-glibc-2.27.patch
500 - "${FILESDIR}/${P}"-disable-flat-volumes.patch # bug 627894
501 -)
502 -
503 -pkg_pretend() {
504 - CONFIG_CHECK="~HIGH_RES_TIMERS"
505 - WARNING_HIGH_RES_TIMERS="CONFIG_HIGH_RES_TIMERS:\tis not set (required for enabling timer-based scheduling in pulseaudio)\n"
506 - check_extra_config
507 -
508 - if linux_config_exists; then
509 - local snd_hda_prealloc_size=$(linux_chkconfig_string SND_HDA_PREALLOC_SIZE)
510 - if [ -n "${snd_hda_prealloc_size}" ] && [ "${snd_hda_prealloc_size}" -lt 2048 ]; then
511 - ewarn "A preallocated buffer-size of 2048 (kB) or higher is recommended for the HD-audio driver!"
512 - ewarn "CONFIG_SND_HDA_PREALLOC_SIZE=${snd_hda_prealloc_size}"
513 - fi
514 - fi
515 -}
516 -
517 -pkg_setup() {
518 - linux-info_pkg_setup
519 - gnome2_environment_reset #543364
520 -
521 - enewgroup audio 18 # Just make sure it exists
522 -
523 - if use system-wide; then
524 - enewgroup pulse-access
525 - enewgroup pulse
526 - enewuser pulse -1 -1 /var/run/pulse pulse,audio
527 - fi
528 -}
529 -
530 -src_prepare() {
531 - default
532 -
533 - # Skip test that cannot work with sandbox, bug #501846
534 - sed -i -e '/lock-autospawn-test/d' src/Makefile.am || die
535 -
536 - eautoreconf
537 -}
538 -
539 -multilib_src_configure() {
540 - local myconf=()
541 -
542 - if use gdbm; then
543 - myconf+=( --with-database=gdbm )
544 - else
545 - myconf+=( --with-database=simple )
546 - fi
547 -
548 - if use bluetooth; then
549 - if multilib_is_native_abi; then
550 - myconf+=( --enable-bluez5 --disable-bluez4
551 - $(use_enable native-headset bluez5-native-headset)
552 - $(use_enable ofono-headset bluez5-ofono-headset) )
553 - fi
554 - else
555 - myconf+=( --disable-bluez5 --disable-bluez4 )
556 - fi
557 -
558 - myconf+=(
559 - --enable-largefile
560 - $(use_enable glib glib2)
561 - --disable-solaris
562 - $(use_enable asyncns)
563 - $(use_enable oss oss-output)
564 - $(use_enable alsa)
565 - $(use_enable lirc)
566 - $(use_enable neon neon-opt)
567 - $(use_enable tcpd tcpwrap)
568 - $(use_enable jack)
569 - $(use_enable zeroconf avahi)
570 - $(use_enable dbus)
571 - $(use_enable gnome gconf)
572 - $(use_enable gtk gtk3)
573 - $(use_enable libsamplerate samplerate)
574 - $(use_enable orc)
575 - $(use_enable X x11)
576 - $(use_enable test default-build-tests)
577 - $(use_enable udev)
578 - $(use_with sox soxr)
579 - $(use_enable systemd systemd-daemon)
580 - $(use_enable systemd systemd-login)
581 - $(use_enable systemd systemd-journal)
582 - $(use_enable ipv6)
583 - $(use_enable ssl openssl)
584 - $(use_enable webrtc-aec)
585 - $(use_with caps)
586 - $(use_with equalizer fftw)
587 - --disable-adrian-aec
588 - --disable-esound
589 - --localstatedir="${EPREFIX}"/var
590 - --with-udev-rules-dir="${EPREFIX}/$(get_udevdir)"/rules.d
591 - --with-systemduserunitdir=$(systemd_get_userunitdir)
592 - )
593 -
594 - if ! multilib_is_native_abi; then
595 - # disable all the modules and stuff
596 - myconf+=(
597 - --disable-oss-output
598 - --disable-alsa
599 - --disable-lirc
600 - --disable-jack
601 - --disable-avahi
602 - --disable-gconf
603 - --disable-gtk3
604 - --disable-samplerate
605 - --disable-bluez4
606 - --disable-bluez5
607 - --disable-udev
608 - --disable-openssl
609 - --disable-orc
610 - --disable-webrtc-aec
611 - --without-fftw
612 - --without-soxr
613 -
614 - # tests involve random modules, so just do them for the native
615 - --disable-default-build-tests
616 -
617 - # hack around unnecessary checks
618 - # (results don't matter, we're not building anything using it)
619 - ac_cv_lib_ltdl_lt_dladvise_init=yes
620 - --with-database=simple
621 - LIBSPEEX_CFLAGS=' '
622 - LIBSPEEX_LIBS=' '
623 - )
624 - fi
625 -
626 - ECONF_SOURCE=${S} \
627 - econf "${myconf[@]}"
628 -}
629 -
630 -multilib_src_compile() {
631 - if multilib_is_native_abi; then
632 - emake
633 - use doc && emake doxygen
634 - else
635 - local targets=( libpulse.la libpulsedsp.la libpulse-simple.la )
636 - use glib && targets+=( libpulse-mainloop-glib.la )
637 - emake -C src ${targets[*]}
638 - fi
639 -}
640 -
641 -multilib_src_test() {
642 - # We avoid running the toplevel check target because that will run
643 - # po/'s tests too, and they are broken. Officially, it should work
644 - # with intltool 0.41, but that doesn't look like a stable release.
645 - if multilib_is_native_abi; then
646 - emake -C src check
647 - fi
648 -}
649 -
650 -multilib_src_install() {
651 - if multilib_is_native_abi; then
652 - emake -j1 DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)" install
653 - use doc && dohtml -r doxygen/html/
654 - else
655 - local targets=( libpulse.la libpulse-simple.la )
656 - use glib && targets+=( libpulse-mainloop-glib.la )
657 - emake DESTDIR="${D}" install-pkgconfigDATA
658 - emake DESTDIR="${D}" -C src \
659 - install-libLTLIBRARIES \
660 - install-padsplibLTLIBRARIES \
661 - lib_LTLIBRARIES="${targets[*]}" \
662 - install-pulseincludeHEADERS
663 - fi
664 -}
665 -
666 -multilib_src_install_all() {
667 - # Drop the script entirely if X is disabled
668 - use X || rm "${ED}"/usr/bin/start-pulseaudio-x11
669 -
670 - if use system-wide; then
671 - newconfd "${FILESDIR}/pulseaudio.conf.d" pulseaudio
672 -
673 - use_define() {
674 - local define=${2:-$(echo $1 | tr '[:lower:]' '[:upper:]')}
675 -
676 - use "$1" && echo "-D$define" || echo "-U$define"
677 - }
678 -
679 - unifdef $(use_define zeroconf AVAHI) \
680 - $(use_define alsa) \
681 - $(use_define bluetooth) \
682 - $(use_define udev) \
683 - "${FILESDIR}/pulseaudio.init.d-5" \
684 - > "${T}/pulseaudio"
685 -
686 - doinitd "${T}/pulseaudio"
687 -
688 - systemd_dounit "${FILESDIR}/${PN}.service"
689 - fi
690 -
691 - use zeroconf && sed -i -e '/module-zeroconf-publish/s:^#::' "${ED}/etc/pulse/default.pa"
692 -
693 - dodoc NEWS README todo
694 -
695 - # Create the state directory
696 - use prefix || diropts -o pulse -g pulse -m0755
697 -
698 - # We need /var/run/pulse, bug #442852
699 - use system-wide && systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}.conf"
700 -
701 - # Prevent warnings when system-wide is not used, bug #447694
702 - use system-wide || rm "${ED}"/etc/dbus-1/system.d/pulseaudio-system.conf
703 -
704 - prune_libtool_files --all
705 -}
706 -
707 -pkg_postinst() {
708 - if use system-wide; then
709 - elog "You have enabled the 'system-wide' USE flag for pulseaudio."
710 - elog "This mode should only be used on headless servers, embedded systems,"
711 - elog "or thin clients. It will usually require manual configuration, and is"
712 - elog "incompatible with many expected pulseaudio features."
713 - elog "On normal desktop systems, system-wide mode is STRONGLY DISCOURAGED."
714 - elog "For more information, see"
715 - elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/"
716 - elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/"
717 - elog " https://wiki.gentoo.org/wiki/PulseAudio#Headless_server"
718 - if use gnome ; then
719 - elog
720 - elog "By enabling gnome USE flag, you enabled gconf support. Please note"
721 - elog "that you might need to remove the gnome USE flag or disable the"
722 - elog "gconf module on /etc/pulse/system.pa to be able to use PulseAudio"
723 - elog "with a system-wide instance."
724 - fi
725 - fi
726 -
727 - if use equalizer && ! use qt5; then
728 - elog "You've enabled the 'equalizer' USE-flag but not the 'qt5' USE-flag."
729 - elog "This will build the equalizer module, but the 'qpaeq' tool"
730 - elog "which is required to set equalizer levels will not work."
731 - fi
732 -
733 - if use native-headset && use ofono-headset; then
734 - elog "You have enabled both native and ofono headset profiles. The runtime decision"
735 - elog "which to use is done via the 'headset' argument of module-bluetooth-discover."
736 - fi
737 -
738 - if use libsamplerate; then
739 - elog "The libsamplerate based resamplers are now deprecated, because they offer no"
740 - elog "particular advantage over speex. Upstream suggests disabling them."
741 - fi
742 -}