diff --git a/0001-cppunit-config-no-longer-exists-use-pkg-config.patch b/0001-cppunit-config-no-longer-exists-use-pkg-config.patch new file mode 100644 index 0000000..c979ff4 --- /dev/null +++ b/0001-cppunit-config-no-longer-exists-use-pkg-config.patch @@ -0,0 +1,49 @@ +From 9c35377eaeebf366b3fbc65ddf19cce50551ad68 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Mon, 15 Feb 2016 18:39:45 +0100 +Subject: [PATCH] cppunit-config no longer exists, use pkg-config + +--- + configure.ac | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 981337d..2e663de 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -123,7 +123,6 @@ AC_PATH_PROG(LN, ln, cp) + AC_PATH_PROG(CHMOD, chmod, $FALSE) + AC_PATH_PROG(TR, tr, $FALSE) + AC_PATH_PROG(RM, rm, $FALSE) +-AC_PATH_PROG(CPPUNITCONFIG, cppunit-config, false) + dnl Libtool 2.2.6 requires: rm -f + RM="$RM -f" + +@@ -2728,19 +2727,18 @@ SQUID_DEFINE_BOOL(X_ACCELERATOR_VARY,${enable_x_accelerator_vary:=no}, + AC_MSG_NOTICE([X-Accelerator-Vary support enabled: $enable_x_accelerator_vary]) + + +-if $CPPUNITCONFIG --help >/dev/null; then +- squid_cv_cppunit_version="`$CPPUNITCONFIG --version`" ++PKG_CHECK_MODULES([SQUID_CPPUNIT], [cppunit], [ ++ squid_cv_cppunit_version="`$PKG_CONFIG --modversion cppunit`" + AC_MSG_NOTICE([using system installed cppunit version $squid_cv_cppunit_version]) + unset squid_cv_cppunit_version +- SQUID_CPPUNIT_LIBS="`$CPPUNITCONFIG --libs`" + SQUID_CPPUNIT_LA='' +- SQUID_CPPUNIT_INC="`$CPPUNITCONFIG --cflags`" +-else ++ SQUID_CPPUNIT_INC="$SQUID_CPPUNIT_CFLAGS" ++], [ + AC_MSG_WARN([cppunit does not appear to be installed. squid does not require this, but code testing with 'make check' will fail.]) + SQUID_CPPUNIT_LA='' + SQUID_CPPUNIT_LIBS='' + SQUID_CPPUNIT_INC='' +-fi ++]) + + AC_ARG_WITH(cppunit-basedir, + AS_HELP_STRING([--with-cppunit-basedir=PATH], +-- +2.5.0 + diff --git a/squid.spec b/squid.spec index 8eb606f..931bfdd 100644 --- a/squid.spec +++ b/squid.spec @@ -31,6 +31,7 @@ Patch201: squid-3.1.0.9-config.patch Patch202: squid-3.1.0.9-location.patch Patch203: squid-3.0.STABLE1-perlpath.patch Patch204: squid-3.5.9-include-guards.patch +Patch205: 0001-cppunit-config-no-longer-exists-use-pkg-config.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: bash >= 2.0 @@ -63,7 +64,8 @@ BuildRequires: gcc-c++ # BuildRequires: libtool libtool-ltdl-devel # For test suite -BuildRequires: cppunit-devel +BuildRequires: pkgconfig(cppunit) +BuildRequires: autoconf %description Squid is a high-performance proxy caching server for Web clients, @@ -89,8 +91,11 @@ lookup program (dnsserver), a program for retrieving FTP data %patch202 -p1 -b .location %patch203 -p1 -b .perlpath %patch204 -p0 -b .include-guards +%patch205 -p1 -b .cppunit-config %build +# cppunit-config patch changes configure.ac +autoconf # libtool fails somewhat on -fpie. PIC also works for -pie CXXFLAGS="$RPM_OPT_FLAGS -fPIC"