Conditionalize Glib support

This commit is contained in:
Petr Písař 2021-01-26 15:34:20 +01:00
parent 2a8f234a6f
commit 56383aa5cb

View File

@ -1,5 +1,12 @@
#global subver 1
# Support Glib
%if 0%{?rhel} >= 9
%bcond_with perl_AnyEvent_enables_Glib
%else
%bcond_without perl_AnyEvent_enables_Glib
%endif
# Support POE
%if 0%{?rhel} >= 9
%bcond_with perl_AnyEvent_enables_POE
@ -76,7 +83,9 @@ BuildRequires: perl(warnings)
# Test suite does not currently test the Qt event loop
%if 0%{!?perl_bootstrap:1}
BuildRequires: perl(Event)
%if %{with perl_AnyEvent_enables_Glib}
BuildRequires: perl(Glib) >= 1.210
%endif
%if %{with perl_AnyEvent_enables_POE}
BuildRequires: perl(POE) >= 1.312
%endif
@ -123,7 +132,9 @@ Requires: perl(Unicode::Normalize)
%global optional_deps %{optional_deps}|Event::Lib
%global optional_deps %{optional_deps}|EventLoop
%global optional_deps %{optional_deps}|FLTK
%if %{with perl_AnyEvent_enables_Glib}
%global optional_deps %{optional_deps}|Glib
%endif
%global optional_deps %{optional_deps}|IO::AIO
%global optional_deps %{optional_deps}|IO::Async::Loop
%global optional_deps %{optional_deps}|Irssi
@ -167,6 +178,10 @@ make %{?_smp_mflags}
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -delete
%{_fixperms} -c %{buildroot}
%if !%{with perl_AnyEvent_enables_Glib}
rm %{buildroot}%{perl_vendorarch}/AnyEvent/Impl/Glib.pm
rm %{buildroot}%{_mandir}/man3/AnyEvent::Impl::Glib.3*
%endif
%if !%{with perl_AnyEvent_enables_POE}
rm %{buildroot}%{perl_vendorarch}/AnyEvent/Impl/POE.pm
rm %{buildroot}%{_mandir}/man3/AnyEvent::Impl::POE.3*
@ -201,7 +216,9 @@ make test
%{perl_vendorarch}/AnyEvent/Impl/Event.pm
%{perl_vendorarch}/AnyEvent/Impl/EventLib.pm
%{perl_vendorarch}/AnyEvent/Impl/FLTK.pm
%if %{with perl_AnyEvent_enables_Glib}
%{perl_vendorarch}/AnyEvent/Impl/Glib.pm
%endif
%{perl_vendorarch}/AnyEvent/Impl/IOAsync.pm
%{perl_vendorarch}/AnyEvent/Impl/Irssi.pm
%{perl_vendorarch}/AnyEvent/Impl/Perl.pm
@ -238,7 +255,9 @@ make test
%{_mandir}/man3/AnyEvent::Impl::Event.3*
%{_mandir}/man3/AnyEvent::Impl::EventLib.3*
%{_mandir}/man3/AnyEvent::Impl::FLTK.3*
%if %{with perl_AnyEvent_enables_Glib}
%{_mandir}/man3/AnyEvent::Impl::Glib.3*
%endif
%{_mandir}/man3/AnyEvent::Impl::IOAsync.3*
%{_mandir}/man3/AnyEvent::Impl::Irssi.3*
%if %{with perl_AnyEvent_enables_POE}
@ -266,6 +285,7 @@ make test
* Tue Jan 26 2021 Petr Pisar <ppisar@redhat.com> - 7.17-6
- Conditionalize POE support
- Conditionalize Tk support
- Conditionalize Glib support
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.17-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild