diff --git a/cpanspec.yml b/cpanspec.yml index 24fab1f..1b5942a 100644 --- a/cpanspec.yml +++ b/cpanspec.yml @@ -10,6 +10,8 @@ #patches: # foo.patch: -p1 # bar.patch: +format.patch: -p1 +undefined.patch: -p1 #preamble: |- # BuildRequires: gcc-c++ #post_prep: |- diff --git a/format.patch b/format.patch new file mode 100644 index 0000000..e2fc065 --- /dev/null +++ b/format.patch @@ -0,0 +1,13 @@ +Index: List-MoreUtils-XS-0.423/XS.xs +=================================================================== +--- List-MoreUtils-XS-0.423.orig/XS.xs ++++ List-MoreUtils-XS-0.423/XS.xs +@@ -2310,7 +2310,7 @@ CODE: + idx = SvIV(*PL_stack_sp); + + if (UNLIKELY(idx < 0 && (idx += (AvFILLp(tmp)+1)) < 0)) +- croak("Modification of non-creatable array value attempted, subscript %ld", idx); ++ croak("Modification of non-creatable array value attempted, subscript %" IVdf, idx); + + if(UNLIKELY(NULL == (inner = av_fetch(tmp, idx, FALSE)))) + { diff --git a/perl-List-MoreUtils-XS.changes b/perl-List-MoreUtils-XS.changes index 86b3e85..a6a8063 100644 --- a/perl-List-MoreUtils-XS.changes +++ b/perl-List-MoreUtils-XS.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Sep 12 08:16:32 UTC 2017 - schwab@suse.de + +- format.patch: fix format errors +- undefined.patch: fix undefined operation + ------------------------------------------------------------------- Mon Sep 4 05:39:47 UTC 2017 - coolo@suse.com diff --git a/perl-List-MoreUtils-XS.spec b/perl-List-MoreUtils-XS.spec index 10ab038..33237db 100644 --- a/perl-List-MoreUtils-XS.spec +++ b/perl-List-MoreUtils-XS.spec @@ -27,6 +27,8 @@ Group: Development/Libraries/Perl Url: http://search.cpan.org/dist/List-MoreUtils-XS/ Source0: https://cpan.metacpan.org/authors/id/R/RE/REHSACK/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml +Patch0: format.patch +Patch1: undefined.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl BuildRequires: perl-macros @@ -44,6 +46,8 @@ only a backend, the API is not public and can change without any warning. %prep %setup -q -n %{cpan_name}-%{version} +%patch0 -p1 +%patch1 -p1 %build %{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" diff --git a/undefined.patch b/undefined.patch new file mode 100644 index 0000000..7a21e47 --- /dev/null +++ b/undefined.patch @@ -0,0 +1,14 @@ +Index: List-MoreUtils-XS-0.423/XS.xs +=================================================================== +--- List-MoreUtils-XS-0.423.orig/XS.xs ++++ List-MoreUtils-XS-0.423/XS.xs +@@ -2114,7 +2114,8 @@ CODE: + + if(seen_undef == max) + { +- EXTEND(SP, ++count); ++ ++count; ++ EXTEND(SP, count); + ST(count-1) = &PL_sv_undef; + } +