mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
extra/pipewire: fix
This commit is contained in:
parent
ee5c814ed9
commit
e5c28b29cd
2 changed files with 57 additions and 2 deletions
51
extra/pipewire/0001-atomic.patch
Normal file
51
extra/pipewire/0001-atomic.patch
Normal file
|
@ -0,0 +1,51 @@
|
|||
From 412858de9094de06047a33237ebf12753324636e Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Wed, 11 Mar 2020 07:28:28 -0600
|
||||
Subject: [PATCH] atomic
|
||||
|
||||
---
|
||||
pipewire-jack/src/meson.build | 23 ++++++++++++++++++++++-
|
||||
1 file changed, 22 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pipewire-jack/src/meson.build b/pipewire-jack/src/meson.build
|
||||
index 68821a1b..70bdd21b 100644
|
||||
--- a/pipewire-jack/src/meson.build
|
||||
+++ b/pipewire-jack/src/meson.build
|
||||
@@ -13,12 +13,33 @@ pipewire_jack_c_args = [
|
||||
#optional dependencies
|
||||
jack_dep = dependency('jack', version : '>= 1.9.10', required : false)
|
||||
|
||||
+# Check for GCC style atomics
|
||||
+dep_atomic = declare_dependency()
|
||||
+
|
||||
+if cc.compiles('int main() { int n; return __atomic_load_n(&n, __ATOMIC_ACQUIRE); }',
|
||||
+ name : 'GCC atomic builtins')
|
||||
+ # Not all atomic calls can be turned into lock-free instructions, in which
|
||||
+ # GCC will make calls into the libatomic library. Check whether we need to
|
||||
+ # link with -latomic.
|
||||
+ #
|
||||
+ # This can happen for 64-bit atomic operations on 32-bit architectures such
|
||||
+ # as ARM.
|
||||
+ if not cc.links('''#include <stdint.h>
|
||||
+ int main() {
|
||||
+ uint64_t n;
|
||||
+ return (int)__atomic_load_n(&n, __ATOMIC_ACQUIRE);
|
||||
+ }''',
|
||||
+ name : 'GCC atomic builtins required -latomic')
|
||||
+ dep_atomic = cc.find_library('atomic')
|
||||
+ endif
|
||||
+endif
|
||||
+
|
||||
pipewire_jack = shared_library('jack-pw',
|
||||
pipewire_jack_sources,
|
||||
soversion : pipewire_version,
|
||||
c_args : pipewire_jack_c_args,
|
||||
include_directories : [configinc],
|
||||
- dependencies : [pipewire_dep, jack_dep, mathlib],
|
||||
+ dependencies : [pipewire_dep, jack_dep, mathlib, dep_atomic],
|
||||
install : true,
|
||||
)
|
||||
|
||||
--
|
||||
2.24.1
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - remove makedepend on valgrind
|
||||
# - patch to check for and link with libatomic
|
||||
|
||||
pkgbase=pipewire
|
||||
pkgname=(pipewire pipewire-docs pipewire-jack pipewire-pulse)
|
||||
|
@ -16,8 +17,10 @@ makedepends=(git meson doxygen graphviz xmltoman jack2 libpulse
|
|||
alsa-lib gstreamer gst-plugins-base sbc rtkit vulkan-icd-loader
|
||||
dbus libsndfile bluez-libs vulkan-headers)
|
||||
_commit=74a1632f0720886d5b3b6c23ee8fcd6c03ca7aac # tags/0.3.1
|
||||
source=("git+https://github.com/PipeWire/pipewire#commit=$_commit")
|
||||
sha256sums=('SKIP')
|
||||
source=("git+https://github.com/PipeWire/pipewire#commit=$_commit"
|
||||
0001-atomic.patch)
|
||||
sha256sums=('SKIP'
|
||||
'2e22f850618fcd77cab357ce8d8c2382ccf37a4fd0f782d999a81202bfabc503')
|
||||
|
||||
pkgver() {
|
||||
cd $pkgbase
|
||||
|
@ -26,6 +29,7 @@ pkgver() {
|
|||
|
||||
prepare() {
|
||||
cd $pkgbase
|
||||
patch -p1 -i ../0001-atomic.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
|
Loading…
Reference in a new issue