Name:           perl-WWW-Curl
Version:        4.17
Release:        3%{?_dist_release}
Summary:        Perl extension interface for libcurl
Group:          programming
Vendor:         Project Vine
Distribution:   Vine Linux

License:        MIT
URL:            https://metacpan.org/pod/WWW::Curl
Source0:        https://cpan.metacpan.org/authors/id/S/SZ/SZBALINT/WWW-Curl-4.17.tar.gz
Patch0:         WWW-Curl-4.17-Skip-preprocessor-symbol-only-CURL_STRICTER.patch
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941915
Patch1:         WWW-Curl-4.17-define-CURL-as-void.patch
# Adapt to changes in cURL 7.69.0, bug #1812910, CPAN RT#132197
Patch2:         WWW-Curl-4.17-Adapt-to-changes-in-cURL-7.69.0.patch

BuildRequires:  perl >= 2:5.34.0
BuildRequires:  perl(inc::Module::Install)
BuildRequires:  perl(Carp)
BuildRequires:  perl(Exporter)
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(File::Temp)
%{?_with_network_tests: BuildRequires:  perl(lib) }
BuildRequires:  perl(strict)
BuildRequires:  perl(Test::More)
# Test::Pod is optional
BuildRequires:  perl(warnings)
BuildRequires:  perl(XSLoader)
BuildRequires:  curl-devel
Requires:       perl >= 2:5.34.0

%{?perl_default_filter}

%description
WWW::Curl is a Perl extension interface for libcurl.


%debug_package


%prep
%setup -q -n WWW-Curl-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
rm -rf inc && sed -i -e '/^inc\//d' MANIFEST


%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" NO_PACKLIST=1 NO_PERLLOCAL=1
make %{?_smp_mflags}


%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
%{_fixperms} $RPM_BUILD_ROOT/*


%check
# These tests require network, use "--with network_tests" to execute them
%{?!_with_network_tests: rm t/01basic.t }
%{?!_with_network_tests: rm t/02callbacks.t }
%{?!_with_network_tests: rm t/04abort-test.t }
%{?!_with_network_tests: rm t/05progress.t }
%{?!_with_network_tests: rm t/08ssl.t }
%{?!_with_network_tests: rm t/09times.t }
%{?!_with_network_tests: rm t/14duphandle.t }
%{?!_with_network_tests: rm t/15duphandle-callback.t }
%{?!_with_network_tests: rm t/18twinhandles.t }
%{?!_with_network_tests: rm t/19multi.t }
%{?!_with_network_tests: rm t/21write-to-scalar.t }
make test


%files
%license LICENSE
%doc Changes README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/WWW*
%{_mandir}/man3/*


%changelog
* Mon Nov 22 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.17-3
- rebuilt with perl-5.34.0.
- imported Patch1-2 from rawhide.

* Sat Aug 24 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 4.17-2
- rebuilt with perl-5.26.2.
- added Patch0 for recent curl.

* Sun Dec 07 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 4.17-1
- initial build for Vine Linux


* Thu Aug 28 2014 Jitka Plesnikova <jplesnik@redhat.com> - 4.17-4
- Perl 5.20 rebuild

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.17-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed Feb 26 2014 Petr Šabata <contyk@redhat.com> - 4.17-1
- 4.17 bump, license change

* Fri Feb 21 2014 Petr Šabata <contyk@redhat.com> - 4.16-1
- 4.16 bump

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.15-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Aug 02 2013 Petr Pisar <ppisar@redhat.com> - 4.15-11
- Perl 5.18 rebuild

* Sun Jul 14 2013 Jitka Plesnikova <jplesnik@redhat.com> - 4.15-10
- Update dependencies
- Use DESTDIR rather than PERL_INSTALL_ROOT
- Remove buildroot cleaning

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.15-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Thu Aug 16 2012 Jitka Plesnikova <jplesnik@redhat.com> - 4.15-8
- Specify all dependencies
- Modernize spec file

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.15-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jun 22 2012 Petr Pisar <ppisar@redhat.com> - 4.15-6
- Perl 5.16 rebuild

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

* Sun Jul 24 2011 Iain Arnell <iarnell@gmail.com> 4.15-4
- use perl_default_filter

* Wed Jun 29 2011 Marcela Mašláňová <mmaslano@redhat.com> - 4.15-3
- Perl mass rebuild

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Nov 30 2010 Nicoleau Fabien <nicoleau.fabien@gmail.com> - 4.15-1
- Update to 4.15
* Thu Oct 28 2010 Nicoleau Fabien <nicoleau.fabien@gmail.com> - 4.14-1
- Update to 4.14
- Add a filter provide to avoid private-shared-object-provides error
* Sun Sep  5 2010 Nicoleau Fabien <nicoleau.fabien@gmail.com> - 4.13-1
- Update to 4.13
* Wed Aug 25 2010 Nicoleau Fabien <nicoleau.fabien@gmail.com> - 4.12-1
- Update to 4.12
* Thu Jun  3 2010 Nicoleau Fabien <nicoleau.fabien@gmail.com> - 4.11-3
- Remove test 19 because it requires network
* Fri May 07 2010 Marcela Maslanova <mmaslano@redhat.com> - 4.11-2
- Mass rebuild with perl-5.12.0
* Fri Dec 18 2009 Nicoleau Fabien <nicoleau.fabien@gmail.com> - 4.11-1
- Update to 4.11
* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 4.09-3
- rebuild against perl 5.10.1
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.09-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Sat Jul 11 2009 Nicoleau Fabien <nicoleau.fabien@gmail.com> - 4.09-1
- Rebuild for 4.09
* Mon Jun  1 2009 Nicoleau Fabien <nicoleau.fabien@gmail.com> - 4.07-1
- Rebuild for 4.07
* Sat Apr 18 2009 Nicoleau Fabien <nicoleau.fabien@gmail.com> - 4.06-1
- Step to 4.06
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.05-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Wed Jan 14 2009 Nicoleau Fabien <nicoleau.fabien@gmail.com> - 4.05-4
- Licence update
* Wed Jan 14 2009 Nicoleau Fabien <nicoleau.fabien@gmail.com> - 4.05-3
- README.Win32 file removed
* Wed Jan 14 2009 Nicoleau Fabien <nicoleau.fabien@gmail.com> - 4.05-2
- Timestamp preserved
- changelog format fix
- README.Win32 file removed
* Thu Dec 11 2008 Nicoleau Fabien <nicoleau.fabien@gmail.com> - 4.05-1
- Initial build with cpan2spec
