From 5e8d89ab8154783b843917bcd4cb99fb09169d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 4 Dec 2019 10:55:42 +0100 Subject: [PATCH] Subpackage if --- gendep.macros | 4 +++- perl.spec | 27 ++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/gendep.macros b/gendep.macros index 87ce973..77fe473 100644 --- a/gendep.macros +++ b/gendep.macros @@ -700,6 +700,9 @@ Requires: perl(strict) \ Requires: perl(warnings) \ Provides: perl(HTTP::Tiny) = 0.076 \ %{nil} +%global gendep_perl_if \ +Provides: perl(if) = 0.0608 \ +%{nil} %global gendep_perl_IO \ Requires: perl(:VERSION) >= 5.8.0 \ Requires: perl(Carp) \ @@ -1938,7 +1941,6 @@ Provides: perl(diagnostics) = 1.36 \ Provides: perl(dumpvar.pl) \ Provides: perl(feature) = 1.54 \ Provides: perl(filetest) = 1.03 \ -Provides: perl(if) = 0.0608 \ Provides: perl(less) = 0.03 \ Provides: perl(lib) = 0.65 \ Provides: perl(locale) = 1.09 \ diff --git a/perl.spec b/perl.spec index b1ac786..6b132b1 100644 --- a/perl.spec +++ b/perl.spec @@ -389,7 +389,7 @@ Requires: perl-fields, perl-File-Fetch, perl-File-Path, perl-File-Temp, Requires: perl-Filter, perl-Filter-Simple, Requires: perl-Getopt-Long, Requires: perl-HTTP-Tiny, -Requires: perl-IO, perl-IO-Compress, perl-IO-Socket-IP, +Requires: perl-if, perl-IO, perl-IO-Compress, perl-IO-Socket-IP, Requires: perl-IO-Zlib, perl-IPC-Cmd, perl-IPC-SysV, Requires: perl-JSON-PP, Requires: perl-libnet, perl-libnetcfg, @@ -1747,6 +1747,22 @@ case with the more traditional single-letter approach, is provided but not enabled by default. %endif +%package if +Summary: Use a Perl module if a condition holds +License: GPL+ or Artistic +Epoch: 0 +# Normalized 0.0608 +Version: 0.60.800 +Requires: %perl_compat +%if %{defined perl_bootstrap} +%gendep_perl_if +%endif +BuildArch: noarch +Conflicts: perl-interpreter < 4:5.30.1-451 + +%description if +The "if" module is used to conditionally load another module. + %package IO Summary: Perl input/output modules License: GPL+ or Artistic @@ -3855,6 +3871,10 @@ popd %exclude %{privlib}/Getopt/Long.pm %exclude %{_mandir}/man3/Getopt::Long.3* +# if +%exclude %{privlib}/if.pm +%exclude %{_mandir}/man3/if.3* + # IO %exclude %dir %{archlib}/IO %exclude %{archlib}/IO.pm @@ -4854,6 +4874,10 @@ popd %{_mandir}/man3/Getopt::Long.3* %endif +%files if +%{privlib}/if.pm +%{_mandir}/man3/if.3* + %files IO %dir %{archlib}/IO %{archlib}/IO.pm @@ -5488,6 +5512,7 @@ popd - Subpackage base and fields - Subpackage Dumpvalue - Subpackage encoding-warnings +- Subpackage if * Wed Jan 29 2020 Fedora Release Engineering - 4:5.30.1-450 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild