Package-Manager: Portage-3.0.19, Repoman-3.0.3
This commit is contained in:
Guillaume Castagnino 2021-06-14 10:06:29 +02:00
parent c7d99e867f
commit a71d1b6af4
4 changed files with 361 additions and 376 deletions

View file

@ -2,7 +2,6 @@ AUX pulseaudio.conf.d 151 BLAKE2B 99b185b9353259f37f3396c6f2bb56b80cac0159c9c5d0
AUX pulseaudio.init.d-5 2224 BLAKE2B 5a631592dabbafaff989fdfc48174038265b32902cd3d714f2662ba3affc2a4f64fc9cbb6503ef88f03042f709465beb463b4e635bcc2ecbceb3ae2153d5b536 SHA512 1e32465414a32954febd9353fae2728e9b9e949c354b2abc713edc30a3c3ee8189d066cc02925a0551f0701a14cb834a18d8cbca159f48bd4d5311a88cd06c83
AUX pulseaudio.service 227 BLAKE2B f58fa701152e84f4d52426f6f76b5a01a1a315d09e5fb8e9e57860b44dc63b78b3f1c1629380b4345c53b003c677f729b3959419e8488e37607c56d6a700626a SHA512 567663b231fe7c2682b08b1059cdad1fcb3c4cb01c1b24aed9afb6fb767b30f250b78bbbed48aadfb06c6d1a4963a6db24877d79a1d36c4be2a128b479c086d6
AUX pulseaudio.tmpfiles 36 BLAKE2B 4fe7c88fb35f561b0eb756146db17e37201126b5d7f906c88cdc778c6191f17c799f1db072f09d5a384485830e4d33266c224955bad22081255544642399b2f6 SHA512 f040850d81030ef04e1aa368d333a1ae1b7238adef5772280fc344c3068262d5ab8c9f3edb92db9c443f9d7d21abb27583ea1efc51ed733bbfa43e2edc68dde1
DIST pulseaudio-14.0-hsphfpd.patch.xz 52544 BLAKE2B 0d39b2d9eecf2494988bfe44cc4b68dd68d772dfc38368520aa54b7420f1448101ee80dc16547a1a07f054bc7e09e22537052c6976fff7ca70af94f06aed2ca2 SHA512 8b3130d63524d9686bba459ed96872fb7bd363b14a60e63a2712974acfdcbb0bffeffc8b76a18463af4d544bc688506a957c3e4531f4593afb89850429311c84
DIST pulseaudio-14.0.tar.xz 1980800 BLAKE2B 891f87b58240edfa8ce3f7242021c692e9e21c393fcff0c7d0c60d226b75bf4bc2755b3facc76176e7d2a80f4a23a9a0aad7778b7593604f88c85a8d029aa2e9 SHA512 0c89806c00d2719cb981b2f8883bedd9bf63b16f0347d8591b8b33cc1f8c1d7864d4bcc80016308d1cede5eff2c7d5eb90a340c004047235463c7a6d1c6ec65f
EBUILD pulseaudio-14.0.ebuild 11260 BLAKE2B 25b75a7304f6f74039227569f30d1db15b9f39c8069505fc50cf70b7ad8a1b020065df2a8855f1ee4fd6badabbf087e0b5a41851ec346a0711d88cd3fb64cc01 SHA512 9ae5037ac84ca3277cea84554d4f1069edce3c8c908cae3b71c642096db76a4a172141cf3e6127c618a1ca59723d659450916c5501d58e9f09975926f05374a6
MISC metadata.xml 3399 BLAKE2B cc52841420a9a6232ceb417c06b8275545af8065e0395d965d3fb5ac333d845bf9d89e61a114e00d28ecd097d47dee820336f17d7848051dd622280550cf36ce SHA512 8a0ba0aab22dac00d67a626d53dad3679e9347daf0c5cb74f9976d07c6ca9b500d8e5e96175d92f598463c7fbdb15bad05ae30bc02c77e3ddab8a61380b96db5
DIST pulseaudio-14.99.1_p20210607.tar.gz 2728176 BLAKE2B 7d6b8fcffa873e88f055ce68a4cdd32f51d370d52bddc818e9b4566fdd56b36bc335344113ef7fc886e968de888a830c7c5c7150e9d5ccdd53a6e407cc9757b9 SHA512 b2b978bab7bf2fd0745bf0d9fc1757e1528b23d91bdd18bc8bdfb25b9e24b74f371eae1cdbc2450afb94c86ba891648d7baa0ce26bac123935186db4e908091c
EBUILD pulseaudio-14.99.1_p20210607.ebuild 11594 BLAKE2B 25d2ecbd46a4ea93cfe41b5303ede7d5dea07f1a0a1df641a752ebb2b5b84ea38765bf307709961d697b9613d4b5f5479bebe2c275d1befbe3e2709d94cff391 SHA512 b54a1567d34c65c5aae2b61ef40ed190f010e5bcf1877c3192f9156acee1dc1a2511609c8033dcfa3647aa2f6aaccf0b291be7c54b280cdb79c8cbf590417ad5
MISC metadata.xml 3201 BLAKE2B e689776e5b32d34c1a42458dc705ae3e242c7596d6b9be1e4e42e58ef3212e56569aa8b330ad40551a6c877d62e74aae91875279d384a71483fd08cbfa8ea9c3 SHA512 a510ad29a228bd014a682576598bc279999db5900eadc4fe654792b1475220cd20dfc8d5a95214a9d87e7f0f3bef418e2da7b5423ac42585e26585873841c3b1

View file

@ -17,10 +17,10 @@
PulseAudio plugin enabled. This ensures that clients supporting
ALSA only will use PulseAudio.
</flag>
<flag name="daemon">Build the pulseaudio binary (not-needed for pipewire-pulse)</flag>
<flag name="elogind">Use <pkg>sys-auth/elogind</pkg> for giving each session a PA client</flag>
<flag name="gconf">
Ensure <pkg>gnome-base/gconf</pkg> is present for pulseaudio GConf
to GSettings module automatic migration (keeping the user configuration)
<flag name="forget-missing">
Enables clearing of unavailable devices from database files which is recommended for GNOME.
</flag>
<flag name="oss">
Enable OSS sink/source (output/input). Deprecated, upstream does
@ -42,10 +42,6 @@
</flag>
<flag name="asyncns">Use libasyncns for asynchronous name resolution.</flag>
<flag name="doc">Build the doxygen-described API documentation.</flag>
<flag name="realtime">
Makes PulseAudio use RealtimeKit (<pkg>sys-auth/rtkit</pkg>) to get
real-time priority while running.
</flag>
<flag name="equalizer">
Enable the equalizer module (requires <pkg>sci-libs/fftw</pkg>).
</flag>
@ -67,14 +63,11 @@
Build with <pkg>sys-apps/systemd</pkg> support to replace standalone
ConsoleKit.
</flag>
<flag name="aptx">
Add aptX proprietary codec support.
</flag>
<flag name="legacy-headset">
Build with legacy native HSP backend for bluez 5. Broken. Do not use.
</flag>
<flag name="native-headset">
Build with native HSP backend for bluez 5 using hsphspd daemon.
Build with native HSP backend for bluez 5.
</flag>
<flag name="ofono-headset">
Build with oFono HFP backend for bluez 5, requires <pkg>net-misc/ofono</pkg>.
</flag>
</use>
</pkgmetadata>

View file

@ -1,358 +0,0 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools bash-completion-r1 flag-o-matic gnome2-utils linux-info systemd user udev multilib-minimal
DESCRIPTION="A networked sound server with an advanced plugin system"
HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/"
SRC_URI="https://freedesktop.org/software/pulseaudio/releases/${P}.tar.xz
https://gentoo.xwing.info/distfiles/${P}-hsphfpd.patch.xz"
# libpulse-simple and libpulse link to libpulse-core; this is daemon's
# library and can link to gdbm and other GPL-only libraries. In this
# cases, we have a fully GPL-2 package. Leaving the rest of the
# GPL-forcing USE flags for those who use them.
LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 )"
SLOT="0"
KEYWORDS="~amd64 ~x86"
# +alsa-plugin as discussed in bug #519530
IUSE="+alsa +alsa-plugin aptx +asyncns bluetooth +caps dbus doc equalizer elogind gconf
+gdbm +glib gtk ipv6 jack legacy-headset libsamplerate libressl lirc native-headset cpu_flags_arm_neon
+orc oss qt5 realtime selinux sox ssl systemd system-wide tcpd test
+udev +webrtc-aec +X zeroconf"
RESTRICT="!test? ( test )"
# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
REQUIRED_USE="
?? ( elogind systemd )
bluetooth? ( dbus )
equalizer? ( dbus )
legacy-headset? ( bluetooth )
native-headset? ( bluetooth )
realtime? ( dbus )
udev? ( || ( alsa oss ) )
"
# libpcre needed in some cases, bug #472228
CDEPEND="
|| (
elibc_glibc? ( virtual/libc )
elibc_uclibc? ( virtual/libc )
dev-libs/libpcre
)
>=media-libs/libsndfile-1.0.20[${MULTILIB_USEDEP}]
X? (
>=x11-libs/libX11-1.4.0[${MULTILIB_USEDEP}]
>=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}]
x11-libs/libSM[${MULTILIB_USEDEP}]
x11-libs/libICE[${MULTILIB_USEDEP}]
x11-libs/libXtst[${MULTILIB_USEDEP}]
)
caps? ( >=sys-libs/libcap-2.22-r2[${MULTILIB_USEDEP}] )
libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 )
alsa? ( >=media-libs/alsa-lib-1.0.19 )
aptx? ( media-libs/libopenaptx )
glib? ( >=dev-libs/glib-2.26.0:2[${MULTILIB_USEDEP}] )
zeroconf? ( >=net-dns/avahi-0.6.12[dbus] )
jack? ( virtual/jack )
tcpd? ( sys-apps/tcp-wrappers[${MULTILIB_USEDEP}] )
lirc? ( app-misc/lirc )
dbus? ( >=sys-apps/dbus-1.0.0[${MULTILIB_USEDEP}] )
gtk? ( x11-libs/gtk+:3 )
bluetooth? (
>=net-wireless/bluez-5
>=sys-apps/dbus-1.0.0
media-libs/sbc
)
native-headset? ( net-wireless/hsphfpd )
asyncns? ( net-libs/libasyncns[${MULTILIB_USEDEP}] )
udev? ( >=virtual/udev-143[hwdb(+)] )
equalizer? ( sci-libs/fftw:3.0 )
orc? ( >=dev-lang/orc-0.4.15 )
sox? ( >=media-libs/soxr-0.1.1 )
ssl? (
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:= )
)
media-libs/speexdsp
gdbm? ( sys-libs/gdbm:= )
webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2 )
elogind? ( sys-auth/elogind )
systemd? ( sys-apps/systemd:0=[${MULTILIB_USEDEP}] )
dev-libs/libltdl:0
selinux? ( sec-policy/selinux-pulseaudio )
" # libltdl is a valid RDEPEND, libltdl.so is used for native abi in pulsecore and daemon
RDEPEND="${CDEPEND}
realtime? ( sys-auth/rtkit )
gconf? ( >=gnome-base/gconf-3.2.6 )
"
DEPEND="${RDEPEND}
sys-devel/m4
doc? ( app-doc/doxygen )
test? ( >=dev-libs/check-0.9.10 )
X? (
x11-base/xorg-proto
>=x11-libs/libXtst-1.0.99.2[${MULTILIB_USEDEP}]
)
dev-libs/libatomic_ops
virtual/pkgconfig
system-wide? ( dev-util/unifdef )
>=sys-devel/gettext-0.19.3
"
# This is a PDEPEND to avoid a circular dep
PDEPEND="
alsa? ( alsa-plugin? ( >=media-plugins/alsa-plugins-1.0.27-r1[pulseaudio,${MULTILIB_USEDEP}] ) )
"
# alsa-utils dep is for the alsasound init.d script (see bug #155707)
# bluez dep is for the bluetooth init.d script
# PyQt5 dep is for the qpaeq script
RDEPEND="${RDEPEND}
equalizer? ( qt5? ( dev-python/PyQt5[dbus,widgets] ) )
system-wide? (
alsa? ( media-sound/alsa-utils )
bluetooth? ( >=net-wireless/bluez-5 )
)
"
PATCHES=(
"${WORKDIR}/${P}-hsphfpd.patch"
)
pkg_pretend() {
CONFIG_CHECK="~HIGH_RES_TIMERS"
WARNING_HIGH_RES_TIMERS="CONFIG_HIGH_RES_TIMERS:\tis not set (required for enabling timer-based scheduling in pulseaudio)\n"
check_extra_config
if linux_config_exists; then
local snd_hda_prealloc_size=$(linux_chkconfig_string SND_HDA_PREALLOC_SIZE)
if [ -n "${snd_hda_prealloc_size}" ] && [ "${snd_hda_prealloc_size}" -lt 2048 ]; then
ewarn "A preallocated buffer-size of 2048 (kB) or higher is recommended for the HD-audio driver!"
ewarn "CONFIG_SND_HDA_PREALLOC_SIZE=${snd_hda_prealloc_size}"
fi
fi
}
pkg_setup() {
linux-info_pkg_setup
gnome2_environment_reset #543364
enewgroup audio 18 # Just make sure it exists
if use system-wide; then
enewgroup pulse-access
enewgroup pulse
enewuser pulse -1 -1 /var/run/pulse pulse,audio
fi
}
src_prepare() {
default
# Skip test that cannot work with sandbox, bug #501846
sed -i -e '/lock-autospawn-test /d' src/Makefile.am || die
sed -i -e 's/lock-autospawn-test$(EXEEXT) //' src/Makefile.in || die
eautoreconf
}
multilib_src_configure() {
local myconf=(
--disable-adrian-aec
--disable-esound
--disable-gconf
--disable-solaris
--enable-largefile
--localstatedir="${EPREFIX}"/var
--with-systemduserunitdir=$(systemd_get_userunitdir)
--with-udev-rules-dir="${EPREFIX}/$(get_udevdir)"/rules.d
$(multilib_native_use_enable alsa)
$(multilib_native_use_enable aptx)
$(multilib_native_use_enable bluetooth bluez5)
$(multilib_native_use_enable glib gsettings)
$(multilib_native_use_enable gtk gtk3)
$(multilib_native_use_enable jack)
$(multilib_native_use_enable libsamplerate samplerate)
$(multilib_native_use_enable lirc)
$(multilib_native_use_enable orc)
$(multilib_native_use_enable oss oss-output)
$(multilib_native_use_enable ssl openssl)
# tests involve random modules, so just do them for the native
$(multilib_native_use_enable test default-build-tests)
$(multilib_native_use_enable udev)
$(multilib_native_use_enable webrtc-aec)
$(multilib_native_use_enable zeroconf avahi)
$(multilib_native_use_with equalizer fftw)
$(multilib_native_use_with sox soxr)
$(multilib_native_usex gdbm '--with-database=gdbm' '--with-database=simple')
$(use_enable glib glib2)
$(use_enable asyncns)
$(use_enable cpu_flags_arm_neon neon-opt)
$(use_enable tcpd tcpwrap)
$(use_enable dbus)
$(use_enable X x11)
$(use_enable systemd systemd-daemon)
# systemd-login isn't necessary for non-native, but the rest of systemd are; not changing it at this point close to a meson port
$(use_enable systemd systemd-login)
$(use_enable systemd systemd-journal)
$(use_enable ipv6)
$(use_with caps)
)
if use elogind && multilib_is_native_abi; then
myconf+=(
--enable-systemd-login
SYSTEMDLOGIN_CFLAGS=`pkg-config --cflags "libelogind" 2>/dev/null`
SYSTEMDLOGIN_LIBS=`pkg-config --libs "libelogind" 2>/dev/null`
)
fi
if use bluetooth; then
myconf+=(
$(multilib_native_use_enable legacy-headset bluez5-legacy-hsp)
)
fi
if ! multilib_is_native_abi; then
myconf+=(
# hack around unnecessary checks
# (results don't matter, we're not building anything using it)
ac_cv_lib_ltdl_lt_dladvise_init=yes
LIBSPEEX_CFLAGS=' '
LIBSPEEX_LIBS=' '
)
else
# Make padsp work for non-native ABI, supposedly only possible with glibc; this is used by /usr/bin/padsp that comes from native build, thus we need this argument for native build
if use elibc_glibc ; then
myconf+=( --with-pulsedsp-location="${EPREFIX}"'/usr/\\$$LIB/pulseaudio' )
fi
fi
ECONF_SOURCE=${S} \
econf "${myconf[@]}"
}
multilib_src_compile() {
if multilib_is_native_abi; then
emake
use doc && emake doxygen
else
local targets=( libpulse.la libpulsedsp.la libpulse-simple.la )
use glib && targets+=( libpulse-mainloop-glib.la )
emake -C src ${targets[*]}
fi
}
multilib_src_test() {
# We avoid running the toplevel check target because that will run
# po/'s tests too, and they are broken. Officially, it should work
# with intltool 0.41, but that doesn't look like a stable release.
if multilib_is_native_abi; then
emake -C src check
fi
}
multilib_src_install() {
if multilib_is_native_abi; then
emake -j1 DESTDIR="${D}" bashcompletiondir="$(get_bashcompdir)" install
if use doc ; then
docinto html
dodoc -r doxygen/html/
fi
else
local targets=( libpulse.la libpulse-simple.la )
use glib && targets+=( libpulse-mainloop-glib.la )
emake DESTDIR="${D}" install-pkgconfigDATA
emake DESTDIR="${D}" -C src \
install-libLTLIBRARIES \
install-padsplibLTLIBRARIES \
lib_LTLIBRARIES="${targets[*]}" \
install-pulseincludeHEADERS
fi
}
multilib_src_install_all() {
if use system-wide; then
newconfd "${FILESDIR}/pulseaudio.conf.d" pulseaudio
use_define() {
local define=${2:-$(echo $1 | tr '[:lower:]' '[:upper:]')}
use "$1" && echo "-D$define" || echo "-U$define"
}
unifdef $(use_define zeroconf AVAHI) \
$(use_define alsa) \
$(use_define bluetooth) \
$(use_define udev) \
"${FILESDIR}/pulseaudio.init.d-5" \
> "${T}/pulseaudio"
doinitd "${T}/pulseaudio"
systemd_dounit "${FILESDIR}/${PN}.service"
# We need /var/run/pulse, bug #442852
systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}.conf"
else
# Prevent warnings when system-wide is not used, bug #447694
if use dbus ; then
rm "${ED%/}"/etc/dbus-1/system.d/pulseaudio-system.conf || die
fi
fi
if use zeroconf ; then
sed -e '/module-zeroconf-publish/s:^#::' \
-i "${ED%/}/etc/pulse/default.pa" || die
fi
dodoc NEWS README todo
# Create the state directory
use prefix || diropts -o pulse -g pulse -m0755
find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die
}
pkg_postinst() {
gnome2_schemas_update
if use system-wide; then
elog "You have enabled the 'system-wide' USE flag for pulseaudio."
elog "This mode should only be used on headless servers, embedded systems,"
elog "or thin clients. It will usually require manual configuration, and is"
elog "incompatible with many expected pulseaudio features."
elog "On normal desktop systems, system-wide mode is STRONGLY DISCOURAGED."
elog "For more information, see"
elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/"
elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/"
elog " https://wiki.gentoo.org/wiki/PulseAudio#Headless_server"
fi
if use equalizer && ! use qt5; then
elog "You've enabled the 'equalizer' USE-flag but not the 'qt5' USE-flag."
elog "This will build the equalizer module, but the 'qpaeq' tool"
elog "which is required to set equalizer levels will not work."
fi
if use equalizer && use qt5; then
elog "You will need to load some extra modules to make qpaeq work."
elog "You can do that by adding the following two lines in"
elog "/etc/pulse/default.pa and restarting pulseaudio:"
elog "load-module module-equalizer-sink"
elog "load-module module-dbus-protocol"
fi
if use libsamplerate; then
elog "The libsamplerate based resamplers are now deprecated, because they offer no"
elog "particular advantage over speex. Upstream suggests disabling them."
fi
}
pkg_postrm() {
gnome2_schemas_update
}

View file

@ -0,0 +1,351 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit meson-multilib bash-completion-r1 gnome2-utils optfeature systemd udev
# When COMMIT is defined, this ebuild turns from a release into a snapshot ebuild:
COMMIT="79cb1369fc4d22966cb65253e9da2ccda2f25b45"
# Also set SNAPSHOT_PV to match the expected PV, so that the ebuild can detect a naive rename:
SNAPSHOT_PV="14.99.1_p20210607"
# When COMMIT is defined, this enables a PA specific work-around for missing .tarball-version file:
SNAPSHOT_FIX_GITVERSION=1
DESCRIPTION="A networked sound server with an advanced plugin system"
HOMEPAGE="https://www.freedesktop.org/wiki/Software/PulseAudio/"
if [[ ${PV} = 9999 ]]; then
inherit git-r3
EGIT_BRANCH="master"
EGIT_REPO_URI="https://gitlab.freedesktop.org/${PN}/${PN}"
else
if [[ -n ${COMMIT} ]]; then
SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${COMMIT}/${PN}-${COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}"/${PN}-${COMMIT}
else
SRC_URI="https://freedesktop.org/software/${PN}/releases/${P}.tar.xz"
fi
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
fi
# libpulse-simple and libpulse link to libpulse-core; this is daemon's
# library and can link to gdbm and other GPL-only libraries. In this
# cases, we have a fully GPL-2 package. Leaving the rest of the
# GPL-forcing USE flags for those who use them.
LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 )"
SLOT="0"
# +alsa-plugin as discussed in bug #519530
# TODO: Deal with bluez5-gstreamer
# TODO: Find out why webrtc-aec is + prefixed - there's already the always available speexdsp-aec
# NOTE: The current ebuild sets +X almost certainly just for the pulseaudio.desktop file
IUSE="+alsa +alsa-plugin +asyncns bluetooth dbus +daemon doc elogind equalizer forget-missing +gdbm
gstreamer +glib gtk ipv6 jack lirc native-headset ofono-headset +orc oss selinux sox ssl systemd
system-wide tcpd test +udev +webrtc-aec +X zeroconf"
RESTRICT="!test? ( test )"
# See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
# Basically all IUSE are either ${MULTILIB_USEDEP} for client libs or they belong under !daemon ()
# We duplicate alsa-plugin, {native,ofono}-headset under daemon to let users deal with them at once
REQUIRED_USE="
alsa-plugin? ( alsa )
bluetooth? ( dbus )
daemon? ( ?? ( elogind systemd ) )
!daemon? (
!alsa
!alsa-plugin
!bluetooth
!equalizer
!gdbm
!gtk
!jack
!lirc
!native-headset
!ofono-headset
!orc
!oss
!sox
!ssl
!system-wide
!udev
!webrtc-aec
!zeroconf
)
equalizer? ( dbus )
native-headset? ( bluetooth )
ofono-headset? ( bluetooth )
udev? ( || ( alsa oss ) )
zeroconf? ( dbus )
"
# libpcre needed in some cases, bug #472228 # TODO: Read it
RDEPEND="
virtual/libc
>=media-libs/libsndfile-1.0.20[${MULTILIB_USEDEP}]
X? (
>=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}]
daemon? (
>=x11-libs/libX11-1.4.0
x11-libs/libSM
x11-libs/libICE
>=x11-libs/libXtst-1.0.99.2
)
)
>=sys-libs/libcap-2.22-r2
alsa? ( >=media-libs/alsa-lib-1.0.24 )
glib? ( >=dev-libs/glib-2.28.0:2[${MULTILIB_USEDEP}] )
zeroconf? ( >=net-dns/avahi-0.6.12[dbus] )
jack? ( virtual/jack )
tcpd? ( sys-apps/tcp-wrappers[${MULTILIB_USEDEP}] )
lirc? ( app-misc/lirc )
dbus? ( >=sys-apps/dbus-1.4.12[${MULTILIB_USEDEP}] )
gtk? ( x11-libs/gtk+:3 )
bluetooth? (
>=net-wireless/bluez-5
media-libs/sbc
)
asyncns? ( >=net-libs/libasyncns-0.1[${MULTILIB_USEDEP}] )
udev? ( >=virtual/udev-143[hwdb(+)] )
equalizer? (
sci-libs/fftw:3.0
)
ofono-headset? ( >=net-misc/ofono-1.13 )
orc? ( >=dev-lang/orc-0.4.15 )
sox? ( >=media-libs/soxr-0.1.1 )
ssl? ( dev-libs/openssl:= )
>=media-libs/speexdsp-1.2[${MULTILIB_USEDEP}]
gdbm? ( sys-libs/gdbm:= )
webrtc-aec? ( >=media-libs/webrtc-audio-processing-0.2 )
elogind? ( sys-auth/elogind )
systemd? ( sys-apps/systemd:=[${MULTILIB_USEDEP}] )
daemon? (
dev-libs/libltdl
sys-kernel/linux-headers
)
selinux? ( sec-policy/selinux-pulseaudio )
gstreamer? (
media-libs/gst-plugins-base
>=media-libs/gstreamer-1.14
)
"
DEPEND="${RDEPEND}
X? ( x11-base/xorg-proto )
dev-libs/libatomic_ops
"
# This is a PDEPEND to avoid a circular dep
PDEPEND="
alsa? ( alsa-plugin? ( >=media-plugins/alsa-plugins-1.0.27-r1[pulseaudio,${MULTILIB_USEDEP}] ) )
"
# alsa-utils dep is for the alsasound init.d script (see bug 155707); TODO: read it
# NOTE: Only system-wide needs acct-group/audio unless elogind/systemd is not used
RDEPEND="${RDEPEND}
system-wide? (
alsa? ( media-sound/alsa-utils )
acct-user/pulse
acct-group/audio
acct-group/pulse-access
)
"
# NOTE: dev-libs/libpcre header will be used if found but no linking is done on non-Windows
BDEPEND="
doc? ( app-doc/doxygen )
orc? ( >=dev-lang/orc-0.4.15 )
system-wide? ( dev-util/unifdef )
test? ( >=dev-libs/check-0.9.10 )
dev-libs/libpcre
sys-devel/gettext
sys-devel/m4
virtual/libiconv
virtual/libintl
virtual/pkgconfig
"
DOCS=( NEWS README ) # todo is useless to install
pkg_pretend() {
if [[ -n ${COMMIT} && -z ${SNAPSHOT_PV} || -z ${COMMIT} && -n ${SNAPSHOT_PV} ]]; then
eerror "Please either set both COMMIT and SNAPSHOT_PV or neither!"
elif [[ -n ${SNAPSHOT_PV} && ${PV} != ${SNAPSHOT_PV} ]]; then
die "Rename of snapshot ebuild detected - please check COMMIT & SNAPSHOT_PV!"
fi
}
pkg_setup() {
gnome2_environment_reset # bug 543364 # TODO: read it
}
src_prepare() {
default
if [[ -n ${COMMIT} ]]; then
# This file really should be upstream's responsibility but what can you do other than hack
# together a work-around for an upstream's tarball generator lacking required integration?
if [[ -n ${SNAPSHOT_FIX_GITVERSION} && ${SNAPSHOT_FIX_GITVERSION} -ge 1 ]]; then
echo ${PV%_*}-${COMMIT:0:8} > .tarball-version
fi
fi
}
multilib_src_configure() {
local emesonargs=(
-Dadrian-aec=false # Not packaged?
--localstatedir="${EPREFIX}"/var
-Dmodlibexecdir="${EPREFIX}/usr/$(get_libdir)/${PN}/modules" # Was $(get_libdir)/${P}
# -Dsystemduserunitdir=$(systemd_get_userunitdir)
-Dudevrulesdir="$(get_udevdir)"/rules.d
-Dbashcompletiondir="$(get_bashcompdir)" # Alternatively DEPEND on app-shells/bash-completion for pkg-config to provide the value
$(meson_native_use_feature alsa)
$(meson_native_use_bool bluetooth bluez5)
$(meson_native_use_bool daemon)
$(meson_native_use_bool native-headset bluez5-native-headset)
$(meson_native_use_bool ofono-headset bluez5-ofono-headset)
$(meson_native_use_feature glib gsettings) # Supposedly correct?
$(meson_native_use_feature gstreamer)
$(meson_native_use_feature gtk)
$(meson_native_use_feature jack)
-Dsamplerate=disabled # Matches upstream
$(meson_native_use_feature lirc)
$(meson_native_use_feature orc)
$(meson_native_use_feature oss oss-output)
$(meson_native_use_feature ssl openssl)
# tests involve random modules, so just do them for the native # TODO: tests should run always
$(meson_native_use_bool test tests)
$(meson_native_use_feature udev)
$(meson_native_use_feature webrtc-aec)
$(meson_native_use_feature zeroconf avahi)
$(meson_native_use_feature equalizer fftw)
$(meson_native_use_feature sox soxr)
-Ddatabase=$(multilib_native_usex gdbm gdbm simple) # tdb is also an option but no one cares about it
$(meson_use forget-missing stream-restore-clear-old-devices)
$(meson_feature glib) # WARNING: toggling this likely changes ABI
$(meson_feature asyncns)
#$(meson_use cpu_flags_arm_neon neon-opt)
$(meson_feature tcpd tcpwrap) # TODO: system-wide specific?
$(meson_feature dbus)
$(meson_feature elogind)
$(meson_feature X x11)
$(meson_feature systemd)
$(meson_use ipv6)
)
if multilib_is_native_abi; then
# Make padsp work for non-native ABI, supposedly only possible with glibc; this is used by /usr/bin/padsp that comes from native build, thus we need this argument for native build
if use elibc_glibc; then
emesonargs+=( -Dpulsedsp-location="${EPREFIX}"'/usr/\\$$LIB/pulseaudio' )
fi
else
if ! use elibc_glibc; then
# Non-glibc multilib is probably non-existent but just in case:
ewarn "padsp wrapper for OSS emulation will only work with native ABI applications!"
fi
fi
meson_src_configure
}
multilib_src_compile() {
meson_src_compile
if multilib_is_native_abi; then
use doc && meson_src_compile doxygen
fi
}
multilib_src_install() {
# The files referenced in the DOCS array do not exist in the multilib source directory,
# therefore clear the variable when calling the function that will access it.
DOCS= meson_src_install
}
multilib_src_install_all() {
# Now we can install the DOCS. ;)
einstalldocs
if use doc; then
# TODO: check it's installing into the right place
docinto html
dodoc -r doxygen/html/
fi
if use system-wide; then
newconfd "${FILESDIR}"/pulseaudio.conf.d pulseaudio
use_define() {
local define=${2:-$(echo $1 | tr '[:lower:]' '[:upper:]')}
use "$1" && echo "-D$define" || echo "-U$define"
}
unifdef $(use_define zeroconf AVAHI) \
$(use_define alsa) \
$(use_define bluetooth) \
$(use_define udev) \
"${FILESDIR}"/pulseaudio.init.d-5 \
> "${T}"/pulseaudio || die
doinitd "${T}"/pulseaudio
systemd_dounit "${FILESDIR}"/${PN}.service
# We need /var/run/pulse, bug 442852
systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
else
# Prevent warnings when system-wide is not used, bug 447694
if use dbus && use daemon; then
rm "${ED}"/etc/dbus-1/system.d/pulseaudio-system.conf || die
fi
fi
if use zeroconf; then
sed -e '/module-zeroconf-publish/s:^#::' \
-i "${ED}/etc/pulse/default.pa" || die
fi
find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die
}
pkg_postinst() {
gnome2_schemas_update
if use system-wide; then
elog "You have enabled the 'system-wide' USE flag for pulseaudio."
elog "This mode should only be used on headless servers, embedded systems,"
elog "or thin clients. It will usually require manual configuration, and is"
elog "incompatible with many expected pulseaudio features."
elog "On normal desktop systems, system-wide mode is STRONGLY DISCOURAGED."
elog "For more information, see"
elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/"
elog " https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/"
elog " https://wiki.gentoo.org/wiki/PulseAudio#Headless_server"
fi
if use equalizer; then
elog "You will need to load some extra modules to make qpaeq work."
elog "You can do that by adding the following two lines in"
elog "/etc/pulse/default.pa and restarting pulseaudio:"
elog "load-module module-equalizer-sink"
elog "load-module module-dbus-protocol"
fi
if use native-headset && use ofono-headset; then
elog "You have enabled both native and ofono headset profiles. The runtime decision"
elog "which to use is done via the 'headset' argument of module-bluetooth-discover."
fi
if use systemd && use daemon; then
elog "It's recommended to start pulseaudio via its systemd user units:"
elog "systemctl --user enable pulseaudio.service pulseaudio.socket"
elog "The change from autospawn to user units will take effect after restarting."
fi
optfeature_header "PulseAudio can be enhanced by installing the following:"
use equalizer && optfeature "using the qpaeq script" dev-python/PyQt5[dbus,widgets]
use dbus && optfeature "restricted realtime capabilities vai D-Bus" sys-auth/rtkit
}
pkg_postrm() {
gnome2_schemas_update
}