Blob Blame History Raw
Name:           perl-PDL
Version:        2.4.2
Release: 	4.fc5
Summary:        PDL Perl module

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.2-fix_64bit_pointers.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  perl >= 1:5.6.1
BuildRequires:  gsl-devel
BuildRequires:  perl(Inline)
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)

%description
PDL ("Perl Data Language") gives standard Perl the ability to
compactly store and speedily manipulate the large N-dimensional data
arrays which are the bread and butter of scientific computing.  PDL
turns perl in to a free, array-oriented, numerical language similar to
such commercial packages as IDL and MatLab.


%prep
%setup -q -n PDL-%{version} 
%patch0 -p1 -b .settings
%patch1 -p1
%patch2 -p1
# Provides: explicitly filter perl(Inline)
cat <<__EOF__ > %{name}-findperlprovides
#!/bin/sh
%{__perl_provides} \$* | grep -v 'perl(Inline)'
__EOF__
%define __perl_provides %{_builddir}/PDL-%{version}/%{name}-findperlprovides
chmod +x %{__perl_provides}

# Requires: explicitly filter perl(Tk)
cat <<__EOF__ > %{name}-findperlrequires
#!/bin/sh
%{__perl_requires} \$* | grep -v 'perl(Tk)'
__EOF__
%define __perl_requires %{_builddir}/PDL-%{version}/%{name}-findperlrequires
chmod +x %{__perl_requires}

%define debug_package %{nil}
%build
export PERL5LIB=`pwd`/blib/lib:`pwd`/blib/arch:
#^- can no longer build if perl-PDL is not installed without above
#
CFLAGS="$RPM_OPT_FLAGS -Wno-unused" %{__perl} Makefile.PL INSTALLDIRS=vendor
make OPTIMIZE="$RPM_OPT_FLAGS -Wno-unused"
# smp flags blows up spectacularly (2.4.1-10 May 7th 2005)

%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
%{__perl} -Mblib Doc/scantree.pl $RPM_BUILD_ROOT%{perl_vendorarch}
%{__perl} -pi -e "s|$RPM_BUILD_ROOT/|/|g" \
  $RPM_BUILD_ROOT%{perl_vendorarch}/PDL/pdldoc.db
find $RPM_BUILD_ROOT%{perl_vendorarch} -type f -name "*.pm" | xargs chmod -x
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"
/usr/lib/rpm/brp-compress
exit 0

%check || :
export PERL5LIB=`pwd`/blib/lib
make test

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc COPYING 
%{_bindir}/*
%{perl_vendorarch}/Inline/*
%{perl_vendorarch}/PDL*
%{perl_vendorarch}/auto/PDL/
%{_mandir}/man1/*.1*
%{_mandir}/man3/*.3*


%changelog
* Thu Mar 09 2006 Jason Vas Dias <jvdias@redhat.com> - 2.4.2-4
- Enable tests to succeed on ia64 (remove casts from int to * !)

* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.4.2-2.fc5.1.2.2
- bump again for double-long bug on ppc(64)

* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.4.2-2.fc5.1.2.1
- rebuilt for new gcc4.1 snapshot and glibc changes

* Fri Feb 03 2006 Jason Vas Dias <jvdias@redhat.com> - 2.4.2-2.fc5.1.2
- rebuild for new perl-5.8.8
- enable build to succeed without perl-PDL being installed :-)

* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt for new gcc

* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt for new gcj

* Sun Sep 25 2005 Warren Togami <wtogami@redhat.com> - 2.4.2-2
- Ship pdldoc.db, tune build dependencies and file permissions (#163219 scop)

* Fri May 27 2005 Warren Togami <wtogami@redhat.com> - 2.4.2-1
- 2.4.2
- filter perl(Inline) from provides (#158733)

* Wed May 11 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 2.4.1-11
- Add missing perl(PDL::Graphics::TriD*) provides. (#156482)
- Explicitly filter perl(Tk). (#156482)

* Sat Apr 30 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 2.4.1-10
- Bring up to date with current Fedora.Extras perl spec template. (#156482)
- disable SMP flags so it actually builds

* Sat Dec 18 2004 Miloslav Trmac <mitr@redhat.com> - 2.4.1-9
- Rebuild with fixed gsl-devel (#142695)

* Sun Dec 12 2004 Miloslav Trmac <mitr@redhat.com> - 2.4.1-8
- Fix more bugs on 64-bit platforms
- BuildRequires: gsl-devel

* Sun Dec 12 2004 Miloslav Trmac <mitr@redhat.com> - 2.4.1-7
- Fix rangeb on 64-bit platforms (I hope) (#141413)

* Thu Nov 25 2004 Miloslav Trmac <mitr@redhat.com> - 2.4.1-6
- Convert man page to UTF-8

* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Fri Feb 13 2004 Chip Turner <cturner@redhat.com> 2.4.1-1
- update to 2.4.1

* Mon Jun 16 2003 Chip Turner <cturner@redhat.com> 2.4.0-2
- move to 2.4.0, integrate dependency fixes from other tree

* Wed Jan 29 2003 Chip Turner <cturner@redhat.com>
- bump

* Mon Jan 27 2003 Chip Turner <cturner@redhat.com>
- version bump and rebuild

* Wed Nov 20 2002 Chip Turner <cturner@redhat.com>
- move to 2.3.4

* Tue Aug  6 2002 Chip Turner <cturner@redhat.com>
- automated release bump and build

* Tue Jul 16 2002 Chip Turner <cturner@redhat.com>
- updated %description

* Thu Jun 27 2002 Chip Turner <cturner@redhat.com>
- description update

* Fri Jun 07 2002 cturner@redhat.com
- Specfile autogenerated