package/pipewire: fix build with NLS
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sun, 2 May 2021 21:00:01 +0000 (23:00 +0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tue, 4 May 2021 20:19:21 +0000 (22:19 +0200)
Fix build failure with NLS which is raised since bump to version 0.3.26
in commit a6d88d3ba5e30e11f4d726f341bc56c1be7c71c9

Fixes:
 - http://autobuild.buildroot.org/results/4ed680dc91519c02db4fbfb396d75c5f74207d9b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/pipewire/0001-meson-prefer-libintl-on-FreeBSD.patch [new file with mode: 0644]
package/pipewire/pipewire.mk

diff --git a/package/pipewire/0001-meson-prefer-libintl-on-FreeBSD.patch b/package/pipewire/0001-meson-prefer-libintl-on-FreeBSD.patch
new file mode 100644 (file)
index 0000000..b19715b
--- /dev/null
@@ -0,0 +1,46 @@
+From 4d064a37183a0bf8198914dd68b063b2c9def17e Mon Sep 17 00:00:00 2001
+From: Evgeniy Khramtsov <evgeniy@khramtsov.org>
+Date: Fri, 23 Apr 2021 22:57:51 +0300
+Subject: [PATCH] meson: prefer libintl on FreeBSD
+
+FreeBSD does not have gettext in libc.
+It is implemented in the third-party library.
+
+[Retrieved from:
+https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/4d064a37183a0bf8198914dd68b063b2c9def17e]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ meson.build              | 3 +++
+ src/pipewire/meson.build | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 99a4b2d1c..0a9963fbb 100644
+--- a/meson.build
++++ b/meson.build
+@@ -351,6 +351,9 @@ libinotify_dep = (build_machine.system() == 'freebsd'
+     ? dependency('libinotify', required: true)
+     : dependency('', required: false))
++# On FreeBSD, libintl library is required for gettext
++libintl_dep = cc.find_library('intl', required: false)
++
+ alsa_dep = dependency('alsa', version : '>=1.1.7', required: get_option('pipewire-alsa'))
+ installed_tests_metadir = pipewire_datadir / 'installed-tests' / pipewire_name
+diff --git a/src/pipewire/meson.build b/src/pipewire/meson.build
+index 7f2d42a7a..d4c271373 100644
+--- a/src/pipewire/meson.build
++++ b/src/pipewire/meson.build
+@@ -101,7 +101,7 @@ libpipewire = shared_library(pipewire_name, pipewire_sources,
+   c_args : libpipewire_c_args,
+   include_directories : [pipewire_inc, configinc, spa_inc],
+   install : true,
+-  dependencies : [dl_lib, mathlib, pthread_lib, ],
++  dependencies : [dl_lib, mathlib, pthread_lib, libintl_dep, ],
+ )
+ pipewire_dep = declare_dependency(link_with : libpipewire,
+-- 
+GitLab
+
index 23bfcdb9ec3440bbd1ea16f499ee9e482ce482de..e5185aeb8c812cd5acfd4ca0073379e9cea24177 100644 (file)
@@ -9,7 +9,7 @@ PIPEWIRE_SITE = $(call github,PipeWire,pipewire,$(PIPEWIRE_VERSION))
 PIPEWIRE_LICENSE = MIT
 PIPEWIRE_LICENSE_FILES = COPYING LICENSE
 PIPEWIRE_INSTALL_STAGING = YES
-PIPEWIRE_DEPENDENCIES = host-pkgconf dbus
+PIPEWIRE_DEPENDENCIES = host-pkgconf dbus $(TARGET_NLS_DEPENDENCIES)
 
 PIPEWIRE_CONF_OPTS += \
        -Ddocs=disabled \