forked from pool/perl-Data-Util
Accepting request 327569 from home:hsk17:branches:devel:languages:perl
make it build with perl-5.22 OBS-URL: https://build.opensuse.org/request/show/327569 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Data-Util?expand=0&rev=16
This commit is contained in:
committed by
Git OBS Bridge
parent
a8a6308068
commit
ff4d988e74
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 27 13:51:06 UTC 2015 - hsk@imb-jena.de
|
||||||
|
|
||||||
|
- added perl522.patch: patch from rt.cpan.org, #99097, to get
|
||||||
|
module built with perl-5.22
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 7 09:05:32 UTC 2014 - coolo@suse.com
|
Fri Mar 7 09:05:32 UTC 2014 - coolo@suse.com
|
||||||
|
|
||||||
|
@@ -25,6 +25,7 @@ License: Artistic-1.0 or GPL-1.0+
|
|||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
Url: http://search.cpan.org/dist/Data-Util/
|
Url: http://search.cpan.org/dist/Data-Util/
|
||||||
Source: http://www.cpan.org/authors/id/G/GF/GFUJI/%{cpan_name}-%{version}.tar.gz
|
Source: http://www.cpan.org/authors/id/G/GF/GFUJI/%{cpan_name}-%{version}.tar.gz
|
||||||
|
Patch0: perl522.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: perl-macros
|
BuildRequires: perl-macros
|
||||||
@@ -47,6 +48,7 @@ There are many benchmarks in the _DIST-DIR/benchmark/_ directory.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%setup -q -n %{cpan_name}-%{version}
|
||||||
find . -type f -print0 | xargs -0 chmod 644
|
find . -type f -print0 | xargs -0 chmod 644
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
||||||
|
40
perl522.patch
Normal file
40
perl522.patch
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
diff -rup Data-Util-0.63-eMJzy2-orig/DataUtil.xs Data-Util-0.63-eMJzy2/DataUtil.xs
|
||||||
|
--- Data-Util-0.63-eMJzy2-orig/DataUtil.xs 2013-04-03 00:06:08.000000000 -0700
|
||||||
|
+++ Data-Util-0.63-eMJzy2/DataUtil.xs 2014-09-23 18:48:48.000000000 -0700
|
||||||
|
@@ -674,7 +674,14 @@ my_uninstall_sub(pTHX_ HV* const stash,
|
||||||
|
CV* code;
|
||||||
|
|
||||||
|
if(!isGV(gv)){ /* a subroutine stub or special constant*/
|
||||||
|
- if(SvROK((SV*)gv) && ckWARN(WARN_MISC)){
|
||||||
|
+ /* or perhaps a sub ref */
|
||||||
|
+ if(SvROK((SV*)gv)) {
|
||||||
|
+ if(SvTYPE(SvRV(gv)) == SVt_PVCV) {
|
||||||
|
+ if( specified_code &&
|
||||||
|
+ specified_code != (CV*)SvRV(gv) )
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ else if(ckWARN(WARN_MISC))
|
||||||
|
Perl_warner(aTHX_ packWARN(WARN_MISC), "Constant subroutine %s uninstalled", name);
|
||||||
|
}
|
||||||
|
(void)hv_delete(stash, name, namelen, G_DISCARD);
|
||||||
|
diff -rup Data-Util-0.63-eMJzy2-orig/lib/Data/Util/PurePerl.pm Data-Util-0.63-eMJzy2/lib/Data/Util/PurePerl.pm
|
||||||
|
--- Data-Util-0.63-eMJzy2-orig/lib/Data/Util/PurePerl.pm 2012-10-20 04:54:44.000000000 -0700
|
||||||
|
+++ Data-Util-0.63-eMJzy2/lib/Data/Util/PurePerl.pm 2014-09-23 18:44:36.000000000 -0700
|
||||||
|
@@ -246,8 +246,16 @@ sub uninstall_subroutine {
|
||||||
|
my $glob = $stash->{$name};
|
||||||
|
|
||||||
|
if(ref(\$glob) ne 'GLOB'){
|
||||||
|
- if(ref $glob){
|
||||||
|
+ if(ref $glob) {
|
||||||
|
+ if(Scalar::Util::reftype $glob eq 'CODE'){
|
||||||
|
+ if(defined $specified_code &&
|
||||||
|
+ $specified_code != $glob) {
|
||||||
|
+ next;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
warnings::warnif(misc => "Constant subroutine $name uninstalled");
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
delete $stash->{$name};
|
||||||
|
next;
|
Reference in New Issue
Block a user