mirror of
https://github.com/coolsnowwolf/packages.git
synced 2025-05-01 12:10:14 +08:00
40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
From 8ece1141e455d6643df0be885a5df200bdb3bc78 Mon Sep 17 00:00:00 2001
|
|
From: Rosen Penev <rosenp@gmail.com>
|
|
Date: Thu, 30 Jul 2020 14:34:07 -0700
|
|
Subject: [PATCH] icu/meson: link against iconv when used externally
|
|
|
|
This basically adds -liconv to LDFLAGS, fixing a linking issue when
|
|
iconv is missing in the libc.
|
|
|
|
The previous commit fixed finding iconv but did not fix linking.
|
|
|
|
Switched to using c_compiler for iconv. It seems compiler does not work
|
|
properly.
|
|
|
|
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
---
|
|
src/lib/icu/meson.build | 14 ++++++++++++--
|
|
1 file changed, 12 insertions(+), 2 deletions(-)
|
|
|
|
--- a/src/lib/icu/meson.build
|
|
+++ b/src/lib/icu/meson.build
|
|
@@ -19,16 +19,8 @@ if icu_dep.found()
|
|
'Init.cxx',
|
|
]
|
|
elif not get_option('iconv').disabled()
|
|
- # an installed iconv library will make the builtin iconv() unavailable,
|
|
- # so search for the library first and pass it as (possible) dependency
|
|
- iconv_dep = compiler.find_library('libiconv', required: false)
|
|
- have_iconv = compiler.has_function('iconv',
|
|
- dependencies: iconv_dep,
|
|
- prefix : '#include <iconv.h>')
|
|
- if not have_iconv and get_option('iconv').enabled()
|
|
- error('iconv() not available')
|
|
- endif
|
|
- conf.set('HAVE_ICONV', have_iconv)
|
|
+ iconv_dep = dependency('iconv')
|
|
+ conf.set('HAVE_ICONV', iconv_dep.found())
|
|
endif
|
|
|
|
icu = static_library(
|