From 44d3dc28e6cb0f9c3b6413d8c6cc0016fd401161 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 21 Jun 2012 17:08:55 +0100 Subject: [PATCH] Fix lack of zlib.pc and auto-pkgconfig deps on EL5 --- ...ib-in-pkgconfig-if-it-was-found-with.patch | 58 +++++++++++++++++++ openconnect.spec | 8 ++- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 0001-Don-t-require-zlib-in-pkgconfig-if-it-was-found-with.patch diff --git a/0001-Don-t-require-zlib-in-pkgconfig-if-it-was-found-with.patch b/0001-Don-t-require-zlib-in-pkgconfig-if-it-was-found-with.patch new file mode 100644 index 0000000..82163e1 --- /dev/null +++ b/0001-Don-t-require-zlib-in-pkgconfig-if-it-was-found-with.patch @@ -0,0 +1,58 @@ +From 644b8aa5f6235ee57a8a91a1db5a02174f57445c Mon Sep 17 00:00:00 2001 +From: David Woodhouse +Date: Thu, 21 Jun 2012 17:04:23 +0100 +Subject: [PATCH] Don't require zlib in pkgconfig if it was found without it + +Signed-off-by: David Woodhouse +--- + configure.ac | 2 +- + openconnect.pc.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 8216fe0..2ff8a54 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -359,7 +359,7 @@ AM_CONDITIONAL(HAVE_SYMBOL_VERSIONING, [test "${symvers}" != "no"]) + + PKG_CHECK_MODULES(LIBXML2, libxml-2.0) + +-PKG_CHECK_MODULES(ZLIB, zlib, [], ++PKG_CHECK_MODULES(ZLIB, zlib, [AC_SUBST(ZLIB_PC, [zlib])], + [oldLIBS="$LIBS" + LIBS="$LIBS -lz" + AC_MSG_CHECKING([for zlib without pkg-config]) +diff --git a/openconnect.pc.in b/openconnect.pc.in +index 23b818f..012431f 100644 +--- a/openconnect.pc.in ++++ b/openconnect.pc.in +@@ -7,7 +7,7 @@ includedir=@includedir@ + Name: openconnect + Description: OpenConnect VPN client + Version: @VERSION@ +-Requires.private: @LIBPROXY_PC@ zlib @SSL_LIBRARY@ @P11KIT_PC@ libxml-2.0 ++Requires.private: @LIBPROXY_PC@ @ZLIB_PC@ @SSL_LIBRARY@ @P11KIT_PC@ libxml-2.0 + Libs: -L${libdir} -lopenconnect + Libs.private: @LIBINTL@ + Cflags: -I${includedir} +-- +1.7.10.2 + +--- ./configure.400 2012-06-21 17:05:58.065101753 +0100 ++++ ./configure 2012-06-21 17:06:06.903976972 +0100 +@@ -623,6 +623,7 @@ PYTHON + LIBPROXY_PC + LIBPROXY_LIBS + LIBPROXY_CFLAGS ++ZLIB_PC + ZLIB_LIBS + ZLIB_CFLAGS + LIBXML2_LIBS +@@ -12702,6 +12703,7 @@ else + ZLIB_LIBS=$pkg_cv_ZLIB_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } ++ ZLIB_PC=zlib + + fi + diff --git a/openconnect.spec b/openconnect.spec index 6271a4c..719b65d 100644 --- a/openconnect.spec +++ b/openconnect.spec @@ -15,7 +15,7 @@ Name: openconnect Version: 4.00 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Open client for Cisco AnyConnect VPN Group: Applications/Internet @@ -24,6 +24,7 @@ URL: http://www.infradead.org/openconnect.html Source0: ftp://ftp.infradead.org/pub/openconnect/openconnect-%{version}.tar.gz Source1: library15.c Source2: libopenconnect15.map +Patch1: 0001-Don-t-require-zlib-in-pkgconfig-if-it-was-found-with.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: openssl-devel libxml2-devel gtk2-devel GConf2-devel dbus-devel @@ -54,6 +55,7 @@ HTTPS and DTLS protocols. Summary: Development package for OpenConnect VPN authentication tools Group: Applications/Internet Requires: %{name} = %{version}-%{release} +Requires: openssl-devel zlib-devel %description devel This package provides the core HTTP and authentication support from @@ -72,6 +74,7 @@ of the library. %prep %setup -q +%patch1 -p1 %if %{build_compat_lib} cp %{SOURCE1} . cp %{SOURCE2} libopenconnect15.map.in @@ -147,6 +150,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/openconnect.pc %changelog +* Thu Jun 21 2012 David Woodhouse - 4.00-3 +- Remove zlib from openconnect.pc dependencies + * Thu Jun 21 2012 David Woodhouse - 4.00-2 - Fix dependencies for RHEL[56]