adapt patches for new version

This commit is contained in:
Mikhail Novosyolov 2021-09-07 21:28:56 +03:00
parent b65b4c603b
commit 092a316092
3 changed files with 24 additions and 84 deletions

View file

@ -1,61 +0,0 @@
From 3602ee9dcc74683f91fe4f9ca228aa17a6474403 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Wed, 31 Oct 2012 11:38:30 +0100
Subject: [PATCH] prevent configure script from discarding -g in CFLAGS
(#496778)
---
m4/curl-compilers.m4 | 26 ++++++--------------------
1 file changed, 6 insertions(+), 20 deletions(-)
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index c64db4bc6..d115a4aed 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -106,18 +106,11 @@ AC_DEFUN([CURL_CHECK_COMPILER_CLANG], [
clangvhi=`echo $clangver | cut -d . -f1`
clangvlo=`echo $clangver | cut -d . -f2`
compiler_num=`(expr $clangvhi "*" 100 + $clangvlo) 2>/dev/null`
- flags_dbg_all="-g -g0 -g1 -g2 -g3"
- flags_dbg_all="$flags_dbg_all -ggdb"
- flags_dbg_all="$flags_dbg_all -gstabs"
- flags_dbg_all="$flags_dbg_all -gstabs+"
- flags_dbg_all="$flags_dbg_all -gcoff"
- flags_dbg_all="$flags_dbg_all -gxcoff"
- flags_dbg_all="$flags_dbg_all -gdwarf-2"
- flags_dbg_all="$flags_dbg_all -gvms"
+ flags_dbg_all=""
flags_dbg_yes="-g"
flags_dbg_off=""
- flags_opt_all="-O -O0 -O1 -O2 -Os -O3 -O4"
- flags_opt_yes="-Os"
+ flags_opt_all=""
+ flags_opt_yes=""
flags_opt_off="-O0"
else
AC_MSG_RESULT([no])
@@ -175,18 +168,11 @@ AC_DEFUN([CURL_CHECK_COMPILER_GNU_C], [
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
- flags_dbg_all="-g -g0 -g1 -g2 -g3"
- flags_dbg_all="$flags_dbg_all -ggdb"
- flags_dbg_all="$flags_dbg_all -gstabs"
- flags_dbg_all="$flags_dbg_all -gstabs+"
- flags_dbg_all="$flags_dbg_all -gcoff"
- flags_dbg_all="$flags_dbg_all -gxcoff"
- flags_dbg_all="$flags_dbg_all -gdwarf-2"
- flags_dbg_all="$flags_dbg_all -gvms"
+ flags_dbg_all=""
flags_dbg_yes="-g"
flags_dbg_off=""
- flags_opt_all="-O -O0 -O1 -O2 -O3 -Os -Og -Ofast"
- flags_opt_yes="-O2"
+ flags_opt_all=""
+ flags_opt_yes=""
flags_opt_off="-O0"
CURL_CHECK_DEF([_WIN32], [], [silent])
else
--
1.7.1

View file

@ -2,26 +2,6 @@ This script finds system OpenSSL despite I want it to use LibreSSL from /opt/lib
Do not find it automatically -- we have set $LIBS and $PREFIX_OPENSSL
// mikhailnov, 25.12.2019
diff --git a/configure.ac b/configure.ac
index 39bdb5ef1..1f0b02dc2 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1755,13 +1755,13 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
case "$OPT_SSL" in
yes)
dnl --with-ssl (without path) used
- PKGTEST="yes"
+ PKGTEST="no"
PREFIX_OPENSSL=/usr/local/ssl
LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
;;
off)
dnl no --with-ssl option given, just check default places
- PKGTEST="yes"
+ PKGTEST="no"
PREFIX_OPENSSL=
;;
*)
diff --git a/libcurl.pc.in b/libcurl.pc.in
index 8ac15d407..19cb8e24d 100644
--- a/libcurl.pc.in
@ -37,3 +17,16 @@ index 8ac15d407..19cb8e24d 100644
+Libs.private: @LIBCURL_LIBS@ @LIBRESSL_LIBS_PRIVATE@
+Cflags: -I${includedir} @CPPFLAG_CURL_STATICLIB@ @LIBRESSL_CFLAGS@
+Requires.private: libressl
diff --git a/m4/curl-openssl.m4 b/m4/curl-openssl.m4
index 835768e1b..d2be47f08 100644
--- a/m4/curl-openssl.m4
+++ b/m4/curl-openssl.m4
@@ -315,7 +315,7 @@ if test "x$OPT_OPENSSL" != xno; then
case "$OPT_OPENSSL" in
yes)
dnl --with-openssl (without path) used
- PKGTEST="yes"
+ PKGTEST="no"
PREFIX_OPENSSL=
;;
*)

View file

@ -59,7 +59,6 @@ Url: https://curl.haxx.se
#Source0: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
Source0: https://github.com/curl/curl/archive/curl-%(echo %{version} | sed -e 's,\.,_,g').tar.gz?/%{name}-%{version}.tar.gz
Patch0: %{name}-7.59.0-multilib.patch
Patch2: %{name}-7.59.0-debug.patch
Patch3: %{name}-libressl.patch
BuildRequires: groff
BuildRequires: rsync
@ -285,6 +284,12 @@ Example files for %{name} development.
%setup -q -n curl-curl-%(echo %{version} | sed -e 's,\.,_,g')
cp libcurl.pc.in libcurl.pc.in.0
%apply_patches
# Prevent configure script from discarding -g in CFLAGS
# https://bugzilla.redhat.com/show_bug.cgi?id=496778
for i in flags_dbg_all flags_opt_all flags_opt_yes flags_dbg_yes
do
sed -i'' -E -e "s,flags_dbg_yes=.+,flags_dbg_yes=''," m4/curl-compilers.m4
done
# after Patch3 curl-libressl.patch
# 0 - original (OpenSSL), 1 - patched (LibreSSL)
cp libcurl.pc.in libcurl.pc.in.1
@ -313,11 +318,12 @@ ADD_CONF_OPTS=""
case "$SSL" in
libressl )
with_gnutls=without
with_openssl=with
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 \
sed -i'' m4/curl-openssl.m4 \
-e 's,openssl.pc,libressl.pc,g' \
-e 's,PKGCONFIG(openssl,PKGCONFIG(libressl,g' \
-e 's,$PREFIX_OPENSSL/lib$libsuff,$PREFIX_OPENSSL/lib,g'
@ -334,6 +340,7 @@ case "$SSL" in
;;
openssl )
with_gnutls=without
with_openssl=with
cp libcurl.pc.in.0 libcurl.pc.in
! grep -q LIBRESSL_ libcurl.pc.in
new_libname=libcurl
@ -344,6 +351,7 @@ case "$SSL" in
;;
gnutls )
with_gnutls=with
with_openssl=without
new_libname=libcurl-gnutls
# It will be /usr/include/curl-libressl/gnutls
# to allow '#include <curl/xxx.h> to work with -I/usr/include/curl-gnuttls
@ -360,7 +368,7 @@ sed -i configure \
%configure \
--disable-static \
--with-ssl=off \
--${with_openssl}-openssl \
--${with_gnutls}-gnutls \
--without-bearssl \
--with-zlib \