[bug#76785,v2,4/4] gnu: jamesdsp: Fix build.

Message ID e9cd11f242c23a0f103dea016e1eb9e44b34ed21.1743578103.git.z572@z572.online
State New
Headers
Series update pipewire, wireplumber, easyeffects, fix jamesdsp build |

Commit Message

Zheng Junjie April 2, 2025, 7:17 a.m. UTC
  * gnu/packages/patches/jamesdsp-fix-bulid-on-pipewire-1.4.0.patch: New file.
* gnu/packages/audio.scm (jamesdsp): Add it.
* gnu/local.mk (dist_patch_DATA): Register it.

Change-Id: Ibae4956b3b97f785bb548ccd73d034834c7b573f
---
 gnu/local.mk                                  |  1 +
 gnu/packages/audio.scm                        |  3 +-
 ...jamesdsp-fix-bulid-on-pipewire-1.4.0.patch | 60 +++++++++++++++++++
 3 files changed, 63 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/jamesdsp-fix-bulid-on-pipewire-1.4.0.patch
  

Patch

diff --git a/gnu/local.mk b/gnu/local.mk
index a96ca42532d..e14ec0d3d6d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1623,6 +1623,7 @@  dist_patch_DATA =						\
   %D%/packages/patches/irrlicht-link-against-needed-libs.patch	\
   %D%/packages/patches/isl-0.11.1-aarch64-support.patch	\
   %D%/packages/patches/itk-snap-alt-glibc-compat.patch		\
+  %D%/packages/patches/jamesdsp-fix-bulid-on-pipewire-1.4.0.patch\
   %D%/packages/patches/jami-enable-testing.patch		\
   %D%/packages/patches/jami-libjami-headers-search.patch	\
   %D%/packages/patches/jami-qwindowkit.patch			\
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index da59b03c8b6..61b76859ed4 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -835,7 +835,8 @@  (define-public jamesdsp
                   "#include <QCodeEditor/QHighlightRule")
                  (("#include <QLanguage") "#include <QCodeEditor/QLanguage")
                  (("#include <QCodeEditor\\.hpp")
-                  "#include <QCodeEditor/QCodeEditor.hpp"))))))))
+                  "#include <QCodeEditor/QCodeEditor.hpp"))))))
+       (patches (search-patches "jamesdsp-fix-bulid-on-pipewire-1.4.0.patch"))))
     (build-system qt-build-system)
     (arguments
      (list #:qtbase qtbase
diff --git a/gnu/packages/patches/jamesdsp-fix-bulid-on-pipewire-1.4.0.patch b/gnu/packages/patches/jamesdsp-fix-bulid-on-pipewire-1.4.0.patch
new file mode 100644
index 00000000000..73ab4fbbc5b
--- /dev/null
+++ b/gnu/packages/patches/jamesdsp-fix-bulid-on-pipewire-1.4.0.patch
@@ -0,0 +1,60 @@ 
+from https://github.com/Audio4Linux/JDSP4Linux/commit/b7d06cf197d1c02ff8cbd30cec5494dd20288b5f.patch
+
+From b7d06cf197d1c02ff8cbd30cec5494dd20288b5f Mon Sep 17 00:00:00 2001
+From: Toast <39011842+toast003@users.noreply.github.com>
+Date: Fri, 21 Mar 2025 19:05:01 +0100
+Subject: [PATCH] fix: make compatible with newer versions of pipewire
+
+---
+ src/audio/pipewire/PwPipelineManager.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/audio/pipewire/PwPipelineManager.cpp b/src/audio/pipewire/PwPipelineManager.cpp
+index 81b10e26..c2e2c537 100644
+--- a/src/audio/pipewire/PwPipelineManager.cpp
++++ b/src/audio/pipewire/PwPipelineManager.cpp
+@@ -1152,7 +1152,7 @@ void on_registry_global(void* data,
+       return;
+     }
+ 
+-    pw_node_add_listener(proxy, &nd->object_listener, &node_events, nd);
++    pw_proxy_add_object_listener(proxy, &nd->object_listener, &node_events, nd);
+     pw_proxy_add_listener(proxy, &nd->proxy_listener, &node_proxy_events, nd);
+ 
+     // sometimes PipeWire destroys the pointer before signal_idle is called,
+@@ -1222,7 +1222,7 @@ void on_registry_global(void* data,
+     pd->id = id;
+     pd->serial = serial;
+ 
+-    pw_link_add_listener(proxy, &pd->object_listener, &link_events, pd);
++    pw_proxy_add_object_listener(proxy, &pd->object_listener, &link_events, pd);
+     pw_proxy_add_listener(proxy, &pd->proxy_listener, &link_proxy_events, pd);
+ 
+     auto link_info = link_info_from_props(props);
+@@ -1297,7 +1297,7 @@ void on_registry_global(void* data,
+     pd->id = id;
+     pd->serial = serial;
+ 
+-    pw_module_add_listener(proxy, &pd->object_listener, &module_events, pd);
++    pw_proxy_add_object_listener(proxy, &pd->object_listener, &module_events, pd);
+     pw_proxy_add_listener(proxy, &pd->proxy_listener, &module_proxy_events, pd);
+ 
+     ModuleInfo m_info{.id = id, .serial = serial};
+@@ -1328,7 +1328,7 @@ void on_registry_global(void* data,
+     pd->id = id;
+     pd->serial = serial;
+ 
+-    pw_client_add_listener(proxy, &pd->object_listener, &client_events, pd);
++    pw_proxy_add_object_listener(proxy, &pd->object_listener, &client_events, pd);
+     pw_proxy_add_listener(proxy, &pd->proxy_listener, &client_proxy_events, pd);
+ 
+     ClientInfo c_info{.id = id, .serial = serial};
+@@ -1387,7 +1387,7 @@ void on_registry_global(void* data,
+         pd->id = id;
+         pd->serial = serial;
+ 
+-        pw_device_add_listener(proxy, &pd->object_listener, &device_events, pd);
++        pw_proxy_add_object_listener(proxy, &pd->object_listener, &device_events, pd);
+         pw_proxy_add_listener(proxy, &pd->proxy_listener, &device_proxy_events, pd);
+ 
+         DeviceInfo d_info{.id = id, .serial = serial, .media_class = media_class};