Summary:        Framework for multiple event loops
Name:           perl-AnyEvent
Version:        7.17
Release:        1%{?_dist_release}
Group:          programming
Vendor:         Project Vine
Distribution:   Vine Linux

License:        GPL+ or Artistic
URL:            https://metacpan.org/pod/AnyEvent
Source0:        https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/AnyEvent-%{version}%{?subver}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#BuildArch:      noarch
BuildRequires:  perl(ExtUtils::MakeMaker)
# Needed for test
BuildRequires:  perl(Test::Simple)
Obsoletes:      perl-AnyEvent < %{version}-%{release}
Requires:  perl

# Optional dependencies we don't want to require
%global optional_deps AnyEvent::AIO
%global optional_deps %{optional_deps}|Cocoa::EventLoop
%global optional_deps %{optional_deps}|EV
%global optional_deps %{optional_deps}|Event
%global optional_deps %{optional_deps}|Event::Lib
%global optional_deps %{optional_deps}|EventLoop
%global optional_deps %{optional_deps}|FLTK
%global optional_deps %{optional_deps}|Glib
%global optional_deps %{optional_deps}|IO::AIO
%global optional_deps %{optional_deps}|IO::Async::Loop
%global optional_deps %{optional_deps}|Irssi
%global optional_deps %{optional_deps}|POE
%global optional_deps %{optional_deps}|Qt
%global optional_deps %{optional_deps}|Qt::isa
%global optional_deps %{optional_deps}|Qt::slots
%global optional_deps %{optional_deps}|Tk
%global optional_deps %{optional_deps}|UV
# Don't include optional dependencies

%global __requires_exclude ^perl[(](%{optional_deps})[)]

%description
AnyEvent provides an identical interface to multiple event loops. This
allows module authors to utilise an event loop without forcing module users
to use the same event loop (as only a single event loop can coexist
peacefully at any one time).


%prep
%setup -q -n AnyEvent-%{version}%{?subver}


%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
make pure_install PERL_INSTALL_ROOT=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'


%check
# PERL_ANYEVENT_NET_TESTS shoudn't be set to avoid network tests
# on our builder.
export PERL_ANYEVENT_LOOP_TESTS=1
make test


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%license COPYING
%doc Changes README
%{perl_vendorarch}/AE.pm
%{perl_vendorarch}/AnyEvent*
%{_mandir}/man3/*.3*


%changelog
* Wed Nov 17 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.17-1
- new upstream release.
- built with perl-5.34.0.

* Fri May 17 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 7.15-1
- new upstream release.
- rebuilt with perl-5.26.
- made arch-dependent (since 5.3).

* Fri Jun 27 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 5.27-2
- build with Perl 5.16

* Fri Mar 02 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 5.27-1
- initial build for Vine Linux

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.27-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Fri Jul 22 2011 Petr Pisar <ppisar@redhat.com> - 5.27-6
- RPM 4.9 dependency filtering added

* Mon Jun 20 2011 Marcela Mašláňová <mmaslano@redhat.com> - 5.27-5
- Perl mass rebuild

* Thu Feb 10 2011 Nicolas Chauvet <kwizart@gmail.com> - 5.27-4
- Rewritten to new filtering rules
 http://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering#Perl

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.27-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Dec 14 2010 Marcela Maslanova <mmaslano@redhat.com> - 5.27-2
- 661697 rebuild for fixing problems with vendorach/lib

* Sun Aug 22 2010 Nicolas Chauvet <kwizart@gmail.com> - 5.27-1
- Update to 5.271 (rpm version : 5.27)

* Thu Apr 29 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 5.26-1
- Update to 5.261 (rpm version : 5.26)

* Thu Apr 29 2010 Marcela Maslanova <mmaslano@redhat.com> - 5.24-2
- Mass rebuild with perl-5.12.0

* Tue Jan 19 2010 Nicolas Chauvet <kwizart@fedoraproject.org> - 5.24-1
- Update to 5.24  (rpm version : 5.24)

* Mon Dec 7 2009 Nicolas Chauvet <kwizart@fedoraproject.org> - 5.22-1
- Update to 5.22  (rpm version : 5.22)

* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 5.11-3
- rebuild against perl 5.10.1

* Mon Aug 31 2009 kwizart < kwizart at gmail.com > - 5.11-2
- Update to 5.112   (rpm version : 5.11 )

* Mon Jul 27 2009 kwizart < kwizart at gmail.com > - 4.870-1
- Update to 4.87   (rpm version : 4.870 )
- Add more filter requires to workaround rhbz#512553

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.820-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Jul 15 2009 kwizart < kwizart at gmail.com > - 4.820-1
- Update to 4.82   (rpm version : 4.820 )

* Fri May 29 2009 kwizart < kwizart at gmail.com > - 4.410-1
- Update to 4.41   (rpm version : 4.41 )

* Wed Apr 22 2009 kwizart < kwizart at gmail.com > - 4.352-1
- Update to 4.352   (rpm version : same )

* Fri Apr  3 2009 kwizart < kwizart at gmail.com > - 4.350-1
- Update to 4.35   (rpm version : 4.350 )

* Thu Mar  5 2009 kwizart < kwizart at gmail.com > - 4.340-1
- Update to 4.34   (rpm version : 4.340 )

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.331-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Jan 12 2009 kwizart < kwizart at gmail.com > - 4.331-1
- Update to 4.331   (rpm version : same )

* Fri Oct 17 2008 kwizart < kwizart at gmail.com > - 4.300-1
- Update to 4.3   (rpm version : 4.300 )

* Tue Oct 14 2008 kwizart < kwizart at gmail.com > - 4.3-1
- Update to 4.3 

* Mon Aug  4 2008 kwizart < kwizart at gmail.com > - 4.231-1
- Update to 4.231 (rpm version : match )

* Fri Jul 18 2008 kwizart < kwizart at gmail.com > - 4.220-1
- Update to 4.22 (rpm version : 4.220 )

* Fri Jul 18 2008 kwizart < kwizart at gmail.com > - 4.21-1
- Update to 4.21

* Fri Jul  4 2008 kwizart < kwizart at gmail.com > - 4.161-1
- Update to 4.161

* Mon Jun 23 2008 kwizart < kwizart at gmail.com > - 4.152-1
- Update to 4.152

* Mon Jun  9 2008 kwizart < kwizart at gmail.com > - 4.151-1
- Update to 4.151

* Thu Jun  5 2008 kwizart < kwizart at gmail.com > - 4.13-1
- Update to 4.13

* Tue Jun  3 2008 kwizart < kwizart at gmail.com > - 4.12-1
- Update to 4.12

* Thu May 29 2008 kwizart < kwizart at gmail.com > - 4.1-1
- Update to 4.1

* Tue May 27 2008 kwizart < kwizart at gmail.com > - 3.5-1
- Update to 3.5

* Wed Apr 30 2008 kwizart < kwizart at gmail.com > - 3.3-1
- Initial package for Fedora

