Conditionalize Tk support

This commit is contained in:
Petr Písař 2021-01-26 15:22:04 +01:00
parent ca6f39e9e6
commit 2a8f234a6f

View File

@ -7,6 +7,13 @@
%bcond_without perl_AnyEvent_enables_POE
%endif
# Support Tk
%if 0%{?rhel} >= 9
%bcond_with perl_AnyEvent_enables_Tk
%else
%bcond_without perl_AnyEvent_enables_Tk
%endif
# A noarch-turned-arch package should not have debuginfo
%global debug_package %{nil}
@ -73,7 +80,9 @@ BuildRequires: perl(Glib) >= 1.210
%if %{with perl_AnyEvent_enables_POE}
BuildRequires: perl(POE) >= 1.312
%endif
%if %{with perl_AnyEvent_enables_Tk}
BuildRequires: perl(Tk)
%endif
%if 0%{?fedora}
BuildRequires: perl(AnyEvent::AIO)
BuildRequires: perl(EV) >= 4.00
@ -124,7 +133,9 @@ Requires: perl(Unicode::Normalize)
%global optional_deps %{optional_deps}|Qt
%global optional_deps %{optional_deps}|Qt::isa
%global optional_deps %{optional_deps}|Qt::slots
%if %{with perl_AnyEvent_enables_Tk}
%global optional_deps %{optional_deps}|Tk
%endif
%global optional_deps %{optional_deps}|UV
# Don't include optional dependencies
@ -160,6 +171,10 @@ find %{buildroot} -type f -name .packlist -delete
rm %{buildroot}%{perl_vendorarch}/AnyEvent/Impl/POE.pm
rm %{buildroot}%{_mandir}/man3/AnyEvent::Impl::POE.3*
%endif
%if !%{with perl_AnyEvent_enables_Tk}
rm %{buildroot}%{perl_vendorarch}/AnyEvent/Impl/Tk.pm
rm %{buildroot}%{_mandir}/man3/AnyEvent::Impl::Tk.3*
%endif
%check
@ -194,7 +209,9 @@ make test
%{perl_vendorarch}/AnyEvent/Impl/POE.pm
%endif
%{perl_vendorarch}/AnyEvent/Impl/Qt.pm
%if %{with perl_AnyEvent_enables_Tk}
%{perl_vendorarch}/AnyEvent/Impl/Tk.pm
%endif
%{perl_vendorarch}/AnyEvent/Impl/UV.pm
%{perl_vendorarch}/AnyEvent/Intro.pod
%{perl_vendorarch}/AnyEvent/IO.pm
@ -229,7 +246,9 @@ make test
%endif
%{_mandir}/man3/AnyEvent::Impl::Perl.3*
%{_mandir}/man3/AnyEvent::Impl::Qt.3*
%if %{with perl_AnyEvent_enables_Tk}
%{_mandir}/man3/AnyEvent::Impl::Tk.3*
%endif
%{_mandir}/man3/AnyEvent::Impl::UV.3*
%{_mandir}/man3/AnyEvent::Intro.3*
%{_mandir}/man3/AnyEvent::IO.3*
@ -246,6 +265,7 @@ make test
%changelog
* Tue Jan 26 2021 Petr Pisar <ppisar@redhat.com> - 7.17-6
- Conditionalize POE support
- Conditionalize Tk support
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.17-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild