[ldns/f19] make ldns-config multilib clean
Tomas Hozza
thozza at fedoraproject.org
Tue Jul 23 09:31:23 UTC 2013
commit f06030fa5e3c11854b4d813fe679ae0bcbb78fce
Author: Tomas Hozza <thozza at redhat.com>
Date: Mon Jul 22 14:51:28 2013 +0200
make ldns-config multilib clean
Signed-off-by: Tomas Hozza <thozza at redhat.com>
ldns-1.6.16-multilib.patch | 106 ++++++++++++++++++++++++++++++++++++++++++++
ldns.spec | 3 +
2 files changed, 109 insertions(+), 0 deletions(-)
---
diff --git a/ldns-1.6.16-multilib.patch b/ldns-1.6.16-multilib.patch
new file mode 100644
index 0000000..967e860
--- /dev/null
+++ b/ldns-1.6.16-multilib.patch
@@ -0,0 +1,106 @@
+From 3a006cd795855bf2cad86e0e86cd485d27548f36 Mon Sep 17 00:00:00 2001
+From: Tomas Hozza <thozza at redhat.com>
+Date: Fri, 19 Jul 2013 12:11:44 +0200
+Subject: [PATCH] Make ldns-config multilib clean
+
+Signed-off-by: Tomas Hozza <thozza at redhat.com>
+---
+ configure | 3 +++
+ packaging/ldns-config.1 | 4 ++++
+ packaging/ldns-config.in | 26 +++++++++++++++++++++-----
+ 3 files changed, 28 insertions(+), 5 deletions(-)
+
+diff --git a/configure b/configure
+index be312d1..ec8d551 100755
+--- a/configure
++++ b/configure
+@@ -674,6 +674,7 @@ PYTHON_SITE_PKG
+ PYTHON_LDFLAGS
+ PYTHON_CPPFLAGS
+ PYTHON
++PYTHON_LIB
+ PYTHON_VERSION
+ UNINSTALL_CONFIG_MANPAGE
+ UNINSTALL_CONFIG
+@@ -6356,6 +6357,7 @@ EOD
+ # use the official shared library
+ ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
+ PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"
++ PYTHON_LIB="$ac_python_library"
+ else
+ # old way: use libpython from python_configdir
+ ac_python_libdir=`$PYTHON -c \
+@@ -6363,6 +6365,7 @@ EOD
+ import os; \
+ print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
+ PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
++ PYTHON_LIB="python$ac_python_version"
+ fi
+
+ if test -z "PYTHON_LDFLAGS"; then
+diff --git a/packaging/ldns-config.1 b/packaging/ldns-config.1
+index c5a00a1..1e4ff93 100644
+--- a/packaging/ldns-config.1
++++ b/packaging/ldns-config.1
+@@ -23,6 +23,10 @@ Show the C compiler flags needed to compile with ldns
+ Show the flags to be used to link with ldns
+
+ .TP
++\fB--libs_sec\fR
++Show the flags to be used to link with ldns compiled for secondary architecture.
++
++.TP
+ \fB--version\fR
+ Shows the version of the installed ldns library
+
+diff --git a/packaging/ldns-config.in b/packaging/ldns-config.in
+index b728ba5..e34051f 100755
+--- a/packaging/ldns-config.in
++++ b/packaging/ldns-config.in
+@@ -3,12 +3,24 @@
+ prefix="@prefix@"
+ exec_prefix="@exec_prefix@"
+ VERSION="@PACKAGE_VERSION@"
+-CFLAGS="@CFLAGS@"
+-CPPFLAGS="@CPPFLAGS@ @LIBSSL_CPPFLAGS@ @PYTHON_CPPFLAGS@"
+-LDFLAGS="@LDFLAGS@ @LIBSSL_LDFLAGS@ @PYTHON_LDFLAGS@"
+ LIBS="@LIBS@ @LIBSSL_LIBS@"
+-LIBDIR="@libdir@"
+ INCLUDEDIR="@includedir@"
++ARCH="`uname -m`"
++
++case $ARCH in
++ x86_64 | amd64 | sparc64 | s390x | ppc64)
++
++ LIBDIR="/usr/lib64"
++ LIBDIR_SEC="/usr/lib"
++ ;;
++ * )
++ LIBDIR="/usr/lib"
++ LIBDIR_SEC="usr/lib64"
++ ;;
++esac
++
++LDFLAGS="@LDFLAGS@ @LIBSSL_LDFLAGS@ -L$LIBDIR -l at PYTHON_LIB@"
++LDFLAGS_SEC="@LDFLAGS@ @LIBSSL_LDFLAGS@ -L$LIBDIR_SEC -l at PYTHON_LIB@"
+
+ for arg in $@
+ do
+@@ -20,9 +32,13 @@ do
+ then
+ echo "${LDFLAGS} -L${LIBDIR} ${LIBS} -lldns"
+ fi
++ if [ $arg = "--libs_sec" ]
++ then
++ echo "${LDFLAGS_SEC} -L${LIBDIR_SEC} ${LIBS} -lldns"
++ fi
+ if [ $arg = "-h" ] || [ $arg = "--help" ]
+ then
+- echo "Usage: $0 [--cflags] [--libs] [--version]"
++ echo "Usage: $0 [--cflags] [--libs] [--libs_sec] [--version]"
+ fi
+ if [ $arg = "--version" ]
+ then
+--
+1.8.3.1
+
diff --git a/ldns.spec b/ldns.spec
index 731a62d..08ff0cc 100644
--- a/ldns.spec
+++ b/ldns.spec
@@ -13,6 +13,7 @@ License: BSD
Url: http://www.nlnetlabs.nl/%{name}/
Source: http://www.nlnetlabs.nl/downloads/%{name}/%{name}-%{version}.tar.gz
Patch0: %{name}-1.6.16-uninitialized-value-compiler-warnings.patch
+Patch1: %{name}-1.6.16-multilib.patch
Group: System Environment/Libraries
BuildRequires: perl, libpcap-devel, openssl-devel, gcc-c++, doxygen,
# for snapshots only
@@ -58,6 +59,7 @@ This package contains documentation for the ldns library
%prep
%setup -q
%patch0 -p2
+%patch1 -p1
# To built svn snapshots
# rm config.guess config.sub ltmain.sh
# aclocal
@@ -144,6 +146,7 @@ rm -rf %{buildroot}
%changelog
* Fri Jul 19 2013 Tomas Hozza <thozza at redhat.com> - 1.6.16-5
- Fix compiler warnings and one uninitialized value
+- make ldns-config multilib clean
* Mon Jun 03 2013 Paul Wouters <pwouters at redhat.com> - 1.6.16-4
- Use /var/lib/unbound/root.key for --with-trust-anchor
More information about the scm-commits
mailing list