restructure #3
168
media-video/pipewire-1.4.9.PKGBUILD
Normal file
168
media-video/pipewire-1.4.9.PKGBUILD
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
pkgname=pipewire
|
||||||
|
pkgver=1.4.9
|
||||||
|
pkgdesc="Low-latency audio/video router and processor"
|
||||||
|
homepage="https://pipewire.org"
|
||||||
|
arch=(x86_64)
|
||||||
|
license=(MIT)
|
||||||
|
makedepends=(
|
||||||
|
alsa-lib
|
||||||
|
dbus
|
||||||
|
libpulse
|
||||||
|
libsndfile
|
||||||
|
meson
|
||||||
|
ncurses
|
||||||
|
python-docutils
|
||||||
|
readline
|
||||||
|
rtkit
|
||||||
|
sdl2
|
||||||
|
systemd
|
||||||
|
ffmpeg
|
||||||
|
fftw
|
||||||
|
)
|
||||||
|
checkdepends=(
|
||||||
|
desktop-file-utils
|
||||||
|
)
|
||||||
|
_patches=("pipewire-0.3.25-enable-failed-mlock-warning.patch"
|
||||||
|
"pipewire-1.4.6-no-automagic-ebur128.patch"
|
||||||
|
"pipewire-1.4.6-no-automagic-fftw.patch"
|
||||||
|
)
|
||||||
|
_patch_sums=("7456a24276b7b766ff5799acf5b80ef5f85ee7a78fc5b52adff3206c0b0aa1985a0bf72634aacf7818c90136c09bcc11cb0fecec291d961c8b3585c897869f65"
|
||||||
|
"c8aca1e2a8c4ddb7dd9a357ffefc77070cb6f123228678015865a505210e851948d5e7acbf8c17076ce2d56042f0a68b7f65439f958f938637ca475886eb81d2"
|
||||||
|
"726b28015cc378fd2c5e268655f4162ca274ffd25976f3ba816d470fc90c33e86ac1930c76816f20b3ab812f7034a88dddb36b40e5cde51d79443689cdbb5e34"
|
||||||
|
)
|
||||||
|
sources=("${pkgname}-${pkgver}.tar.bz2"
|
||||||
|
"${pkgname}-1.4.7-0001-don-t-include-standard-C-headers-inside-of-extern-C.patch.xz"
|
||||||
|
"99-pipewire-default-hook.conf"
|
||||||
|
${_patches[@]}
|
||||||
|
)
|
||||||
|
urls=("https://gitlab.freedesktop.org/${pkgname}/${pkgname}/-/archive/${pkgver}/${sources[0]}"
|
||||||
|
"https://dev.gentoo.org/~sam/distfiles/media-video/${pkgname}/${sources[1]}"
|
||||||
|
"99-pipewire-default-hook.conf"
|
||||||
|
"${_patches[@]}"
|
||||||
|
)
|
||||||
|
sha512sums=("369054d920133904a8df709b1be05f9ef0e7e99e1ae10e1d200315ce1200e20d5e20a91f40dd17dd3177eef59de7d47dfdd6161ec6f057b78140690fcfcc1c2e"
|
||||||
|
"fbd9644a5df81ee4bc9687f6a8b69a0bf12deef43d749c9c5cbb976f461771deeae4bd13340a6acaffae4b0187221cf734be2b3b62408a4ce79d70575a7e664b"
|
||||||
|
"4e512c62b7627fbe9e48afbbf171bd2b8d4fb8b231492cb1ea2d90ac474212c25e0f8ba3389b1df1108a46f243f2e1f3a3eaf2d147a7968cec82a8a49f5fd1b7"
|
||||||
|
"${_patch_sums[@]}"
|
||||||
|
)
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
tar -xjf ${distdir}/${sources[0]} --strip-components=1
|
||||||
|
cp ${distdir}/${sources[1]} ./
|
||||||
|
xz --decompress ${sources[1]}
|
||||||
|
for _patch in ${_patches[@]}; do
|
||||||
|
patch -p1 -i ${filedir}/${_patch}
|
||||||
|
done
|
||||||
|
patch -p1 -i ${sources[1]%.xz}
|
||||||
|
}
|
||||||
|
|
||||||
|
src_build() {
|
||||||
|
local meson_args=(
|
||||||
|
--prefix=/usr
|
||||||
|
--buildtype=release
|
||||||
|
--wrap-mode=nodownload
|
||||||
|
-D python.bytecompile=1
|
||||||
|
-D docdir="/usr/share/doc/${pkgname}-${pkgver}"
|
||||||
|
-D dbus=enabled
|
||||||
|
-D avahi=disabled
|
||||||
|
-D docs=disabled
|
||||||
|
-D man=disabled
|
||||||
|
-D tests=enabled
|
||||||
|
-D installed_tests=disabled
|
||||||
|
-D libffado=disabled
|
||||||
|
-D gstreamer=disabled
|
||||||
|
-D gstreamer-device-provider=disabled
|
||||||
|
-D gsettings=disabled
|
||||||
|
-D systemd=enabled
|
||||||
|
-D logind=enabled
|
||||||
|
-D logind-provider=libsystemd
|
||||||
|
-D systemd-system-service=disabled
|
||||||
|
-D systemd-user-service=enabled
|
||||||
|
-D pipewire-alsa=enabled
|
||||||
|
-D selinux=disabled
|
||||||
|
-D spa-plugins=enabled
|
||||||
|
-D alsa=enabled
|
||||||
|
-D compress-offload=disabled
|
||||||
|
-D audiomixer=enabled # Matches upstream
|
||||||
|
-D audioconvert=enabled # Matches upstream
|
||||||
|
-D bluez5=disabled
|
||||||
|
-D bluez5-backend-hsp-native=disabled
|
||||||
|
-D bluez5-backend-hfp-native=disabled
|
||||||
|
-D bluez5-backend-native-mm=disabled
|
||||||
|
-D bluez5-backend-ofono=disabled
|
||||||
|
-D bluez5-backend-hsphfpd=disabled
|
||||||
|
-D bluez5-codec-aac=disabled
|
||||||
|
-D bluez5-codec-aptx=disabled
|
||||||
|
-D bluez5-codec-ldac=disabled
|
||||||
|
-D bluez5-codec-g722=disabled
|
||||||
|
-D opus=disabled
|
||||||
|
-D bluez5-codec-opus=disabled
|
||||||
|
-D libusb=disabled
|
||||||
|
-D echo-cancel-webrtc=disabled
|
||||||
|
-D control=enabled # Matches upstream
|
||||||
|
-D audiotestsrc=enabled # Matches upstream
|
||||||
|
-D ffmpeg=disabled
|
||||||
|
-D pw-cat-ffmpeg=enabled
|
||||||
|
-D flatpak=disabled
|
||||||
|
-D pipewire-jack=enabled
|
||||||
|
-D jack=disabled
|
||||||
|
-D jack-devel=false
|
||||||
|
-D support=enabled
|
||||||
|
-D evl=disabled # Matches upstream
|
||||||
|
-D test=disabled # fakesink and fakesource plugins
|
||||||
|
-D bluez5-codec-lc3plus=disabled # unpackaged
|
||||||
|
-D bluez5-codec-lc3=disabled
|
||||||
|
-D ebur128=disabled
|
||||||
|
-D fftw=enabled
|
||||||
|
-D lv2=disabled
|
||||||
|
-D v4l2=disabled
|
||||||
|
-D libcamera=disabled
|
||||||
|
-D roc=disabled
|
||||||
|
-D readline=enabled
|
||||||
|
-D raop=enabled
|
||||||
|
-D videoconvert=enabled # Matches upstream
|
||||||
|
-D videotestsrc=enabled # Matches upstream
|
||||||
|
-D volume=enabled # Matches upstream
|
||||||
|
-D vulkan=disabled # Uses pre-compiled Vulkan compute shader to provide a CGI video source (dev thing; disabled by upstream)
|
||||||
|
-D pw-cat=enabled
|
||||||
|
-D udev=enabled
|
||||||
|
-D sdl2=disabled
|
||||||
|
-D libmysofa=disabled
|
||||||
|
-D sndfile=enabled
|
||||||
|
-D session-managers="[]"
|
||||||
|
-D pam-defaults-install=false #new kernel
|
||||||
|
-D x11=disabled
|
||||||
|
-D x11-xfixes=disabled
|
||||||
|
-D libcanberra=disabled
|
||||||
|
-D snap=disabled
|
||||||
|
-D gsettings-pulse-schema=disabled
|
||||||
|
)
|
||||||
|
meson setup build "${meson_args[@]}"
|
||||||
|
meson configure build --no-pager
|
||||||
|
meson compile -C build
|
||||||
|
}
|
||||||
|
|
||||||
|
src_check() {
|
||||||
|
meson test -C build --print-errorlogs --timeout-multiplier 10
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
meson install -C build --destdir "$pkgdir"
|
||||||
|
|
||||||
|
install -vDm644 "${filedir}"/99-pipewire-default-hook.conf -t "${pkgdir}/usr/share/alsa/alsa.conf.d"
|
||||||
|
mkdir -pv "${pkgdir}/etc/alsa/conf.d"
|
||||||
|
ln -sv ../../../usr/share/alsa/alsa.conf.d/50-pipewire.conf "${pkgdir}"/etc/alsa/conf.d/50-pipewire.conf
|
||||||
|
ln -sv ../../../usr/share/alsa/alsa.conf.d/99-pipewire-default-hook.conf "${pkgdir}"/etc/alsa/conf.d/99-pipewire-default-hook.conf
|
||||||
|
}
|
||||||
|
|
||||||
|
src_postinstall() {
|
||||||
|
systemctl --global enable pipewire.socket
|
||||||
|
systemctl --global enable pipewire-pulse.socket
|
||||||
|
}
|
||||||
|
|
||||||
|
src_preremove() {
|
||||||
|
systemctl --global disable pipewire.socket
|
||||||
|
systemctl --global disable pipewire-pulse.socket
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim:ft=sh syn=sh et sw=2:
|
||||||
17
media-video/pipewire-1.4.9/99-pipewire-default-hook.conf
Normal file
17
media-video/pipewire-1.4.9/99-pipewire-default-hook.conf
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Load pipewire configuration at conf hook processing time. This allows to
|
||||||
|
# override pulseaudio defaults configuration which is also applied via hook.
|
||||||
|
#
|
||||||
|
# Note since hooks are run after /etc/asound.conf and ~/.asoundrc are applied,
|
||||||
|
# we load these again here make sure that user configuration takes precedence.
|
||||||
|
|
||||||
|
@hooks [
|
||||||
|
{
|
||||||
|
func load
|
||||||
|
files [
|
||||||
|
"/usr/share/alsa/alsa.conf.d/99-pipewire-default.conf"
|
||||||
|
"/etc/asound.conf"
|
||||||
|
"~/.asoundrc"
|
||||||
|
]
|
||||||
|
errors false
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in
|
||||||
|
--- a/src/daemon/pipewire.conf.in
|
||||||
|
+++ b/src/daemon/pipewire.conf.in
|
||||||
|
@@ -6,7 +6,7 @@ context.properties = {
|
||||||
|
#support.dbus = true
|
||||||
|
#link.max-buffers = 64
|
||||||
|
link.max-buffers = 16 # version < 3 clients can't handle more
|
||||||
|
- #mem.warn-mlock = false
|
||||||
|
+ mem.warn-mlock = true # Gentoo should have good RLIMITs now
|
||||||
|
#mem.allow-mlock = true
|
||||||
|
#mem.mlock-all = false
|
||||||
|
#clock.power-of-two-quantum = true
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
https://bugs.gentoo.org/955373
|
||||||
|
https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/2420
|
||||||
|
|
||||||
|
From f42786d60cf94ba76ba447c3561148ed7d6c3293 Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <f42786d60cf94ba76ba447c3561148ed7d6c3293.1751075793.git.sam@gentoo.org>
|
||||||
|
From: Sam James <sam@gentoo.org>
|
||||||
|
Date: Sat, 28 Jun 2025 02:54:34 +0100
|
||||||
|
Subject: [PATCH] spa: allow disabling deps via -Debur128/-Dudev
|
||||||
|
|
||||||
|
With .enabled(), Meson doesn't have some magic that packagers rely on
|
||||||
|
to explicitly disable finding a dependency if an option is off. Drop
|
||||||
|
the unnecessary .enabled() accordingly.
|
||||||
|
---
|
||||||
|
spa/meson.build | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/spa/meson.build b/spa/meson.build
|
||||||
|
index 48a0000a1..637aeb8d4 100644
|
||||||
|
--- a/spa/meson.build
|
||||||
|
+++ b/spa/meson.build
|
||||||
|
@@ -114,7 +114,7 @@ if get_option('spa-plugins').allowed()
|
||||||
|
cdata.set('HAVE_ALSA_COMPRESS_OFFLOAD', compress_offload_option.allowed())
|
||||||
|
|
||||||
|
# common dependencies
|
||||||
|
- libudev_dep = dependency('libudev', required: get_option('udev').enabled())
|
||||||
|
+ libudev_dep = dependency('libudev', required: get_option('udev'))
|
||||||
|
cdata.set('HAVE_LIBUDEV', libudev_dep.found())
|
||||||
|
summary({'Udev': libudev_dep.found()}, bool_yn: true, section: 'Backend')
|
||||||
|
|
||||||
|
@@ -124,7 +124,7 @@ if get_option('spa-plugins').allowed()
|
||||||
|
lilv_lib = dependency('lilv-0', required: get_option('lv2'))
|
||||||
|
summary({'lilv (for lv2 plugins)': lilv_lib.found()}, bool_yn: true, section: 'filter-graph')
|
||||||
|
|
||||||
|
- ebur128_lib = dependency('libebur128', required: get_option('ebur128').enabled())
|
||||||
|
+ ebur128_lib = dependency('libebur128', required: get_option('ebur128'))
|
||||||
|
summary({'EBUR128': ebur128_lib.found()}, bool_yn: true, section: 'filter-graph')
|
||||||
|
|
||||||
|
cdata.set('HAVE_SPA_PLUGINS', true)
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
https://bugs.gentoo.org/955373
|
||||||
|
https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/2421
|
||||||
|
|
||||||
|
From 64b7a8990e2d6f37572d0b86c0d0847a283ba99e Mon Sep 17 00:00:00 2001
|
||||||
|
Message-ID: <64b7a8990e2d6f37572d0b86c0d0847a283ba99e.1751075990.git.sam@gentoo.org>
|
||||||
|
From: Sam James <sam@gentoo.org>
|
||||||
|
Date: Sat, 28 Jun 2025 02:59:03 +0100
|
||||||
|
Subject: [PATCH] meson: add fftw option
|
||||||
|
|
||||||
|
Packagers need to have a way to control whether a dependency is used
|
||||||
|
even if it's installed/available.
|
||||||
|
---
|
||||||
|
meson.build | 2 +-
|
||||||
|
meson_options.txt | 4 ++++
|
||||||
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 2331ac826..0ba5c57a8 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -321,7 +321,7 @@ cdata.set('HAVE_DBUS', dbus_dep.found())
|
||||||
|
sdl_dep = dependency('sdl2', required : get_option('sdl2'))
|
||||||
|
summary({'SDL2 (video examples)': sdl_dep.found()}, bool_yn: true, section: 'Misc dependencies')
|
||||||
|
drm_dep = dependency('libdrm', required : false)
|
||||||
|
-fftw_dep = dependency('fftw3f', required : false)
|
||||||
|
+fftw_dep = dependency('fftw3f', required : get_option('fftw'))
|
||||||
|
summary({'fftw3f (filter-chain convolver)': fftw_dep.found()}, bool_yn: true, section: 'Misc dependencies')
|
||||||
|
cdata.set('HAVE_FFTW', fftw_dep.found())
|
||||||
|
|
||||||
|
diff --git a/meson_options.txt b/meson_options.txt
|
||||||
|
index 74ce3fa94..cd2c839f7 100644
|
||||||
|
--- a/meson_options.txt
|
||||||
|
+++ b/meson_options.txt
|
||||||
|
@@ -383,3 +383,7 @@ option('ebur128',
|
||||||
|
description: 'Enable code that depends on ebur128',
|
||||||
|
type: 'feature',
|
||||||
|
value: 'auto')
|
||||||
|
+option('fftw',
|
||||||
|
+ description: 'Enable code that depends on fftw',
|
||||||
|
+ type: 'feature',
|
||||||
|
+ value: 'auto')
|
||||||
|
--
|
||||||
|
2.50.0
|
||||||
|
|
||||||
Reference in New Issue
Block a user