diff --git a/0001-fix-compilation-with-gcc5.patch b/0001-fix-compilation-with-gcc5.patch new file mode 100644 index 0000000..a5a0db7 --- /dev/null +++ b/0001-fix-compilation-with-gcc5.patch @@ -0,0 +1,41 @@ +From 79ea78590ec9354a93ef0243a7efa5b786b001c5 Mon Sep 17 00:00:00 2001 +From: "Bernhard M. Wiedemann" +Date: Thu, 27 Aug 2015 20:13:51 +0200 +Subject: [PATCH] fix compilation with gcc5 + +error was: +X509.xs: In function 'XS_Crypt__OpenSSL__X509_extension': +X509.xs:740:10: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses] + if (!c > 0) { + ^ +cc1: all warnings being treated as errors +Makefile:346: recipe for target 'X509.o' failed +--- + X509.xs | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/X509.xs b/X509.xs +index 23f7666..8380ff9 100644 +--- a/X509.xs ++++ b/X509.xs +@@ -181,7 +181,7 @@ static HV* hv_exts(X509* x509, int no_name) { + sv_2mortal((SV*)RETVAL); + c = X509_get_ext_count(x509); + +- if ( ! c > 0 ) { ++ if ( !(c > 0) ) { + croak("No extensions found\n"); + } + +@@ -868,7 +868,7 @@ extension(x509, i) + + c = X509_get_ext_count(x509); + +- if (!c > 0) { ++ if (!(c > 0)) { + croak("No extensions found\n"); + } else if (i >= c || i < 0) { + croak("Requested extension index out of range\n"); +-- +2.5.0 + diff --git a/perl-Crypt-OpenSSL-X509.changes b/perl-Crypt-OpenSSL-X509.changes index 605910b..46fda4f 100644 --- a/perl-Crypt-OpenSSL-X509.changes +++ b/perl-Crypt-OpenSSL-X509.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 27 18:21:26 UTC 2015 - bwiedemann@suse.com + +- add 0001-fix-compilation-with-gcc5.patch + ------------------------------------------------------------------- Sun May 08 09:56:02 UTC 2011 - pascal.bleser@opensuse.org diff --git a/perl-Crypt-OpenSSL-X509.spec b/perl-Crypt-OpenSSL-X509.spec index 9319531..c154c47 100644 --- a/perl-Crypt-OpenSSL-X509.spec +++ b/perl-Crypt-OpenSSL-X509.spec @@ -2,7 +2,7 @@ # # spec file for package perl-Crypt-OpenSSL-X509 # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,6 +24,8 @@ Summary: Perl extension to OpenSSL's X509 API License: Artistic-1.0 or GPL-2.0+ Group: Development/Libraries/Perl Source: http://search.cpan.org/CPAN/authors/id/D/DA/DANIEL/Crypt-OpenSSL-X509-%{version}.tar.gz +# Patch proposed upstream https://github.com/dsully/perl-crypt-openssl-x509/pull/43 +Patch1: 0001-fix-compilation-with-gcc5.patch Url: http://search.cpan.org/dist/Crypt-OpenSSL-X509 BuildRoot: %{_tmppath}/%{name}-%{version}-build %{perl_requires} @@ -41,6 +43,7 @@ This implements a large majority of OpenSSL's useful X509 API. %prep %setup -q -n "Crypt-OpenSSL-X509-%{version}" %__sed -i '/^auto_install/d' Makefile.PL +%patch1 -p1 %build %__perl Makefile.PL PREFIX="%{_prefix}"