community/pulseaudio: fix linking to libintl

This commit is contained in:
Rasmus Thomsen 2019-09-15 14:20:45 +02:00 committed by Leo
parent 1038d65fcc
commit 8f6c337501
2 changed files with 136 additions and 2 deletions

View File

@ -5,7 +5,7 @@
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=pulseaudio
pkgver=13.0
pkgrel=0
pkgrel=1
pkgdesc="A featureful, general-purpose sound server"
url="https://www.freedesktop.org/wiki/Software/PulseAudio/"
arch="all"
@ -60,12 +60,12 @@ subpackages="
"
install="pulseaudio.post-install"
source="https://freedesktop.org/software/pulseaudio/releases/pulseaudio-$pkgver.tar.xz
link-libintl.patch
$pkgname.initd
$pkgname.confd
"
build() {
export CFLAGS="$CFLAGS -lintl"
meson \
--prefix=/usr \
--sysconfdir=/etc \
@ -223,5 +223,6 @@ equalizer() {
}
sha512sums="d445b8ccd43029a0ca0e456fc9291a79d3434d6496ead7eb329ab348d5249235e8bde6cf2be68765d8f761452dbe1486fb10c739e40b1e67ed75787bbd24ac0c pulseaudio-13.0.tar.xz
126b66e8fd3e0b231beed987acf0f1aecb8a9da1c4d4591eb65a5d8d3e0561bd6b3652e2c3dc079350be4219df48a446a58c4539f7275edba941db846837baae link-libintl.patch
34fe54ece5df60ce63a7955cd828a2716670fef71f40960698ae5518fdaf9cd599f4d8f8852e2c88d715600a9ad06a38984415e5eb320071012e5eb6e5c1b8b1 pulseaudio.initd
75b54581591519d63a3362b155c0f9b0501a60763ab394693a456c44d0216138cf3a40bdd0f7442028663bc045e9ffee286f8f8eaf2ee3bb17379b43615fee0e pulseaudio.confd"

View File

@ -0,0 +1,133 @@
diff --git a/meson.build b/meson.build
index a10a1b3c8..c4cf8c6a9 100644
--- a/meson.build
+++ b/meson.build
@@ -296,6 +296,12 @@ if cc.has_function('SYS_memfd_create', prefix : '#include <sys/syscall.h>')
cdata.set('HAVE_MEMFD', 1)
endif
+if cc.has_function('libintl_dgettext')
+ libintl_dep = []
+else
+ libintl_dep = cc.find_library('intl')
+endif
+
# Symbols
if cc.has_header_symbol('signal.h', 'SIGXCPU')
diff --git a/src/daemon/meson.build b/src/daemon/meson.build
index 9bc3bf18e..9c9f807e7 100644
--- a/src/daemon/meson.build
+++ b/src/daemon/meson.build
@@ -31,7 +31,7 @@ executable('pulseaudio',
include_directories : [configinc, topinc],
link_args : ['-ffast-math'],
link_with : [libpulsecore, libpulsecommon, libpulse],
- dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep, dl_dep],
+ dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep, dl_dep, libintl_dep],
c_args : pa_c_args,
)
diff --git a/src/meson.build b/src/meson.build
index c9b71a484..832c0de0d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -183,7 +183,7 @@ libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
install_dir : privlibdir,
dependencies : [
libm_dep, thread_dep, dl_dep, shm_dep, iconv_dep, sndfile_dep, dbus_dep,
- x11_dep, libsystemd_dep, glib_dep, gtk_dep, asyncns_dep
+ x11_dep, libsystemd_dep, glib_dep, gtk_dep, asyncns_dep, libintl_dep,
],
implicit_include_directories : false)
diff --git a/src/pulse/meson.build b/src/pulse/meson.build
index 00c686772..2a6f78489 100644
--- a/src/pulse/meson.build
+++ b/src/pulse/meson.build
@@ -81,10 +81,10 @@ libpulse = shared_library('pulse',
link_args : [nodelete_link_args, versioning_link_args],
install : true,
install_rpath : privlibdir,
- dependencies : [libm_dep, thread_dep, libpulsecommon_dep, dbus_dep, dl_dep, iconv_dep],
+ dependencies : [libm_dep, thread_dep, libpulsecommon_dep, dbus_dep, dl_dep, iconv_dep, libintl_dep],
implicit_include_directories : false)
-libpulse_dep = declare_dependency(link_with: libpulse)
+libpulse_dep = declare_dependency(link_with: libpulse, dependencies: libintl_dep)
install_data(
libpulse_headers, 'simple.h',
diff --git a/src/pulsecore/meson.build b/src/pulsecore/meson.build
index 19f6b9e99..0bd596cbd 100644
--- a/src/pulsecore/meson.build
+++ b/src/pulsecore/meson.build
@@ -198,7 +198,7 @@ libpulsecore = shared_library('pulsecore-' + pa_version_major_minor,
install_rpath : privlibdir,
install_dir : privlibdir,
link_with : libpulsecore_simd_lib,
- dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, libatomic_ops_dep, orc_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep],
+ dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, libatomic_ops_dep, orc_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep, libintl_dep],
implicit_include_directories : false)
libpulsecore_dep = declare_dependency(link_with: libpulsecore)
diff --git a/src/tests/meson.build b/src/tests/meson.build
index 621c2c965..a03d73cdb 100644
--- a/src/tests/meson.build
+++ b/src/tests/meson.build
@@ -53,7 +53,7 @@ default_tests = [
[ 'queue-test', 'queue-test.c',
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
[ 'resampler-test', 'resampler-test.c',
- [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libintl_dep ] ],
[ 'rtpoll-test', 'rtpoll-test.c',
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
[ 'smoother-test', 'smoother-test.c',
diff --git a/src/utils/meson.build b/src/utils/meson.build
index d00e030ae..dedf4e404 100644
--- a/src/utils/meson.build
+++ b/src/utils/meson.build
@@ -15,7 +15,7 @@ executable('pacat',
install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
- dependencies : [sndfile_dep],
+ dependencies : [sndfile_dep, libintl_dep],
c_args : pa_c_args,
)
@@ -36,7 +36,7 @@ executable('pactl',
install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
- dependencies : [sndfile_dep],
+ dependencies : [sndfile_dep, libintl_dep],
c_args : pa_c_args,
)
@@ -50,6 +50,7 @@ executable('pasuspender',
install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
+ dependencies: [libintl_dep],
c_args : pa_c_args,
)
@@ -63,6 +64,7 @@ executable('pacmd',
install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
+ dependencies: [libintl_dep],
c_args : pa_c_args,
)
@@ -77,7 +79,7 @@ if x11_dep.found()
install_rpath : privlibdir,
include_directories : [configinc, topinc],
link_with : [libpulsecommon, libpulse],
- dependencies : [x11_dep],
+ dependencies : [x11_dep, libintl_dep],
c_args : pa_c_args,
)
endif