From 606e206f02dda85376abf6eeb2cda3628ae60791 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Jul 20 2022 08:22:04 +0000 Subject: Control optional dependency with a build condition --- diff --git a/perl-URI.spec b/perl-URI.spec index 883b693..69269ce 100644 --- a/perl-URI.spec +++ b/perl-URI.spec @@ -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