Use bcond for http2 support

This commit is contained in:
Ilfat G 2023-02-10 15:46:27 +03:00
parent 57e5d25017
commit 3164cb8cc7
No known key found for this signature in database
GPG key ID: D5E884CA11E29755

View file

@ -22,6 +22,10 @@
# GnuTLS, btw, is also capable of GOST. # GnuTLS, btw, is also capable of GOST.
%bcond_without gnutls %bcond_without gnutls
# To build rpm with new python:
# nghttp2-devel requires boost-devel which depends on old python
%bcond_without http2
# Important! We perform autoreconf, then change resulting 'configure' # Important! We perform autoreconf, then change resulting 'configure'
# script, this prevents if from regenerating after we have changed it. # script, this prevents if from regenerating after we have changed it.
%define _disable_rebuild_configure 1 %define _disable_rebuild_configure 1
@ -50,7 +54,7 @@
Summary: Gets a file from a FTP, GOPHER or HTTP server Summary: Gets a file from a FTP, GOPHER or HTTP server
Name: curl Name: curl
Version: 7.86.0 Version: 7.86.0
Release: 1 Release: 2
Epoch: 1 Epoch: 1
License: BSD-like License: BSD-like
Group: Networking/Other Group: Networking/Other
@ -69,7 +73,9 @@ BuildRequires: pkgconfig(libcares)
BuildRequires: pkgconfig(com_err) BuildRequires: pkgconfig(com_err)
#BuildRequires: pkgconfig(libidn) #BuildRequires: pkgconfig(libidn)
BuildRequires: pkgconfig(libidn2) BuildRequires: pkgconfig(libidn2)
%if %{with http2}
BuildRequires: pkgconfig(libnghttp2) BuildRequires: pkgconfig(libnghttp2)
%endif
%if 0%{?ssh2} %if 0%{?ssh2}
BuildRequires: pkgconfig(libssh2) BuildRequires: pkgconfig(libssh2)
%else %else
@ -381,7 +387,9 @@ sed -i configure \
--with-zlib \ --with-zlib \
--with-lber-lib=lber \ --with-lber-lib=lber \
--with-libidn2 \ --with-libidn2 \
%if %{with http2}
--with-nghttp2 \ --with-nghttp2 \
%endif
%if 0%{?ssh2} %if 0%{?ssh2}
--with-ssh2 \ --with-ssh2 \
%else %else