Restore original libcurl.pc.in for OpenSSL

This commit is contained in:
Mikhail Novosyolov 2020-01-30 04:21:06 +03:00
parent 665d29f90d
commit 27b784f0d9

View file

@ -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"