Control optional dependency with a build condition

This commit is contained in:
Jitka Plesnikova 2022-07-20 10:22:04 +02:00
parent 7375a641e8
commit 606e206f02

View File

@ -1,8 +1,10 @@
# Support isbn URN via Business::ISBN that needs gd library
%if 0%{?rhel}
%bcond_with perl_URI_enables_Business_ISBN
%bcond_with perl_URI_enables_Regexp_IPv6
%else
%bcond_without perl_URI_enables_Business_ISBN
%bcond_without perl_URI_enables_Regexp_IPv6
%endif
Name: perl-URI
@ -31,7 +33,6 @@ BuildRequires: perl(MIME::Base64) >= 2
BuildRequires: perl(Net::Domain)
BuildRequires: perl(overload)
BuildRequires: perl(parent)
BuildRequires: perl(Regexp::IPv6) >= 0.03
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(strict)
BuildRequires: perl(utf8)
@ -53,7 +54,6 @@ Requires: perl(Encode)
Requires: perl(MIME::Base64) >= 2
Requires: perl(Net::Domain)
Requires: perl(utf8)
Suggests: perl(Regexp::IPv6) >= 0.03
# Optional Functionality
%if %{with perl_URI_enables_Business_ISBN}
@ -64,6 +64,10 @@ BuildRequires: perl(Business::ISBN) >= 3.005
%endif
Suggests: perl(Business::ISBN) >= 3.005
%endif
%if %{with perl_URI_enables_Regexp_IPv6}
BuildRequires: perl(Regexp::IPv6) >= 0.03
Suggests: perl(Regexp::IPv6) >= 0.03
%endif
%description
This module implements the URI class. Objects of this class represent