Introduce a build-condition on groff

This allows to build perl without need of groff. The macro
_without_perl_enables_groff has "perl" identifier to compete with
perl.spec because this is a core module.
This commit is contained in:
Petr Písař 2017-04-03 09:41:45 +02:00
parent 2e3822441f
commit 0cd1cd3c77
1 changed files with 12 additions and 1 deletions

View File

@ -1,9 +1,13 @@
# Optional features
# Tk support
%bcond_without tk
# Support for groff
%bcond_without perl_enables_groff
Name: perl-Pod-Perldoc
# let's overwrite the module from perl.srpm
Version: 3.28
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Look up Perl documentation in Pod format
License: GPL+ or Artistic
Group: Development/Libraries
@ -18,8 +22,10 @@ BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Run-time:
%if %{with perl_enables_groff}
# Pod::Perldoc::ToMan executes roff
BuildRequires: groff-base
%endif
BuildRequires: perl(Carp)
BuildRequires: perl(Config)
BuildRequires: perl(Encode)
@ -56,8 +62,10 @@ BuildRequires: perl(Tk::Pod)
%endif
%endif
%endif
%if %{with perl_enables_groff}
# Pod::Perldoc::ToMan executes roff
Requires: groff-base
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(File::Temp) >= 0.22
Requires: perl(HTTP::Tiny)
@ -104,6 +112,9 @@ make test
%{_mandir}/man3/*
%changelog
* Mon Apr 03 2017 Petr Pisar <ppisar@redhat.com> - 3.28-2
- Introduce a build-condition on groff
* Thu Mar 16 2017 Petr Pisar <ppisar@redhat.com> - 3.28-1
- 3.28 bump