diff options
author | Mart Raudsepp <leio@gentoo.org> | 2021-09-24 21:00:27 +0300 |
---|---|---|
committer | Mart Raudsepp <leio@gentoo.org> | 2021-09-24 21:15:56 +0300 |
commit | dfd146a6aceb118f1d4f9751ae071f13a7624ffb (patch) | |
tree | 0d120eb1132d358a2c2081c14e74cf98d91caf20 /media-libs/libpulse | |
parent | dev-libs/icu: Stabilize 69.1-r1 hppa, #788112 (diff) | |
download | gentoo-dfd146a6aceb118f1d4f9751ae071f13a7624ffb.tar.gz gentoo-dfd146a6aceb118f1d4f9751ae071f13a7624ffb.tar.bz2 gentoo-dfd146a6aceb118f1d4f9751ae071f13a7624ffb.zip |
media-libs/libpulse: Add split package for pulseaudio libraries
Bug: https://bugs.gentoo.org/536780
Package-Manager: Portage-3.0.20, Repoman-3.0.2
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Diffstat (limited to 'media-libs/libpulse')
-rw-r--r-- | media-libs/libpulse/Manifest | 1 | ||||
-rw-r--r-- | media-libs/libpulse/files/15.0-no-aec.patch | 45 | ||||
-rw-r--r-- | media-libs/libpulse/files/pulseaudio-15.0-xice-xsm-xtst-daemon-only.patch | 25 | ||||
-rw-r--r-- | media-libs/libpulse/libpulse-15.0.ebuild | 189 | ||||
-rw-r--r-- | media-libs/libpulse/metadata.xml | 17 |
5 files changed, 277 insertions, 0 deletions
diff --git a/media-libs/libpulse/Manifest b/media-libs/libpulse/Manifest new file mode 100644 index 000000000000..308d59508744 --- /dev/null +++ b/media-libs/libpulse/Manifest @@ -0,0 +1 @@ +DIST pulseaudio-15.0.tar.xz 1521760 BLAKE2B a6f7b74fdcfe7f2a993eafb9f465946915a24b6801d3077971b9377290d6c70b3f8640a800abd09d5901db96a20349f31b1beedd9da2249f69b591fb8392f489 SHA512 352ef20384c76c631c0faa73b08e2318902a433712e0c086a5ac7a0ae58873c8d4be8f35879bdec71a93b19ae8e2ba073cacac4d56215bcf58375a0cd9d88833 diff --git a/media-libs/libpulse/files/15.0-no-aec.patch b/media-libs/libpulse/files/15.0-no-aec.patch new file mode 100644 index 000000000000..bd0b4d58b789 --- /dev/null +++ b/media-libs/libpulse/files/15.0-no-aec.patch @@ -0,0 +1,45 @@ +From 4ea50aa41ff0131b380aef97623be578b702cac7 Mon Sep 17 00:00:00 2001 +From: Mart Raudsepp <mart@leio.tech> +Date: Fri, 24 Sep 2021 00:02:40 +0300 +Subject: [PATCH] build-sys: meson: Relax sanity checks for daemonless builds + +Echo canceller, udev and speex resampling is only used by the daemon, so +don't error or warn about those in -Ddaemon=false builds. +--- + meson.build | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/meson.build b/meson.build +index d7e468cab..63ed62342 100644 +--- a/meson.build ++++ b/meson.build +@@ -961,7 +961,7 @@ message('\n '.join(summary)) + + # Sanity checks + +-if not speex_dep.found() and not webrtc_dep.found() and not get_option('adrian-aec') ++if get_option('daemon') and not speex_dep.found() and not webrtc_dep.found() and not get_option('adrian-aec') + error('At least one echo canceller implementation must be available!') + endif + +@@ -981,7 +981,7 @@ if host_machine.system() != 'windows' + ] + warning('\n' + '\n'.join(message)) + endif +- if host_machine.system() == 'linux' and not udev_dep.found() ++ if host_machine.system() == 'linux' and not udev_dep.found() and get_option('daemon') + message = [ + 'You do not have udev support enabled. It is strongly recommended', + 'that you enable udev support if your platform supports it as it is', +@@ -990,7 +990,7 @@ if host_machine.system() != 'windows' + ] + warning('\n' + '\n'.join(message)) + endif +- if not speex_dep.found() ++ if not speex_dep.found() and get_option('daemon') + message = [ + 'You do not have speex support enabled. It is strongly recommended', + 'that you enable speex support if your platform supports it as it is', +-- +2.32.0 + diff --git a/media-libs/libpulse/files/pulseaudio-15.0-xice-xsm-xtst-daemon-only.patch b/media-libs/libpulse/files/pulseaudio-15.0-xice-xsm-xtst-daemon-only.patch new file mode 100644 index 000000000000..f3df62031d34 --- /dev/null +++ b/media-libs/libpulse/files/pulseaudio-15.0-xice-xsm-xtst-daemon-only.patch @@ -0,0 +1,25 @@ +https://bugs.gentoo.org/806052 + +commit 42af3ee08381faa5807fde68d4c8ec0d7ad5e9a5 +Author: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> +Date: Tue Aug 3 09:43:32 2021 +0300 + + build-sys: meson: Require xice, xsm and xtst for daemon only + + Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/613> + +--- a/meson.build ++++ b/meson.build +@@ -681,9 +681,9 @@ endif + x11_dep = dependency('x11-xcb', required : get_option('x11')) + if x11_dep.found() + xcb_dep = dependency('xcb', required : true, version : '>= 1.6') +- ice_dep = dependency('ice', required : true) +- sm_dep = dependency('sm', required : true) +- xtst_dep = dependency('xtst', required : true) ++ ice_dep = dependency('ice', required : get_option('daemon')) ++ sm_dep = dependency('sm', required : get_option('daemon')) ++ xtst_dep = dependency('xtst', required : get_option('daemon')) + cdata.set('HAVE_X11', 1) + if cc.has_function('XSetIOErrorExitHandler', dependencies: x11_dep) + cdata.set('HAVE_XSETIOERROREXITHANDLER', 1) diff --git a/media-libs/libpulse/libpulse-15.0.ebuild b/media-libs/libpulse/libpulse-15.0.ebuild new file mode 100644 index 000000000000..204d85f61745 --- /dev/null +++ b/media-libs/libpulse/libpulse-15.0.ebuild @@ -0,0 +1,189 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +MY_PV="${PV/_pre*}" +MY_P="pulseaudio-${MY_PV}" + +inherit bash-completion-r1 gnome2-utils meson-multilib optfeature systemd tmpfiles udev + +DESCRIPTION="Libraries for PulseAudio clients" +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/pulseaudio/pulseaudio" +else + SRC_URI="https://freedesktop.org/software/pulseaudio/releases/${MY_P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +S="${WORKDIR}/${MY_P}" + +LICENSE="LGPL-2.1+" + +SLOT="0" +IUSE="+asyncns dbus doc +glib gtk selinux tcpd test X" +RESTRICT="!test? ( test )" + +# NOTE: libpcre needed in some cases, bug #472228 +# TODO: libatomic_ops is only needed on some architectures and conditions, and then at runtime too +RDEPEND=" + dev-libs/libatomic_ops + >=media-libs/libsndfile-1.0.20[${MULTILIB_USEDEP}] + virtual/libc + asyncns? ( >=net-libs/libasyncns-0.1[${MULTILIB_USEDEP}] ) + dbus? ( >=sys-apps/dbus-1.4.12[${MULTILIB_USEDEP}] ) + glib? ( >=dev-libs/glib-2.28.0:2[${MULTILIB_USEDEP}] ) + gtk? ( x11-libs/gtk+:3 ) + selinux? ( sec-policy/selinux-pulseaudio ) + tcpd? ( sys-apps/tcp-wrappers ) + X? ( >=x11-libs/libxcb-1.6[${MULTILIB_USEDEP}] ) + || ( + elibc_glibc? ( virtual/libc ) + elibc_uclibc? ( virtual/libc ) + dev-libs/libpcre:3 + ) + !<media-sound/pulseaudio-15.0-r100 +" + +DEPEND="${RDEPEND} + test? ( >=dev-libs/check-0.9.10 ) + X? ( x11-base/xorg-proto ) +" + +# pulseaudio ships a bundled xmltoman, which uses XML::Parser +BDEPEND=" + dev-lang/perl + dev-perl/XML-Parser + sys-devel/gettext + sys-devel/m4 + virtual/libiconv + virtual/libintl + virtual/pkgconfig + doc? ( app-doc/doxygen ) +" + +DOCS=( NEWS README ) + +PATCHES=( + "${FILESDIR}"/pulseaudio-15.0-xice-xsm-xtst-daemon-only.patch + "${FILESDIR}"/${PV}-no-aec.patch +) + +src_prepare() { + default + + gnome2_environment_reset +} + +multilib_src_configure() { + local emesonargs=( + --localstatedir="${EPREFIX}"/var + + -Ddaemon=false + $(meson_native_use_bool doc doxygen) + -Dgcov=false + # tests involve random modules, so just do them for the native # TODO: tests should run always + $(meson_native_use_bool test tests) + -Ddatabase=simple # Not used for non-daemon, simple database avoids external dep checks + -Dstream-restore-clear-old-devices=true + -Drunning-from-build-tree=false + + # Paths + -Dmodlibexecdir="${EPREFIX}/usr/$(get_libdir)/pulseaudio/modules" # Was $(get_libdir)/${P} + -Dsystemduserunitdir=$(systemd_get_userunitdir) + -Dudevrulesdir="${EPREFIX}$(get_udevdir)/rules.d" + -Dbashcompletiondir="$(get_bashcompdir)" # Alternatively DEPEND on app-shells/bash-completion for pkg-config to provide the value + + # Optional features + -Dalsa=disabled + $(meson_feature asyncns) + -Davahi=disabled + -Dbluez5=disabled + -Dbluez5-gstreamer=disabled + -Dbluez5-native-headset=false + -Dbluez5-ofono-headset=false + $(meson_feature dbus) + -Delogind=disabled + -Dfftw=disabled + $(meson_feature glib) # WARNING: toggling this likely changes ABI + -Dgsettings=disabled + -Dgstreamer=disabled + $(meson_native_use_feature gtk) + -Dhal-compat=false + -Dipv6=true + -Djack=disabled + -Dlirc=disabled + -Dopenssl=disabled + -Dorc=disabled + -Doss-output=disabled + -Dsamplerate=disabled # Matches upstream + -Dsoxr=disabled + -Dspeex=disabled + -Dsystemd=disabled + $(meson_native_use_feature tcpd tcpwrap) + -Dudev=disabled + -Dvalgrind=auto + $(meson_feature X x11) + + # Echo cancellation + -Dadrian-aec=false + -Dwebrtc-aec=disabled + ) + + 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 + emesonargs+=( -Dman=false ) + 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 + if use doc; then + einfo "Generating documentation ..." + meson_src_compile doxygen + fi + 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 + + if multilib_is_native_abi; then + if use doc; then + einfo "Installing documentation ..." + docinto html + dodoc -r doxygen/html/. + fi + fi +} + +multilib_src_install_all() { + einstalldocs + + find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die +} + +pkg_postinst() { + optfeature_header "PulseAudio can be enhanced by installing the following:" + use dbus && optfeature "restricted realtime capabilities via D-Bus" sys-auth/rtkit +} diff --git a/media-libs/libpulse/metadata.xml b/media-libs/libpulse/metadata.xml new file mode 100644 index 000000000000..afe3111f5cf9 --- /dev/null +++ b/media-libs/libpulse/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>gnome@gentoo.org</email> + <name>Gentoo GNOME Desktop</name> + </maintainer> + <use> + <flag name="glib"> + Add support to <pkg>dev-libs/glib</pkg>-based mainloop for the + libpulse client library, to allow using libpulse on glib-based + programs. + </flag> + <flag name="asyncns">Use libasyncns for asynchronous name resolution.</flag> + <flag name="doc">Build the doxygen-described API documentation.</flag> + </use> +</pkgmetadata> |