[Pkg-freeipa-devel] [Git][freeipa-team/389-ds-base][master] Use pkg-config to detect icu
Timo Aaltonen
gitlab at salsa.debian.org
Mon Dec 31 13:27:54 GMT 2018
Timo Aaltonen pushed to branch master at FreeIPA packaging / 389-ds-base
Commits:
ba5833bb by Hugh McMaster at 2018-12-31T12:46:02Z
Use pkg-config to detect icu
Closes: #916115
- - - - -
3 changed files:
- + debian/patches/icu_pkg-config.patch
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/patches/icu_pkg-config.patch
=====================================
@@ -0,0 +1,165 @@
+Description: Use pkg-config to detect icu, since icu-config is deprecated
+ and will be removed from Debian
+Bug: https://pagure.io/389-ds-base/issue/50067
+Bug-Debian: https://bugs.debian.org/916115
+Forwarded: https://pagure.io/389-ds-base/pull-request/50111
+Author: Hugh McMaster <hugh.mcmaster at outlook.com>
+Last-Update: 2018-12-28
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -172,7 +172,6 @@
+
+ DB_LINK = @db_lib@ -ldb- at db_libver@
+ SASL_LINK = @sasl_lib@ -lsasl2
+-ICU_LINK = @icu_lib@ -licui18n -licuuc -licudata
+ PCRE_LINK = @pcre_lib@ -lpcre
+ NETSNMP_LINK = @netsnmp_lib@ @netsnmp_link@
+ PAM_LINK = -lpam
+@@ -1616,8 +1615,8 @@
+ ldap/servers/plugins/collation/config.c \
+ ldap/servers/plugins/collation/orfilter.c
+
+-libcollation_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(DSPLUGIN_CPPFLAGS) @icu_inc@
+-libcollation_plugin_la_LIBADD = libslapd.la $(LDAPSDK_LINK) $(NSPR_LINK) $(ICU_LINK) $(LIBCSTD) $(LIBCRUN)
++libcollation_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(DSPLUGIN_CPPFLAGS) $(ICU_CFLAGS)
++libcollation_plugin_la_LIBADD = libslapd.la $(LDAPSDK_LINK) $(NSPR_LINK) $(ICU_LIBS) $(LIBCSTD) $(LIBCRUN)
+ libcollation_plugin_la_DEPENDENCIES = libslapd.la
+ libcollation_plugin_la_LDFLAGS = -avoid-version
+ # libcollation_plugin_la_LINK = $(CXXLINK) -avoid-version
+@@ -1859,8 +1858,8 @@
+ ldap/servers/plugins/replication/windows_protocol_util.c \
+ ldap/servers/plugins/replication/windows_tot_protocol.c
+
+-libreplication_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(DSPLUGIN_CPPFLAGS) @icu_inc@ @db_inc@
+-libreplication_plugin_la_LIBADD = libslapd.la $(LDAPSDK_LINK) $(NSS_LINK) $(NSPR_LINK) $(ICU_LINK) $(DB_LINK)
++libreplication_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(DSPLUGIN_CPPFLAGS) $(ICU_CFLAGS) @db_inc@
++libreplication_plugin_la_LIBADD = libslapd.la $(LDAPSDK_LINK) $(NSS_LINK) $(NSPR_LINK) $(ICU_LIBS) $(DB_LINK)
+ libreplication_plugin_la_DEPENDENCIES = libslapd.la
+ libreplication_plugin_la_LDFLAGS = -avoid-version
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -34,6 +34,7 @@
+ AM_PROG_CC_C_O
+ AM_PROG_AS
+ AC_PROG_CC_STDC
++PKG_PROG_PKG_CONFIG
+
+ # disable static libs by default - we only use a couple
+ AC_DISABLE_STATIC
+--- a/m4/icu.m4
++++ b/m4/icu.m4
+@@ -6,95 +6,22 @@
+ # See LICENSE for details.
+ # END COPYRIGHT BLOCK
+
+-AC_CHECKING(for LIBICU)
+-
+-# check for --with-icu
+-AC_MSG_CHECKING(for --with-icu)
+-AC_ARG_WITH(icu, AS_HELP_STRING([--with-icu@<:@=PATH@:>@],[ICU directory]),
+-[
+- if test "$withval" = "yes"
+- then
+- AC_MSG_RESULT(yes)
+- elif test "$withval" = "no"
+- then
+- AC_MSG_RESULT(no)
+- AC_MSG_ERROR([ICU is required.])
+- elif test -d "$withval"/lib
+- then
+- AC_MSG_RESULT([using $withval])
+- ICUDIR=$withval
+- icu_lib="-L$ICUDIR/lib"
+- icu_inc="-I$withval/include"
+- icu_bin="$withval/bin"
+- else
+- echo
+- AC_MSG_ERROR([$withval not found])
+- fi
+-],
+-AC_MSG_RESULT(yes))
+-
+-# check for --with-icu-inc
+-AC_MSG_CHECKING(for --with-icu-inc)
+-AC_ARG_WITH(icu-inc, AS_HELP_STRING([--with-icu-inc=PATH],[ICU include directory]),
++# check for --enable-icu
++AC_MSG_CHECKING([whether to enable internationalization support])
++AC_ARG_ENABLE(icu, AS_HELP_STRING([--enable-icu], [Enable internationalization support]),
+ [
+- if test -d "$withval"
+- then
+- AC_MSG_RESULT([using $withval])
+- icu_inc="-I$withval"
+- else
+- echo
+- AC_MSG_ERROR([$withval not found])
+- fi
+-],
+-AC_MSG_RESULT(no))
+-
+-# check for --with-icu-lib
+-AC_MSG_CHECKING(for --with-icu-lib)
+-AC_ARG_WITH(icu-lib, AS_HELP_STRING([--with-icu-lib=PATH],[ICU library directory]),
+-[
+- if test -d "$withval"
+- then
+- AC_MSG_RESULT([using $withval])
+- icu_lib="-L$withval"
+- else
+- echo
+- AC_MSG_ERROR([$withval not found])
+- fi
+-],
+-AC_MSG_RESULT(no))
+-
+-# check for --with-icu-bin
+-AC_MSG_CHECKING(for --with-icu-bin)
+-AC_ARG_WITH(icu-bin, AS_HELP_STRING([--with-icu-bin=PATH],[ICU binary directory]),
+-[
+- if test -d "$withval"
+- then
+- AC_MSG_RESULT([using $withval])
+- icu_bin="$withval"
+- else
+- echo
+- AC_MSG_ERROR([$withval not found])
+- fi
+-],
+-AC_MSG_RESULT(no))
+-# if ICU is not found yet, try pkg-config
+-
+-# last resort
+-if test -z "$icu_lib"; then
+- AC_PATH_PROG(ICU_CONFIG, icu-config)
+- AC_MSG_CHECKING(for icu with icu-config)
+- if test -n "$ICU_CONFIG"; then
+- icu_lib=`$ICU_CONFIG --ldflags-searchpath`
+- icu_inc=`$ICU_CONFIG --cppflags-searchpath`
+- icu_bin=`$ICU_CONFIG --bindir`
+- AC_MSG_RESULT([using system ICU])
+- else
+- AC_MSG_ERROR([ICU not found, specify with --with-icu.])
+- fi
++ case "${enableval}" in
++ yes) enable_icu=true ;;
++ no) enable_icu=false ;;
++ *) AC_MSG_ERROR([unknown option '${enableval}' for --enable-icu]) ;;
++ esac
++], [
++ enable_icu=false
++])
++
++if test "$enable_icu" = true; then
++ AC_MSG_RESULT([yes])
++ PKG_CHECK_MODULES([ICU], [icu-i18n])
++else
++ AC_MSG_RESULT([no])
+ fi
+-
+-
+-AC_SUBST(icu_lib)
+-AC_SUBST(icu_inc)
+-AC_SUBST(icu_bin)
+-
=====================================
debian/patches/series
=====================================
@@ -6,3 +6,4 @@ fix-systemctl-path.diff
CVE-2017-15135.patch
dont-build-new-manpages.diff
perl-use-move-instead-of-rename.diff
+icu_pkg-config.patch
=====================================
debian/rules
=====================================
@@ -76,7 +76,8 @@ override_dh_auto_configure:
--with-systemdgroupname=dirsrv.target \
--with-tmpfiles-d=/etc/tmpfiles.d \
--enable-autobind \
- --enable-cmocka
+ --enable-cmocka \
+ --enable-icu
override_dh_auto_build:
python3 src/lib389/setup.py build
View it on GitLab: https://salsa.debian.org/freeipa-team/389-ds-base/commit/ba5833bbd18560341835ece02f6cf83902f54429
--
View it on GitLab: https://salsa.debian.org/freeipa-team/389-ds-base/commit/ba5833bbd18560341835ece02f6cf83902f54429
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-freeipa-devel/attachments/20181231/571ead1c/attachment-0001.html>
More information about the Pkg-freeipa-devel
mailing list