Fix lack of zlib.pc and auto-pkgconfig deps on EL5

f38
David Woodhouse 13 years ago
parent d76bcbf287
commit 44d3dc28e6

@ -0,0 +1,58 @@
From 644b8aa5f6235ee57a8a91a1db5a02174f57445c Mon Sep 17 00:00:00 2001
From: David Woodhouse <David.Woodhouse@intel.com>
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 <David.Woodhouse@intel.com>
---
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

@ -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 <David.Woodhouse@intel.com> - 4.00-3
- Remove zlib from openconnect.pc dependencies
* Thu Jun 21 2012 David Woodhouse <David.Woodhouse@intel.com> - 4.00-2
- Fix dependencies for RHEL[56]

Loading…
Cancel
Save