From 95d71a056e6566e3abbb1482d9bda88528355c0a Mon Sep 17 00:00:00 2001 From: Robin Norwood Date: Aug 06 2007 17:24:18 +0000 Subject: resolves: rhbz#226275 - patches for package review. --- diff --git a/perl-PDL-2.4.3-Xext.patch b/perl-PDL-2.4.3-Xext.patch new file mode 100644 index 0000000..9602312 --- /dev/null +++ b/perl-PDL-2.4.3-Xext.patch @@ -0,0 +1,10 @@ +--- PDL-2.4.3/Graphics/Makefile.PL.Xext 2006-08-16 20:46:37.000000000 -0600 ++++ PDL-2.4.3/Graphics/Makefile.PL 2007-08-01 11:18:50.000000000 -0600 +@@ -145,6 +145,6 @@ + require ExtUtils::Liblist; + my ($libs) = @_; + my $lpath = '-L/usr/X11R6/lib -L/usr/lib/mesa'; +- my $extra = '-lXext -lX11 -lm'; ++ my $extra = '-lX11 -lm'; + return ${[ExtUtils::Liblist->ext("$lpath $libs $extra")]}[0]; + } diff --git a/perl-PDL-2.4.3-hdf.patch b/perl-PDL-2.4.3-hdf.patch new file mode 100644 index 0000000..0177264 --- /dev/null +++ b/perl-PDL-2.4.3-hdf.patch @@ -0,0 +1,24 @@ +--- PDL-2.4.3/IO/HDF/Makefile.PL.hdf 2007-07-31 10:48:08.000000000 -0600 ++++ PDL-2.4.3/IO/HDF/Makefile.PL 2007-07-31 11:29:56.000000000 -0600 +@@ -28,11 +28,13 @@ + # default locations: + @HDF_lib_locations = ( + '/usr/lib64', ++ '/usr/lib64/hdf', + '/usr/local/netcdf/lib', + '/usr/local/lib', + '/usr/local/lib64', + '/opt/local/lib', + '/usr/lib', ++ '/usr/lib/hdf', + '/opt/lib' + ); + @HDF_inc_locations = ( +@@ -40,6 +42,7 @@ + '/usr/local/netcdf/include', + '/opt/local/include', + '/usr/include', ++ '/usr/include/hdf', + '/opt/include' + ); + diff --git a/perl-PDL-2.4.3-test.patch b/perl-PDL-2.4.3-test.patch new file mode 100644 index 0000000..fd3517b --- /dev/null +++ b/perl-PDL-2.4.3-test.patch @@ -0,0 +1,86 @@ +--- PDL-2.4.3/t/gis_proj.t.test 2006-07-26 21:34:29.000000000 -0600 ++++ PDL-2.4.3/t/gis_proj.t 2007-07-31 12:15:15.000000000 -0600 +@@ -68,7 +68,7 @@ + + # Do the corners of a cyl eq map, and see what we get... + print "\nCorners of a cylindrical equidistant projection:\n"; +-my $cyl_eq = "+proj=eqc +lon_0=0"; ++my $cyl_eq = "+proj=eqc +lon_0=0 +a=5.3049894774131808e-315"; + print "Perl level params: \'$cyl_eq\'\n"; + my $lon3 = double [-180.0, -180.0, 180.0, 180.0]; + my $lat3 = double [ 90.0, -90.0, 90.0, -90.0]; +--- PDL-2.4.3/t/xvals.t.test 1999-12-09 04:15:22.000000000 -0700 ++++ PDL-2.4.3/t/xvals.t 2007-07-31 12:19:10.000000000 -0600 +@@ -13,11 +13,11 @@ + $a0 = zeroes(3,2); + # $a0->doflow(); + +- print $a0; ++# print $a0; + + $a1 = $a0->slice('(1)'); + +- print $a1; ++# print $a1; + + # $a0->dump(); $a1->dump(); + +@@ -27,19 +27,19 @@ + + # $a1->dump(); + +- print $a1; ++# print $a1; + + $dummy = PDL::Core::new_or_inplace($a0); +-print $dummy; ++#print $dummy; + $dummy2 = $dummy->xchg(0,0); +-print $dummy2; ++#print $dummy2; + $dummy2->dump(); + $dummy->dump(); + PDL::Primitive::axisvalues($dummy2); +-$dummy2->dump(); +-$dummy->dump(); +-print $dummy2; +-print $dummy; ++#$dummy2->dump(); ++#$dummy->dump(); ++#print $dummy2; ++#print $dummy; + + + +@@ -55,24 +55,24 @@ + + $a = xvals $a0; + +-print $a; ++#print $a; + + ok(1,$a->at(0,0) == 0); + ok(2,$a->at(1,0) == 1); + ok(3,$a->at(2,0) == 2); + ok(4,$a->at(1,1) == 1); + +-$a = zeroes 5,10; ++#$a = zeroes 5,10; + +-$b = yvals $a; ++#$b = yvals $a; + +-$c = $b->copy(); ++#$c = $b->copy(); + +-$d = $b-$c; ++#$d = $b-$c; + +-print "$d,$b,$c"; ++#print "$d,$b,$c"; + + # print $a; + +-print "OUTOUT\n"; ++#print "OUTOUT\n"; + diff --git a/perl-PDL-2.4.3-x86_64.patch b/perl-PDL-2.4.3-x86_64.patch new file mode 100644 index 0000000..552ff9c --- /dev/null +++ b/perl-PDL-2.4.3-x86_64.patch @@ -0,0 +1,32 @@ +--- PDL-2.4.3/Graphics/PLplot/Makefile.PL.x86_64 2006-05-28 12:19:38.000000000 -0600 ++++ PDL-2.4.3/Graphics/PLplot/Makefile.PL 2007-07-31 10:40:31.000000000 -0600 +@@ -39,6 +39,7 @@ + '/usr/local/plplot/lib', + '/usr/local/lib', + '/opt/local/lib', ++ '/usr/lib64', + '/usr/lib', + '/opt/lib', + '/ops/tools/lib', +--- PDL-2.4.3/Graphics/TriD/Makefile.PL.x86_64 2006-05-29 11:19:07.000000000 -0600 ++++ PDL-2.4.3/Graphics/TriD/Makefile.PL 2007-07-31 10:40:16.000000000 -0600 +@@ -20,7 +20,7 @@ + } else { + # + # default locations: +- my @check_dirs = qw( /lib/ /usr/lib/ /usr/local/lib/ /usr/X11R6/lib/ /usr/local/X11R6/lib/ /usr/X11/lib/ /usr/local/X11/lib/ ); ++ my @check_dirs = qw( /lib/ /usr/lib64/ /usr/lib/ /usr/local/lib/ /usr/X11R6/lib/ /usr/local/X11R6/lib/ /usr/X11/lib/ /usr/local/X11/lib/ ); + + # append locations from perldl.conf, if specified: + @check_dirs = +--- PDL-2.4.3/perldl.conf.x86_64 2007-07-31 10:33:12.000000000 -0600 ++++ PDL-2.4.3/perldl.conf 2007-07-31 10:44:44.000000000 -0600 +@@ -158,7 +158,7 @@ + WITH_FFTW => undef, # Leave it up to PDL to decide + + # Location to search for the FFTW libs +- FFTW_LIBS => [ '/lib','/usr/lib','/usr/local/lib'], ++ FFTW_LIBS => [ '/lib','/usr/lib64','/usr/lib','/usr/local/lib'], + # Location to find FFTW includes: + FFTW_INC => ['/usr/include/','/usr/local/include'], + diff --git a/perl-PDL-settings.patch b/perl-PDL-settings.patch index 6c85ba8..089aa4c 100644 --- a/perl-PDL-settings.patch +++ b/perl-PDL-settings.patch @@ -1,12 +1,20 @@ -diff -u PDL-2.4.3.orig/perldl.conf PDL-2.4.3/perldl.conf ---- PDL-2.4.3.orig/perldl.conf 2006-08-16 22:59:51.000000000 -0400 -+++ PDL-2.4.3/perldl.conf 2006-12-02 18:01:19.000000000 -0500 +--- PDL-2.4.3/perldl.conf.settings 2006-08-16 20:59:51.000000000 -0600 ++++ PDL-2.4.3/perldl.conf 2007-07-31 11:08:20.000000000 -0600 @@ -91,7 +91,7 @@ # There are problems with the build on OS-X, so we turn it off by default # for such systems # - WITH_3D => $^O eq "darwin" ? 0 : undef, -+ WITH_3D => 0, ++ WITH_3D => 1, # # For Mesa 3.2 +@@ -191,7 +191,7 @@ + # about curses to fix it + # - 1 builds, 0 or undef does not build + # +- WITH_IO_BROWSER => 0, ++ WITH_IO_BROWSER => 1, + + # Quiet Astro::FITS::Header warnings for PDL build process by default + # Eventually would be better to set undef by default, and have the diff --git a/perl-PDL.spec b/perl-PDL.spec index 8a4b1b9..cd53413 100644 --- a/perl-PDL.spec +++ b/perl-PDL.spec @@ -1,27 +1,37 @@ Name: perl-PDL Version: 2.4.3 -Release: 1%{?dist} -Summary: PDL Perl module +Release: 1%{?dist} +Summary: The Perl Data Language Group: Development/Libraries License: GPL or Artistic Url: http://search.cpan.org/dist/PDL/ Source0: http://www.cpan.org/authors/id/C/CS/CSOE/PDL-%{version}.tar.gz Patch0: perl-PDL-settings.patch -Patch1: perl-PDL-2.4.2-fix_ia64_sdump.patch -Patch2: perl-PDL-2.4.3-cleanup.patch +Patch1: perl-PDL-2.4.2-fix_ia64_sdump.patch +Patch2: perl-PDL-2.4.3-cleanup.patch +Patch3: perl-PDL-2.4.3-test.patch +Patch4: perl-PDL-2.4.3-x86_64.patch +Patch5: perl-PDL-2.4.3-hdf.patch +Patch6: perl-PDL-2.4.3-Xext.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl >= 1:5.6.1 -BuildRequires: gsl-devel BuildRequires: perl(Inline) +BuildRequires: perl(Test::More) +BuildRequires: fftw2-devel +BuildRequires: gd-devel +BuildRequires: gsl-devel +BuildRequires: hdf-devel +BuildRequires: plplot-devel +BuildRequires: proj-devel +BuildRequires: ncurses-devel +BuildRequires: sharutils Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Provides: perl(PDL::Config) perl(PDL::PP::CType) perl(PDL::PP::Dims) Provides: perl(PDL::PP::PDLCode) perl(PDL::PP::SymTab) perl(PDL::PP::XS) Provides: perl(PDL::Slatec) perl(PGPLOT) perl(PDL::LiteF) perl(PDL::Lite) -Provides: perl(PDL::Graphics::TriD), perl(PDL::Graphics::TriD::Contours) -Provides: perl(PDL::Graphics::TriD::GL), perl(PDL::Graphics::TriD::Image) -Provides: perl(PDL::Graphics::TriD::Tk) +Provides: perl(PDL::Graphics::TriD::GL) %{?!DEBUG: %define DEBUG 0} @@ -38,6 +48,11 @@ such commercial packages as IDL and MatLab. %patch0 -p1 -b .settings %patch1 -p1 %patch2 -p1 -b .cleanup +%patch3 -p1 -b .test +%patch4 -p1 -b .x86_64 +%patch5 -p1 -b .hdf +%patch6 -p1 -b .Xext + # Provides: explicitly filter perl(Inline) cat <<__EOF__ > %{name}-findperlprovides #!/bin/sh @@ -70,6 +85,7 @@ CFLAGS="$RPM_OPT_FLAGS -Wno-unused" %ifarch ppc ppc64 s390 s390x CFLAGS="$CFLAGS -fsigned-char" %endif +CFLAGS="$CFLAGS -DNCURSES" CFLAGS="$CFLAGS" %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$CFLAGS" make OPTIMIZE="$CFLAGS" # smp flags blows up spectacularly (2.4.1-10 May 7th 2005) @@ -85,15 +101,18 @@ find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';' find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' chmod -R u+w $RPM_BUILD_ROOT/* -file=$RPM_BUILD_ROOT%{_mandir}/man3/PDL::Func.3pm -iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_" -mv -f "${file}_" "$file" + +for file in $RPM_BUILD_ROOT%{_mandir}/man3/PDL::Func.3pm $RPM_BUILD_ROOT%{_mandir}/man3/PDL::Complex.3pm; do + iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_" + mv -f "${file}_" "$file" +done + %if %{DEBUG} /usr/lib/rpm/brp-compress exit 0 %endif -%check || : +%check export PERL5LIB=`pwd`/blib/lib make test @@ -103,7 +122,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc COPYING +%doc COPYING BUGS Changes Known_problems Release_Notes README %{_bindir}/* %{perl_vendorarch}/Inline/* %{perl_vendorarch}/PDL* @@ -195,7 +214,7 @@ rm -rf $RPM_BUILD_ROOT - automated release bump and build * Tue Jul 16 2002 Chip Turner -- updated %description +- updated %%description * Thu Jun 27 2002 Chip Turner - description update