[perl-PDL-Graphics-PLplot] Let package honor ${RPM_OPT_FLAGS}.

corsepiu corsepiu at fedoraproject.org
Sun Jul 13 15:57:19 UTC 2014


commit c46f6ee66313f15f99f3d249d427c81fbbef2365
Author: Ralf Corsépius <corsepiu at fedoraproject.org>
Date:   Sun Jul 13 17:57:31 2014 +0200

    Let package honor ${RPM_OPT_FLAGS}.
    
    - Add PDL-Graphics-PLplot.patch (Fix FTBFS due to -Werror=format-security).
    - Minor spec cleanup.

 PDL-Graphics-PLplot-0.67-hardening.patch |   12 ++++++++++++
 perl-PDL-Graphics-PLplot.spec            |   19 +++++++++++++------
 2 files changed, 25 insertions(+), 6 deletions(-)
---
diff --git a/PDL-Graphics-PLplot-0.67-hardening.patch b/PDL-Graphics-PLplot-0.67-hardening.patch
new file mode 100644
index 0000000..9460302
--- /dev/null
+++ b/PDL-Graphics-PLplot-0.67-hardening.patch
@@ -0,0 +1,12 @@
+diff -Naur PDL-Graphics-PLplot-0.67.orig/plplot.pd PDL-Graphics-PLplot-0.67/plplot.pd
+--- PDL-Graphics-PLplot-0.67.orig/plplot.pd	2013-11-15 16:51:28.000000000 +0100
++++ PDL-Graphics-PLplot-0.67/plplot.pd	2014-07-13 12:48:48.757782297 +0200
+@@ -3944,7 +3944,7 @@
+     croak ("labelfunc: must return one perl scalar");
+ 
+   // Copy label into output string
+-  snprintf( label_text, length, (char *)SvPV_nolen(ST(0)) );
++  snprintf( label_text, length, "%s", (char *)SvPV_nolen(ST(0)) );
+ 
+   PUTBACK;
+   FREETMPS;
diff --git a/perl-PDL-Graphics-PLplot.spec b/perl-PDL-Graphics-PLplot.spec
index 4c01eed..56b3c9b 100644
--- a/perl-PDL-Graphics-PLplot.spec
+++ b/perl-PDL-Graphics-PLplot.spec
@@ -2,16 +2,18 @@
 
 Name:           perl-PDL-Graphics-PLplot
 Version:        0.67
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Object-oriented interface from perl/PDL to the PLPLOT plotting library
 License:        GPL+ or Artistic
 URL:            http://search.cpan.org/dist/PDL-Graphics-PLplot/
 Source0:        http://search.cpan.org/CPAN/authors/id/D/DH/DHUNT/%{pkgname}-%{version}.tar.gz
+# Work around to FTBFS triggered by -Werror=format-security
+Patch0:         PDL-Graphics-PLplot-0.67-hardening.patch
+
 BuildRequires:  perl(ExtUtils::MakeMaker)
 BuildRequires:  perl(Test::More)
 BuildRequires:  perl(PDL)
 BuildRequires:  plplot-devel
-Requires:       perl(PDL)
 Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
 
 %description
@@ -25,27 +27,32 @@ interface which is easier to use.
 
 %prep
 %setup -qn %{pkgname}-%{version}
+%patch0 -p1
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="${RPM_OPT_FLAGS}"
 make %{?_smp_mflags}
 
 %install
 make pure_install PERL_INSTALL_ROOT=%{buildroot}
 find %{buildroot} -type f -name .packlist -exec rm -f {} \;
 %{_fixperms} %{buildroot}/*
-#rm %{buildroot}%{perl_vendorarch}/auto/PDL/Graphics/PLplot/PLplot.bs
 
 %check
 make test
 
 %files
 %doc Changes README
-%{perl_vendorarch}/*
-%exclude %dir %{perl_vendorarch}/auto/
+%{perl_vendorarch}/PDL
+%{perl_vendorarch}/auto/PDL
 %{_mandir}/man3/*
 
 %changelog
+* Sun Jul 13 2014 Ralf Corsépius <corsepiu at fedoraproject.org> - 0.67-3
+- Let package honor ${RPM_OPT_FLAGS}.
+- Add PDL-Graphics-PLplot.patch (Fix FTBFS due to -Werror=format-security).
+- Minor spec cleanup.
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.67-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list