[perl-PDL] Skip PDL::Slatec reverse dependencies if Slatec is disabled
Petr Pisar
ppisar at fedoraproject.org
Wed Feb 26 14:49:31 UTC 2014
commit e54b28acbd257b5b606282d17090d55193667ed8
Author: Petr Písař <ppisar at redhat.com>
Date: Wed Feb 26 15:31:11 2014 +0100
Skip PDL::Slatec reverse dependencies if Slatec is disabled
...all-modules-using-PDL-Slatec-if-Slatec-is.patch | 87 ++++++++++++++++++++
perl-PDL.spec | 9 ++-
2 files changed, 95 insertions(+), 1 deletions(-)
---
diff --git a/PDL-2.7.0-Do-not-install-modules-using-PDL-Slatec-if-Slatec-is.patch b/PDL-2.7.0-Do-not-install-modules-using-PDL-Slatec-if-Slatec-is.patch
new file mode 100644
index 0000000..6e3fc20
--- /dev/null
+++ b/PDL-2.7.0-Do-not-install-modules-using-PDL-Slatec-if-Slatec-is.patch
@@ -0,0 +1,87 @@
+From ced0a183ab016d786db0f6a39edd7c000694d111 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Wed, 26 Feb 2014 14:39:23 +0100
+Subject: [PATCH] Do not install modules using PDL::Slatec if Slatec is
+ disabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If Slatec support is disabled or detected as not available,
+PDL::Slatec modules will not be installed. Regardless the fact, other
+modules using PDL::Slatec get installed, despite of being unusable.
+
+This patch ommits such modules from installation if Slatec has been
+explicitly disabled.
+
+This does not cover the case when disabled by autodetection. This is
+because Slatec's Makefile.PL which does the detection is run after
+Makefile.PLs of affected reverse dependencies.
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ Lib/Filter/Makefile.PL | 7 ++++++-
+ Lib/Fit/Makefile.PL | 8 ++++++--
+ Lib/Makefile.PL | 6 ++++++
+ 3 files changed, 18 insertions(+), 3 deletions(-)
+
+diff --git a/Lib/Filter/Makefile.PL b/Lib/Filter/Makefile.PL
+index e9de58f..2cd6aa8 100644
+--- a/Lib/Filter/Makefile.PL
++++ b/Lib/Filter/Makefile.PL
+@@ -3,7 +3,12 @@ WriteMakefile(
+ NAME => 'PDL::Filter',
+ VERSION_FROM => '../../Basic/Core/Version.pm',
+ PM => {
+- map {($_ => '$(INST_LIBDIR)/Filter/'.$_)} <*.pm>
++ map {($_ => '$(INST_LIBDIR)/Filter/'.$_)}
++ grep {
++ !defined $PDL::Config{WITH_SLATEC} ||
++ $PDL::Config{WITH_SLATEC}==1 ||
++ !($_ eq 'LinPred.pm')
++ } <*.pm>
+ },
+ (eval ($ExtUtils::MakeMaker::VERSION) >= 6.57_02 ? ('NO_MYMETA' => 1) : ()),
+ );
+diff --git a/Lib/Fit/Makefile.PL b/Lib/Fit/Makefile.PL
+index a2e1273..73ded7b 100644
+--- a/Lib/Fit/Makefile.PL
++++ b/Lib/Fit/Makefile.PL
+@@ -1,11 +1,15 @@
+ use ExtUtils::MakeMaker;
+
+-
+ WriteMakefile(
+ 'NAME' => 'PDL::Fit',
+ VERSION_FROM => '../../Basic/Core/Version.pm',
+ DIR => [ qw/Gaussian/ ],
+- PM => { map {($_ => '$(INST_LIBDIR)/Fit/'.$_)} <*.pm> },
++ PM => { map {($_ => '$(INST_LIBDIR)/Fit/'.$_)}
++ grep {
++ !defined $PDL::Config{WITH_SLATEC} ||
++ $PDL::Config{WITH_SLATEC}==1 ||
++ !($_ eq 'Linfit.pm' || $_ eq 'LM.pm')
++ } <*.pm> },
+ (eval ($ExtUtils::MakeMaker::VERSION) >= 6.57_02 ? ('NO_MYMETA' => 1) : ()),
+ );
+
+diff --git a/Lib/Makefile.PL b/Lib/Makefile.PL
+index 115799f..a5b215f 100644
+--- a/Lib/Makefile.PL
++++ b/Lib/Makefile.PL
+@@ -9,6 +9,12 @@ WriteMakefile(
+ DIR => [ qw/Opt ImageRGB Fit FFT Filter Image2D ImageND
+ CallExt Slatec GSL GIS Transform Minuit Compression
+ / ],
++ PM => { map {($_ => '$(INST_LIBDIR)/'.$_)}
++ grep {
++ !defined $PDL::Config{WITH_SLATEC} ||
++ $PDL::Config{WITH_SLATEC}==1 ||
++ !($_ eq 'Gaussian.pm')
++ } <*.pm> },
+ (eval ($ExtUtils::MakeMaker::VERSION) >= 6.57_02 ? ('NO_MYMETA' => 1) : ()),
+ # Interpolate
+ );
+--
+1.8.5.3
+
diff --git a/perl-PDL.spec b/perl-PDL.spec
index a6fe5e8..3177228 100644
--- a/perl-PDL.spec
+++ b/perl-PDL.spec
@@ -11,7 +11,7 @@
Name: perl-PDL
%global cpan_version 2.007
Version: 2.7.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: The Perl Data Language
Group: Development/Libraries
License: GPL+ or Artistic
@@ -26,6 +26,9 @@ Patch2: PDL-2.4.10-Disable-PDL-GIS-Proj.patch
Patch3: PDL-2.6.0.90-Compile-Slatec-code-as-PIC.patch
# Disable Slatec code crashing on PPC64, bug #1041304
Patch4: PDL-2.7.0-Disable-PDL-Slatec.patch
+# Skip PDL::Slatec reverse dependencies if Slatec is disabled, bug #1041304,
+# https://sourceforge.net/p/pdl/bugs/350/
+Patch5: PDL-2.7.0-Do-not-install-modules-using-PDL-Slatec-if-Slatec-is.patch
BuildRequires: fftw2-devel
BuildRequires: freeglut-devel
BuildRequires: gcc-gfortran
@@ -152,6 +155,7 @@ such commercial packages as IDL and MatLab.
%if %{without slatec}
%patch4 -p1 -b .slatec
%endif
+%patch5 -p1 -b .slatec_revdep
# Fix shebang
sed -e 's,^#!/usr/bin/env perl,#!/usr/bin/perl,' -i Perldl2/pdl2
@@ -190,6 +194,9 @@ make test
%{_mandir}/man3/*.3*
%changelog
+* Wed Feb 26 2014 Petr Pisar <ppisar at redhat.com> - 2.7.0-3
+- Skip PDL::Slatec reverse dependencies if Slatec is disabled (bug #1041304)
+
* Mon Dec 16 2013 Petr Pisar <ppisar at redhat.com> - 2.7.0-2
- Disable Slatec on PPC64 (bug #1041304)
More information about the scm-commits
mailing list