b70c245
# This package includes the pari library source even though we link
b70c245
# against the system version of the library; the library source is
b70c245
# needed to build the documentation for this perl binding and also
b70c245
# to enhance the test suite, by providing additional tests from the
b70c245
# main library test suite.
b70c245
#
b70c245
# Since this binding is tightly linked to the main library, we
b70c245
# have to enforce a tight dependency on the main pari library version
b70c245
# so that we stay in step properly.
9d7eefb
%global pari_version	2.3.5
b70c245
%global pari_int_version %(echo %{pari_version} | %{__perl} -pi -e 's/(\\d+)\\.(\\d+)\\.(\\d+)/sprintf("%d%03d%03d",$1,$2,$3)/e')
eebaf7a
960d534
%global extraversion	04
e3ce52c
feabfca
Summary:	Perl interface to PARI
feabfca
Name:		perl-Math-Pari
600f0a2
Version:	2.010806
631a3af
Release:	9%{?dist}
da4bde8
License:	GPL+ or Artistic
feabfca
Group:		Development/Libraries
feabfca
Url:		http://search.cpan.org/dist/Math-Pari/
e3ce52c
Source0:	http://search.cpan.org/CPAN/authors/id/I/IL/ILYAZ/modules/Math-Pari-%{version}%{extraversion}.tar.gz
b70c245
Source1:	http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-%{pari_version}.tar.gz
b70c245
Patch0:		perl-Math-Pari-2.010802-no-fake-version.patch
b70c245
Patch1:		perl-Math-Pari-2.010802-docs-and-testsuite.patch
db19b3a
Patch2:		perl-Math-Pari-2.01080604-extra-stack-for-test.patch
feabfca
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
feabfca
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
2a138a4
BuildRequires:	perl(ExtUtils::MakeMaker)
feabfca
b70c245
# Enforce dependency against same version of pari that we're built for
9d7eefb
BuildRequires:	pari-devel = %{pari_version}
b70c245
Requires:	pari%{?_isa} = %{pari_version}
b70c245
b70c245
# Don't "provide" private Perl libs or the redundant unversioned perl(Math::Pari)
b70c245
%filter_from_provides /^perl(Math::Pari)$/d
b70c245
%{?perl_default_filter}
0dbde16
feabfca
%description
feabfca
This package is a Perl interface to the famous library PARI for numerical/
feabfca
scientific/ number-theoretic calculations. It allows use of most PARI functions
feabfca
as Perl functions, and (almost) seamless merging of PARI and Perl data.
feabfca
feabfca
%prep
e3ce52c
%setup -q -n Math-Pari-%{version}%{extraversion} -a 1
feabfca
eebaf7a
# Remove spurious executable permission bits
eebaf7a
%{__chmod} -x Changes README Pari.pm PariInit.pm func_codes.h Pari.xs
eebaf7a
b70c245
# Don't use a fake version number when we can use a real one
b70c245
%patch0 -p1
b70c245
%{__sed} -i -e s/@@@OUR-PARI-VERSION@@@/%{pari_int_version}/ Makefile.PL
b70c245
b70c245
# We want to build the docs and test suite from the local pari sources
b70c245
%patch1 -p1
b70c245
db19b3a
# Need extra stack for intnum test on some arches
9d7eefb
cd pari-%{pari_version}
9d7eefb
%patch2 -p2
9d7eefb
cd -
db19b3a
feabfca
%build
feabfca
%{__perl} Makefile.PL \
feabfca
	INSTALLDIRS=vendor \
b70c245
	OPTIMIZE="-I%{_includedir}/pari %{optflags}" \
b70c245
	parilib="-lpari"
feabfca
%{__make} %{?_smp_mflags}
feabfca
feabfca
%install
feabfca
%{__rm} -rf %{buildroot}
feabfca
%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
feabfca
/usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';'
feabfca
/usr/bin/find %{buildroot} -type f -name '*.bs' -a -size 0 -exec %{__rm} -f {} ';'
db19b3a
/usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} ';' 2>/dev/null
db19b3a
%{__chmod} -R u+w %{buildroot}
feabfca
eebaf7a
%check
eebaf7a
%{__make} test
eebaf7a
feabfca
%clean
feabfca
%{__rm} -rf %{buildroot}
feabfca
feabfca
%files
c5140ae
%defattr(-,root,root,-)
feabfca
%doc Changes README
feabfca
%dir %{perl_vendorarch}/Math/
feabfca
%exclude %doc %{perl_vendorarch}/Math/libPARI.dumb.pod
feabfca
%doc %{perl_vendorarch}/Math/libPARI.pod
feabfca
%{perl_vendorarch}/Math/*.pm
feabfca
%{perl_vendorarch}/auto/Math/
feabfca
%{_mandir}/man3/Math::Pari.3pm*
feabfca
%{_mandir}/man3/Math::PariInit.3pm*
feabfca
%{_mandir}/man3/Math::libPARI.3pm*
feabfca
%exclude %{_mandir}/man3/Math::libPARI.dumb.3pm*
feabfca
feabfca
%changelog
631a3af
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.010806-9
631a3af
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
631a3af
43f26b1
* Mon Dec 20 2010 Marcela Maslanova <mmaslano@redhat.com> - 2.010806-8
43f26b1
- 661697 rebuild for fixing problems with vendorach/lib
43f26b1
9d7eefb
* Fri Jul  9 2010 Paul Howarth <paul@city-fan.org> - 2.010806-7
9d7eefb
- Rebuild with pari 2.3.5
9d7eefb
- Tweak application of intnum test patch to apply with different pari versions
9d7eefb
db19b3a
* Tue Jun 22 2010 Paul Howarth <paul@city-fan.org> - 2.010806-6
db19b3a
- Make stack size bigger for intnum test to avoid test failures on some
db19b3a
  arches (e.g. s390x, ppc64 - #551988)
db19b3a
db19b3a
* Mon May  3 2010 Marcela Maslanova <mmaslano@redhat.com> - 2.010806-5
9b8f1b9
- Mass rebuild with perl-5.12.0
9b8f1b9
960d534
* Thu Mar  4 2010 Paul Howarth <paul@city-fan.org> - 2.010806-4
960d534
- Update to 2.01080604 (see Changes for details)
960d534
a781ae0
* Fri Dec 11 2009 Paul Howarth <paul@city-fan.org> - 2.010806-3
a781ae0
- Update to 2.01080603 (see Changes for details)
a781ae0
e3ce52c
* Thu Nov 12 2009 Paul Howarth <paul@city-fan.org> - 2.010806-2
e3ce52c
- Update to 2.01080602 (see Changes for details)
e3ce52c
- No longer need to fix test suite for 64-bit builds
e3ce52c
600f0a2
* Fri Nov  6 2009 Paul Howarth <paul@city-fan.org> - 2.010806-1
600f0a2
- Update to 2.010806
600f0a2
18326b4
* Wed Nov  4 2009 Paul Howarth <paul@city-fan.org> - 2.010805-1
18326b4
- Update to 2.010805
18326b4
42d16a5
* Mon Nov  2 2009 Paul Howarth <paul@city-fan.org> - 2.010804-1
42d16a5
- Update to 2.010804
42d16a5
b70c245
* Thu Oct 29 2009 Paul Howarth <paul@city-fan.org> - 2.010802-1
b70c245
- Update to 2.010802
b70c245
- Use system pari library (version 2.3.4) rather than a local build
b70c245
  (requires patches to Makefile.PL to get docs and test suite)
b70c245
- Enforce tight dependency on system pari version to ensure we stay in step
b70c245
- Fix test suite so that 64-bit builds work with pari-2.3.4
b70c245
- Use standard filter macros for provides filter
b70c245
5677773
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.010801-4
5677773
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
5677773
0dbde16
* Sun Mar  8 2009 Paul Howarth <paul@city-fan.org> - 2.010801-3
0dbde16
- Filter out unwanted provides for perl shared objects
0dbde16
4892130
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.010801-2
4892130
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
4892130
0dbde16
* Wed Feb 11 2009 Paul Howarth <paul@city-fan.org> - 2.010801-1
eebaf7a
- update to 2.010801, but build with pari-2.1.7 since 2.1.8 doesn't exist
eebaf7a
  (upstream forgot their own numbering convention - CPAN RT#35493)
eebaf7a
- re-enable tests
eebaf7a
- drop patch for perl 5.10, no longer needed
eebaf7a
- remove spurious exec bits on files in upstream distribution
eebaf7a
562b9a7
* Fri Mar  7 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.010709-7
562b9a7
- disable tests, they're being weird in the buildservers
562b9a7
08e04e7
* Fri Mar  7 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.010709-6
08e04e7
- fix for perl 5.10 (many many thanks to Nicholas Clark)
08e04e7
e9c7463
* Wed Mar  5 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.010709-5
e9c7463
- rebuild for new perl
e9c7463
987a199
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.010709-4
987a199
- Autorebuild for GCC 4.3
987a199
da4bde8
* Mon Aug 13 2007 Paul Howarth <paul@city-fan.org> 2.010709-3
da4bde8
- clarify license as GPL v1 or later, or Artistic (same as perl)
da4bde8
2a138a4
* Wed Apr 18 2007 Paul Howarth <paul@city-fan.org> 2.010709-2
2a138a4
- Buildrequire perl(ExtUtils::MakeMaker)
c5140ae
ad7bf50
* Fri Oct 27 2006 Paul Howarth <paul@city-fan.org> 2.010709-1
ad7bf50
- Update to 2.010709
ad7bf50
86752e6
* Wed Oct 18 2006 Paul Howarth <paul@city-fan.org> 2.010708-1
86752e6
- Update to 2.010708
86752e6
- Fix argument order for find with -depth
86752e6
- Fix Source1 URL
86752e6
37adf55
* Wed Aug 30 2006 Paul Howarth <paul@city-fan.org> 2.010706-2
37adf55
- FE6 mass rebuild
37adf55
757ae66
* Fri Jun  2 2006 Paul Howarth <paul@city-fan.org> 2.010706-1
757ae66
- Update to 2.010706
757ae66
5e6fcb0
* Wed May 31 2006 Paul Howarth <paul@city-fan.org> 2.010705-1
5e6fcb0
- Update to 2.010705
5e6fcb0
feabfca
* Tue Apr 18 2006 Paul Howarth <paul@city-fan.org> 2.010704-2
feabfca
- Omit dumb docs (#175198)
feabfca
feabfca
* Mon Mar 20 2006 Paul Howarth <paul@city-fan.org> 2.010704-1
feabfca
- Update to 2.010704
feabfca
feabfca
* Fri Mar 17 2006 Paul Howarth <paul@city-fan.org> 2.010703-2
feabfca
- Simplify %%{__perl_requires} filter
feabfca
feabfca
* Wed Feb  1 2006 Paul Howarth <paul@city-fan.org> 2.010703-1
feabfca
- Update to 2.010703
feabfca
- Make pari version number calculation more robust
feabfca
feabfca
* Wed Dec  7 2005 Paul Howarth <paul@city-fan.org> 2.010702-1
feabfca
- Initial build