Do not link libidn2 to all libraries (#1098783)
This commit is contained in:
parent
36ff6aebe6
commit
f17cd8fc68
122
bind-9.11-libidn2-exportfix.patch
Normal file
122
bind-9.11-libidn2-exportfix.patch
Normal file
@ -0,0 +1,122 @@
|
||||
From a296141a45e5bea4e08358801011397c778bcc96 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
|
||||
Date: Tue, 3 Apr 2018 20:35:29 +0200
|
||||
Subject: [PATCH] Remove -lidn2 from exported LIBS. Do not propagate it from
|
||||
isc-config.sh --libs isc.
|
||||
|
||||
---
|
||||
configure | 18 +++++++++++++-----
|
||||
configure.in | 20 ++++++++++++++------
|
||||
2 files changed, 27 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index ce9f393..afec327 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -22856,6 +22856,7 @@ fi
|
||||
#
|
||||
|
||||
LIBIDN2_CFLAGS=
|
||||
+LIBIDN2_LDFLAGS=
|
||||
LIBIDN2_LIBS=
|
||||
|
||||
# Check whether --with-libidn2 was given.
|
||||
@@ -22869,20 +22870,23 @@ case $use_libidn2 in #(
|
||||
no) :
|
||||
: ;; #(
|
||||
yes) :
|
||||
-
|
||||
- LIBIDN2_LIBS="-lidn2"
|
||||
- ;; #(
|
||||
+ : ;; #(
|
||||
*) :
|
||||
|
||||
LIBIDN2_CFLAGS="-I$use_libidn2/include"
|
||||
- LIBIDN2_LIBS="-L$use_libidn2/lib -lidn2"
|
||||
+ LIBIDN2_LDFLAGS="-L$use_libidn2/lib"
|
||||
;; #(
|
||||
*) :
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$use_libidn2" != "no"; then :
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing idn2_to_ascii_8z" >&5
|
||||
+ save_CFLAGS="$CFLAGS"
|
||||
+ save_LIBS="$LIBS"
|
||||
+ save_LDFLAGS="$LDFLAGS"
|
||||
+ CFLAGS="$LIBIDN2_CFLAGS $CFLAGS"
|
||||
+ LDFLAGS="$LIBIDN2_LDFLAGS $LDFLAGS"
|
||||
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing idn2_to_ascii_8z" >&5
|
||||
$as_echo_n "checking for library containing idn2_to_ascii_8z... " >&6; }
|
||||
if ${ac_cv_search_idn2_to_ascii_8z+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@@ -22938,6 +22942,7 @@ if test "$ac_res" != no; then :
|
||||
|
||||
$as_echo "#define WITH_LIBIDN2 1" >>confdefs.h
|
||||
|
||||
+ LIBIDN2_LIBS="$LIBIDN2_LDFLAGS -lidn2"
|
||||
else
|
||||
as_fn_error $? "libidn2 requested, but not found" "$LINENO" 5
|
||||
fi
|
||||
@@ -22967,6 +22972,9 @@ $as_echo "no" >&6; }
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
+ CFLAGS="$save_CFLAGS"
|
||||
+ LIBS="$save_LIBS"
|
||||
+ LDFLAGS="$save_LDFLAGS"
|
||||
|
||||
fi
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 63988c9..873e14d 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -4904,23 +4904,28 @@ AC_SUBST(IDNKIT_LIBS)
|
||||
#
|
||||
|
||||
LIBIDN2_CFLAGS=
|
||||
+LIBIDN2_LDFLAGS=
|
||||
LIBIDN2_LIBS=
|
||||
AC_ARG_WITH(libidn2,
|
||||
AS_HELP_STRING([--with-libidn2[=PATH]], [enable IDN support using GNU libidn2 [yes|no|path]]),
|
||||
use_libidn2="$withval", use_libidn2="no")
|
||||
AS_CASE([$use_libidn2],
|
||||
[no],[:],
|
||||
- [yes],[
|
||||
- LIBIDN2_LIBS="-lidn2"
|
||||
- ],
|
||||
+ [yes],[:],
|
||||
[*],[
|
||||
LIBIDN2_CFLAGS="-I$use_libidn2/include"
|
||||
- LIBIDN2_LIBS="-L$use_libidn2/lib -lidn2"
|
||||
+ LIBIDN2_LDFLAGS="-L$use_libidn2/lib"
|
||||
])
|
||||
|
||||
AS_IF([test "$use_libidn2" != "no"],
|
||||
- [AC_SEARCH_LIBS([idn2_to_ascii_8z], [idn2],
|
||||
- [AC_DEFINE(WITH_LIBIDN2, 1, [define if libidn2 support is to be included.])],
|
||||
+ [save_CFLAGS="$CFLAGS"
|
||||
+ save_LIBS="$LIBS"
|
||||
+ save_LDFLAGS="$LDFLAGS"
|
||||
+ CFLAGS="$LIBIDN2_CFLAGS $CFLAGS"
|
||||
+ LDFLAGS="$LIBIDN2_LDFLAGS $LDFLAGS"
|
||||
+ AC_SEARCH_LIBS([idn2_to_ascii_8z], [idn2],
|
||||
+ [AC_DEFINE(WITH_LIBIDN2, 1, [define if libidn2 support is to be included.])
|
||||
+ LIBIDN2_LIBS="$LIBIDN2_LDFLAGS -lidn2"],
|
||||
[AC_MSG_ERROR([libidn2 requested, but not found])])
|
||||
AC_MSG_CHECKING(whether libidn2 supports idn2_to_unicode_8zlz)
|
||||
AC_TRY_LINK([#include <idn2.h>],
|
||||
@@ -4928,6 +4933,9 @@ AS_IF([test "$use_libidn2" != "no"],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(WITH_IDN_OUT_SUPPORT, 1, [define if IDN output support is to be included.])],
|
||||
[AC_MSG_RESULT([no])])
|
||||
+ CFLAGS="$save_CFLAGS"
|
||||
+ LIBS="$save_LIBS"
|
||||
+ LDFLAGS="$save_LDFLAGS"
|
||||
])
|
||||
AC_SUBST([LIBIDN2_CFLAGS])
|
||||
AC_SUBST([LIBIDN2_LIBS])
|
||||
--
|
||||
2.14.3
|
||||
|
@ -39,7 +39,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
|
||||
Name: bind
|
||||
License: MPLv2.0
|
||||
Version: 9.11.3
|
||||
Release: 5%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
|
||||
Release: 6%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
|
||||
Epoch: 32
|
||||
Url: http://www.isc.org/products/BIND/
|
||||
#
|
||||
@ -113,6 +113,8 @@ Patch17: bind-9.3.2b1-fix_sdb_ldap.patch
|
||||
Patch73: bind-9.11-libidn2.patch
|
||||
# make +noidnout default
|
||||
Patch74: bind-9.11-libidn2-noout.patch
|
||||
# link libidn2 only to utils
|
||||
Patch75: bind-9.11-libidn2-exportfix.patch
|
||||
|
||||
|
||||
Requires(post): systemd
|
||||
@ -414,6 +416,7 @@ are used for building ISC DHCP.
|
||||
%endif
|
||||
%patch73 -p1 -b .libidn
|
||||
%patch74 -p1 -b .idn-noout
|
||||
%patch75 -p1 -b .idn-noexport
|
||||
%patch102 -p1 -b .rh452060
|
||||
%patch106 -p0 -b .rh490837
|
||||
%patch109 -p1 -b .rh478718
|
||||
@ -1361,6 +1364,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Apr 05 2018 Petr Menšík <pemensik@redhat.com> - 32:9.11.3-6
|
||||
- Do not link libidn2 to all libraries (#1098783)
|
||||
|
||||
* Tue Apr 03 2018 Petr Menšík <pemensik@redhat.com> - 32:9.11.3-5
|
||||
- Enable libidn2 support (#1098783)
|
||||
- Make +noidnout default
|
||||
|
Loading…
Reference in New Issue
Block a user