e6fa15d
Name:           perl-PDL
3e256d2
Version:        2.4.3
115ff12
Release:        5%{?dist}
95d71a0
Summary:        The Perl Data Language
e6fa15d
e6fa15d
Group:          Development/Libraries
c24358f
License:        GPL+ or Artistic
e6fa15d
Url:            http://search.cpan.org/dist/PDL/
e6fa15d
Source0:        http://www.cpan.org/authors/id/C/CS/CSOE/PDL-%{version}.tar.gz
e6fa15d
Patch0:         perl-PDL-settings.patch
95d71a0
Patch1:         perl-PDL-2.4.2-fix_ia64_sdump.patch
95d71a0
Patch2:         perl-PDL-2.4.3-cleanup.patch
95d71a0
Patch3:         perl-PDL-2.4.3-test.patch
95d71a0
Patch4:         perl-PDL-2.4.3-x86_64.patch
95d71a0
Patch5:         perl-PDL-2.4.3-hdf.patch
95d71a0
Patch6:         perl-PDL-2.4.3-Xext.patch
72952f8
Patch7:         perl-PDL-2.4.3-fortran.patch
115ff12
Patch8:         perl-PDL-2.4.3-gl.patch
e6fa15d
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
e6fa15d
e6fa15d
BuildRequires:  perl >= 1:5.6.1
72952f8
BuildRequires:  perl(ExtUtils::F77)
6fdea0a
BuildRequires:  perl(Inline)
95d71a0
BuildRequires:  perl(Test::More)
95d71a0
BuildRequires:  fftw2-devel
72952f8
BuildRequires:  gcc-gfortran
95d71a0
BuildRequires:  gd-devel
95d71a0
BuildRequires:  gsl-devel
95d71a0
BuildRequires:  hdf-devel
72952f8
BuildRequires:  libGLU-devel
95d71a0
BuildRequires:  plplot-devel
95d71a0
BuildRequires:  proj-devel
95d71a0
BuildRequires:  ncurses-devel
95d71a0
BuildRequires:  sharutils
e6fa15d
Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
e6fa15d
Provides:       perl(PDL::Config) perl(PDL::PP::CType) perl(PDL::PP::Dims)
e6fa15d
Provides:       perl(PDL::PP::PDLCode) perl(PDL::PP::SymTab) perl(PDL::PP::XS)
72952f8
Provides:       perl(PGPLOT) perl(PDL::LiteF) perl(PDL::Lite)
72952f8
Provides:       perl(PDL::Graphics::TriD::GL) perl(PDL::Graphics::TriD::Objects)
cvsdist 7e1183d
jvdias 236b9c6
%{?!DEBUG:      %define DEBUG 0}
jvdias 236b9c6
cvsdist 7e1183d
%description
cvsdist 7e1183d
PDL ("Perl Data Language") gives standard Perl the ability to
cvsdist 7e1183d
compactly store and speedily manipulate the large N-dimensional data
cvsdist 7e1183d
arrays which are the bread and butter of scientific computing.  PDL
72952f8
turns perl into a free, array-oriented, numerical language similar to
e6fa15d
such commercial packages as IDL and MatLab.
e6fa15d
cvsdist 7e1183d
cvsdist 7e1183d
%prep
cvsdist 7e1183d
%setup -q -n PDL-%{version} 
cvsdist 7e1183d
%patch0 -p1 -b .settings
jvdias b8b7d1d
%patch1 -p1
a4bf9c2
%patch2 -p1 -b .cleanup
95d71a0
%patch3 -p1 -b .test
95d71a0
%patch4 -p1 -b .x86_64
95d71a0
%patch5 -p1 -b .hdf
95d71a0
%patch6 -p1 -b .Xext
72952f8
%patch7 -p1 -b .fortran
115ff12
%patch8 -p1 -b .gl
95d71a0
cfb44b7
# Provides: explicitly filter perl(Inline)
cfb44b7
cat <<__EOF__ > %{name}-findperlprovides
cfb44b7
#!/bin/sh
cfb44b7
%{__perl_provides} \$* | grep -v 'perl(Inline)'
cfb44b7
__EOF__
cfb44b7
%define __perl_provides %{_builddir}/PDL-%{version}/%{name}-findperlprovides
cfb44b7
chmod +x %{__perl_provides}
cfb44b7
cfb44b7
# Requires: explicitly filter perl(Tk)
a0a5cb1
cat <<__EOF__ > %{name}-findperlrequires
a0a5cb1
#!/bin/sh
72952f8
%{__perl_requires} \$* | grep -v 'perl(Tk)' | grep -v 'perl(Win32::DDE::Client)'
a0a5cb1
__EOF__
a0a5cb1
%define __perl_requires %{_builddir}/PDL-%{version}/%{name}-findperlrequires
a0a5cb1
chmod +x %{__perl_requires}
a0a5cb1
jvdias 236b9c6
%if %{DEBUG}
jvdias b8b7d1d
%define debug_package %{nil}
jvdias 236b9c6
%endif
jvdias 236b9c6
cvsdist 7e1183d
%build
jvdias b8b7d1d
export PERL5LIB=`pwd`/blib/lib:`pwd`/blib/arch:
jvdias b18e44c
#^- can no longer build if perl-PDL is not installed without above
jvdias b18e44c
#
jvdias 236b9c6
%if %{DEBUG}
jvdias 236b9c6
CFLAGS=`echo "$RPM_OPT_FLAGS -Wno-unused" | sed 's/-O2 -g/-g3 -gdwarf-2/'`
jvdias 236b9c6
%else
jvdias 236b9c6
CFLAGS="$RPM_OPT_FLAGS -Wno-unused"
jvdias 236b9c6
%endif
jvdias 3cf2cde
%ifarch ppc ppc64 s390 s390x
jvdias 3cf2cde
CFLAGS="$CFLAGS -fsigned-char"
jvdias 3cf2cde
%endif
95d71a0
CFLAGS="$CFLAGS -DNCURSES"
jvdias 236b9c6
CFLAGS="$CFLAGS" %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$CFLAGS"
jvdias 236b9c6
make OPTIMIZE="$CFLAGS"
b39a7a0
# smp flags blows up spectacularly (2.4.1-10 May 7th 2005)
cvsdist 7e1183d
cvsdist 7e1183d
%install
cvsdist 7e1183d
rm -rf $RPM_BUILD_ROOT
e6fa15d
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
6fdea0a
%{__perl} -Mblib Doc/scantree.pl $RPM_BUILD_ROOT%{perl_vendorarch}
6fdea0a
%{__perl} -pi -e "s|$RPM_BUILD_ROOT/|/|g" \
6fdea0a
  $RPM_BUILD_ROOT%{perl_vendorarch}/PDL/pdldoc.db
6fdea0a
find $RPM_BUILD_ROOT%{perl_vendorarch} -type f -name "*.pm" | xargs chmod -x
e6fa15d
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
e6fa15d
find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';'
e6fa15d
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
e6fa15d
chmod -R u+w $RPM_BUILD_ROOT/*
95d71a0
95d71a0
for file in $RPM_BUILD_ROOT%{_mandir}/man3/PDL::Func.3pm $RPM_BUILD_ROOT%{_mandir}/man3/PDL::Complex.3pm; do
95d71a0
  iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_"
95d71a0
  mv -f "${file}_" "$file"
95d71a0
done
95d71a0
jvdias 236b9c6
%if %{DEBUG}
jvdias b8b7d1d
/usr/lib/rpm/brp-compress
jvdias b8b7d1d
exit 0
jvdias 236b9c6
%endif
c6ca76b
95d71a0
%check
jvdias b8b7d1d
export PERL5LIB=`pwd`/blib/lib
jvdias b8b7d1d
make test
e6fa15d
e6fa15d
%clean
e6fa15d
rm -rf $RPM_BUILD_ROOT
e6fa15d
cvsdist 058de1f
e6fa15d
%files
e6fa15d
%defattr(-,root,root,-)
95d71a0
%doc COPYING BUGS Changes Known_problems Release_Notes README
e6fa15d
%{_bindir}/*
e6fa15d
%{perl_vendorarch}/Inline/*
e6fa15d
%{perl_vendorarch}/PDL*
e6fa15d
%{perl_vendorarch}/auto/PDL/
e6fa15d
%{_mandir}/man1/*.1*
e6fa15d
%{_mandir}/man3/*.3*
cvsdist 7e1183d
cvsdist 7e1183d
cvsdist 7e1183d
%changelog
115ff12
* Wed Jan 30 2008 Orion Poplawski <orion@cora.nwra.com> - 2.4-3-5
115ff12
- Add patch to support GL version in EL-5
115ff12
c24358f
* Wed Aug 15 2007 Robin Norwood <rnorwood@redhat.com> - 2.4-3-4
c24358f
- Updated perl-PDL-2.4.3-test.patch from Orion to fix ppc and ppc64
c24358f
- Fixed license string
c24358f
- Fixed old changelog version number
c24358f
72952f8
* Fri Aug 10 2007 Robin Norwood <rnorwood@redhat.com> - 2.4.3-3
72952f8
- More changes from Orion Poplawski
72952f8
- BuildRequires and patch for fortran/f77 support
72952f8
- Added Provides: perl(PDL::Graphics::TriD::Object
72952f8
- Filter perl(Win32::DDE::Client) from Requires
72952f8
72952f8
* Mon Aug 06 2007 Robin Norwood <rnorwood@redhat.com> - 2.4.3-2
72952f8
- Apply changes from package review
72952f8
- untabify spec file
72952f8
- Add various files to %%doc
72952f8
- turn on 3D/GL
72952f8
- turn on IO Browser
72952f8
- add a bunch of BRs to enable more modules
72952f8
- remove unneeded Provides
72952f8
- perl-PDL-2.4.3-hdf.patch to look for hdf devel files in the right place
72952f8
- perl-PDL-2.4.3-test.patch to fix some tests
72952f8
- perl-PDL-2.4.3-x86_64.patch to find 64bit libraries for some modules
72952f8
- perl-PDL-2.4.3-Xext.patch to remove -lXext from GL linking options
72952f8
3e256d2
* Sat Dec 02 2006 Robin Norwood <rnorwood@redhat.com> - 2.4.3-1
3e256d2
- Latest version from CPAN: 2.4.3
3e256d2
c24358f
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.4.2-4.fc5.1
cc67695
- rebuild
cc67695
jvdias 3cf2cde
* Fri Mar 10 2006 Jason Vas Dias <jvdias@redhat.com> - 2.4.2-4
jvdias 3cf2cde
- Further code cleanup & CFLAGS settings required to enable tests 
jvdias 3cf2cde
  to succeed on all platforms
jvdias 3cf2cde
jvdias b8b7d1d
* Thu Mar 09 2006 Jason Vas Dias <jvdias@redhat.com> - 2.4.2-4
jvdias b8b7d1d
- Enable tests to succeed on ia64 (remove casts from int to * !)
jvdias b8b7d1d
d136372
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.4.2-2.fc5.1.2.2
d136372
- bump again for double-long bug on ppc(64)
d136372
e7ad9ec
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.4.2-2.fc5.1.2.1
e7ad9ec
- rebuilt for new gcc4.1 snapshot and glibc changes
e7ad9ec
jvdias 21ff72b
* Fri Feb 03 2006 Jason Vas Dias <jvdias@redhat.com> - 2.4.2-2.fc5.1.2
jvdias 21ff72b
- rebuild for new perl-5.8.8
jvdias b18e44c
- enable build to succeed without perl-PDL being installed :-)
jvdias 21ff72b
ff348f0
* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
89744ca
- rebuilt for new gcc
89744ca
89744ca
* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
ff348f0
- rebuilt for new gcj
ff348f0
6fdea0a
* Sun Sep 25 2005 Warren Togami <wtogami@redhat.com> - 2.4.2-2
6fdea0a
- Ship pdldoc.db, tune build dependencies and file permissions (#163219 scop)
6fdea0a
cfb44b7
* Fri May 27 2005 Warren Togami <wtogami@redhat.com> - 2.4.2-1
cfb44b7
- 2.4.2
cfb44b7
- filter perl(Inline) from provides (#158733)
cfb44b7
a0a5cb1
* Wed May 11 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 2.4.1-11
a0a5cb1
- Add missing perl(PDL::Graphics::TriD*) provides. (#156482)
a0a5cb1
- Explicitly filter perl(Tk). (#156482)
a0a5cb1
e6fa15d
* Sat Apr 30 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 2.4.1-10
e6fa15d
- Bring up to date with current Fedora.Extras perl spec template. (#156482)
b39a7a0
- disable SMP flags so it actually builds
ce7621a
7b839f9
* Sat Dec 18 2004 Miloslav Trmac <mitr@redhat.com> - 2.4.1-9
7b839f9
- Rebuild with fixed gsl-devel (#142695)
7b839f9
680c4b6
* Sun Dec 12 2004 Miloslav Trmac <mitr@redhat.com> - 2.4.1-8
680c4b6
- Fix more bugs on 64-bit platforms
680c4b6
- BuildRequires: gsl-devel
680c4b6
a9c6c3a
* Sun Dec 12 2004 Miloslav Trmac <mitr@redhat.com> - 2.4.1-7
a9c6c3a
- Fix rangeb on 64-bit platforms (I hope) (#141413)
a9c6c3a
c6ca76b
* Thu Nov 25 2004 Miloslav Trmac <mitr@redhat.com> - 2.4.1-6
c6ca76b
- Convert man page to UTF-8
c6ca76b
cvsdist 403543d
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
cvsdist 403543d
- rebuilt
cvsdist 403543d
cvsdist fad6b38
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
cvsdist fad6b38
- rebuilt
cvsdist fad6b38
cvsdist fad6b38
* Fri Feb 13 2004 Chip Turner <cturner@redhat.com> 2.4.1-1
cvsdist fad6b38
- update to 2.4.1
cvsdist fad6b38
cvsdist a6aedcb
* Mon Jun 16 2003 Chip Turner <cturner@redhat.com> 2.4.0-2
cvsdist a6aedcb
- move to 2.4.0, integrate dependency fixes from other tree
cvsdist a6aedcb
cvsdist 058de1f
* Wed Jan 29 2003 Chip Turner <cturner@redhat.com>
cvsdist 058de1f
- bump
cvsdist 058de1f
cvsdist 058de1f
* Mon Jan 27 2003 Chip Turner <cturner@redhat.com>
cvsdist 058de1f
- version bump and rebuild
cvsdist 058de1f
cvsdist 058de1f
* Wed Nov 20 2002 Chip Turner <cturner@redhat.com>
cvsdist 058de1f
- move to 2.3.4
cvsdist 058de1f
cvsdist ae07c02
* Tue Aug  6 2002 Chip Turner <cturner@redhat.com>
cvsdist ae07c02
- automated release bump and build
cvsdist ae07c02
cvsdist 7e1183d
* Tue Jul 16 2002 Chip Turner <cturner@redhat.com>
95d71a0
- updated %%description
cvsdist 7e1183d
cvsdist 7e1183d
* Thu Jun 27 2002 Chip Turner <cturner@redhat.com>
cvsdist 7e1183d
- description update
cvsdist 7e1183d
cvsdist 7e1183d
* Fri Jun 07 2002 cturner@redhat.com
cvsdist 7e1183d
- Specfile autogenerated
cvsdist 7e1183d