Merge pull request #19192 from turris-cz/cython-pip-requirements
[feed/packages.git] / sound / mpd / patches / 010-iconv.patch
1 From 8ece1141e455d6643df0be885a5df200bdb3bc78 Mon Sep 17 00:00:00 2001
2 From: Rosen Penev <rosenp@gmail.com>
3 Date: Thu, 30 Jul 2020 14:34:07 -0700
4 Subject: [PATCH] icu/meson: link against iconv when used externally
5
6 This basically adds -liconv to LDFLAGS, fixing a linking issue when
7 iconv is missing in the libc.
8
9 The previous commit fixed finding iconv but did not fix linking.
10
11 Switched to using c_compiler for iconv. It seems compiler does not work
12 properly.
13
14 Signed-off-by: Rosen Penev <rosenp@gmail.com>
15 ---
16 src/lib/icu/meson.build | 14 ++++++++++++--
17 1 file changed, 12 insertions(+), 2 deletions(-)
18
19 --- a/src/lib/icu/meson.build
20 +++ b/src/lib/icu/meson.build
21 @@ -19,16 +19,8 @@ if icu_dep.found()
22 'Init.cxx',
23 ]
24 elif not get_option('iconv').disabled()
25 - # an installed iconv library will make the builtin iconv() unavailable,
26 - # so search for the library first and pass it as (possible) dependency
27 - iconv_dep = compiler.find_library('libiconv', required: false)
28 - have_iconv = compiler.has_function('iconv',
29 - dependencies: iconv_dep,
30 - prefix : '#include <iconv.h>')
31 - if not have_iconv and get_option('iconv').enabled()
32 - error('iconv() not available')
33 - endif
34 - conf.set('HAVE_ICONV', have_iconv)
35 + iconv_dep = dependency('iconv')
36 + conf.set('HAVE_ICONV', iconv_dep.found())
37 endif
38
39 icu = static_library(