From 27b784f0d9a275c11a11166920f26ea916be3b75 Mon Sep 17 00:00:00 2001 From: Mikhail Novosyolov Date: Thu, 30 Jan 2020 04:21:06 +0300 Subject: [PATCH] Restore original libcurl.pc.in for OpenSSL --- curl.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/curl.spec b/curl.spec index 9a816b9..0941df2 100644 --- a/curl.spec +++ b/curl.spec @@ -29,7 +29,7 @@ Summary: Gets a file from a FTP, GOPHER or HTTP server Name: curl Version: 7.68.0 -Release: 7 +Release: 8 Epoch: 1 License: BSD-like Group: Networking/Other @@ -193,7 +193,11 @@ Example files for %{name} development. %prep %setup -q +cp libcurl.pc.in libcurl.pc.in.0 %apply_patches +# after Patch3 curl-libressl.patch +# 0 - original (OpenSSL), 1 - patched (LibreSSL) +cp libcurl.pc.in libcurl.pc.in.1 regexp="$(echo %{ssl_list} | sed -e 's, ,|,g')" for i in %{ssl_list}; do mkdir -p "$i" @@ -208,6 +212,9 @@ rm -fr $(ls -1v | grep -vE "${regexp}|docs|COPYING|CHANGES") ADD_CONF_OPTS="" case "$SSL" in libressl ) + cp libcurl.pc.in.1 libcurl.pc.in + # validate that correct file is being used + grep -q LIBRESSL_ libcurl.pc.in new_libname=libcurl-libressl sed -i configure.ac \ -e 's,openssl.pc,libressl.pc,g' \ @@ -227,6 +234,8 @@ case "$SSL" in " ;; openssl ) + cp libcurl.pc.in.0 libcurl.pc.in + ! grep -q LIBRESSL_ libcurl.pc.in new_libname=libcurl export LIBS="$(pkg-config --cflags-only-I --libs-only-L openssl)" export CFLAGS="$LIBS"