代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/samba 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 05807488fd340751ee976c5f8a367013ff94843e Mon Sep 17 00:00:00 2001
From: Earl Chew <earl_chew@yahoo.com>
Date: Sat, 16 Dec 2023 08:48:36 -0800
Subject: [PATCH] Combine ICU libraries icu-i18n and icu-uc into a single
dependency
Rather than probing for icu-i18n, icu-uc, and icudata libraries
separately, only probe for icu-i18n, and icu-uc, as direct dependencies
This avoids overlinking with icudata, and allows the package
to build even when ICU is not installed as a system library.
RN: Only use icu-i18n and icu-uc to express ICU dependency
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15623
Signed-off-by: Earl Chew <earl_chew@yahoo.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
---
lib/util/charset/iconv.c | 8 ++++----
lib/util/charset/wscript_build | 3 ++-
lib/util/charset/wscript_configure | 17 +++++++----------
3 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/lib/util/charset/iconv.c b/lib/util/charset/iconv.c
index 131df6409866..074794a26e31 100644
--- a/lib/util/charset/iconv.c
+++ b/lib/util/charset/iconv.c
@@ -26,7 +26,7 @@
#include "lib/util/charset/charset.h"
#include "lib/util/charset/charset_proto.h"
-#ifdef HAVE_ICU_I18N
+#ifdef HAVE_ICUI18N
#include <unicode/ustring.h>
#include <unicode/utrans.h>
#endif
@@ -168,7 +168,7 @@ static size_t sys_iconv(void *cd,
}
#endif
-#ifdef HAVE_ICU_I18N
+#ifdef HAVE_ICUI18N
static size_t sys_uconv(void *cd,
const char **inbuf,
size_t *inbytesleft,
@@ -334,7 +334,7 @@ static bool is_utf16(const char *name)
static int smb_iconv_t_destructor(smb_iconv_t hwd)
{
-#ifdef HAVE_ICU_I18N
+#ifdef HAVE_ICUI18N
/*
* This has to come first, as the cd_direct member won't be an iconv
* handle and must not be passed to iconv_close().
@@ -418,7 +418,7 @@ _PUBLIC_ smb_iconv_t smb_iconv_open_ex(TALLOC_CTX *mem_ctx, const char *tocode,
}
#endif
-#ifdef HAVE_ICU_I18N
+#ifdef HAVE_ICUI18N
if (strcasecmp(fromcode, "UTF8-NFD") == 0 &&
strcasecmp(tocode, "UTF8-NFC") == 0)
{
diff --git a/lib/util/charset/wscript_build b/lib/util/charset/wscript_build
index c69a17170ad6..3af90a0ad574 100644
--- a/lib/util/charset/wscript_build
+++ b/lib/util/charset/wscript_build
@@ -6,7 +6,8 @@ bld.SAMBA_SUBSYSTEM('ICONV_WRAPPER',
weird.c
charset_macosxfs.c
''',
- public_deps='iconv replace talloc ' + bld.env['icu-libs'])
+ deps=bld.env['icu-libs'],
+ public_deps='iconv replace talloc')
bld.SAMBA_SUBSYSTEM('charset',
public_headers='charset.h',
diff --git a/lib/util/charset/wscript_configure b/lib/util/charset/wscript_configure
index 58858f69b319..c49b55a4fd4b 100644
--- a/lib/util/charset/wscript_configure
+++ b/lib/util/charset/wscript_configure
@@ -37,15 +37,12 @@ conf.CHECK_CODE('''
lib='iconv',
headers='errno.h iconv.h')
-if conf.CHECK_CFG(package='icu-i18n',
+if conf.CHECK_CFG(package='icu-i18n icu-uc',
args='--cflags --libs',
- msg='Checking for icu-i18n',
- uselib_store='ICU_I18N'):
- for lib in conf.env['LIB_ICU_I18N']:
- conf.CHECK_LIB(lib, shlib=True, mandatory=True)
- conf.env['icu-libs'] = ' '.join(conf.env['LIB_ICU_I18N'])
- if not conf.CHECK_HEADERS('unicode/ustring.h'):
- conf.fatal('Found libicu, but unicode/ustring.h is missing')
+ msg='Checking for icu-i18n icu-uc',
+ uselib_store='ICUI18N'):
+ conf.env['icu-libs'] = 'icui18n icuuc'
+ conf.CHECK_LIB(conf.env['icu-libs'], shlib=True, mandatory=True)
+ if not conf.CHECK_HEADERS('unicode/ustring.h', lib='icui18n icuuc'):
+ conf.fatal('Found icui18n, but unicode/ustring.h is missing')
conf.DEFINE('HAVE_UTF8_NORMALISATION', 1)
-else:
- conf.env['icu-libs'] = ''
--
GitLab
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。