Accepting request 778013 from home:tinita:branches:devel:languages:perl
- Add patch storable-canonical.patch Tests are passing now, except for ppc. OBS-URL: https://build.opensuse.org/request/show/778013 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Convert-Bencode_XS?expand=0&rev=2
This commit is contained in:
committed by
Git OBS Bridge
parent
02c6c5f1bf
commit
41dbb8527d
29
cpanspec.yml
Normal file
29
cpanspec.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
#description_paragraphs: 3
|
||||
#description: |-
|
||||
# override description from CPAN
|
||||
#summary: override summary from CPAN
|
||||
#no_testing: broken upstream
|
||||
#sources:
|
||||
# - source1
|
||||
# - source2
|
||||
patches:
|
||||
# Tests fail due to randomized hashes in perl 5.18
|
||||
# https://rt.cpan.org/Public/Bug/Display.html?id=87012
|
||||
storable-canonical.patch:
|
||||
#preamble: |-
|
||||
# BuildRequires: gcc-c++
|
||||
#post_prep: |-
|
||||
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
|
||||
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
|
||||
#post_build: |-
|
||||
# rm unused.files
|
||||
#post_install: |-
|
||||
# sed on %{name}.files
|
||||
#license: SUSE-NonFree
|
||||
#skip_noarch: 1
|
||||
#custom_build: |-
|
||||
#./Build build flags=%{?_smp_mflags} --myflag
|
||||
#custom_test: |-
|
||||
#startserver && make test
|
||||
#ignore_requires: Bizarre::Module
|
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 21 14:43:17 UTC 2020 - Tina Müller <tina.mueller@suse.com>
|
||||
|
||||
- Add patch storable-canonical.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 15 12:02:41 UTC 2011 - chris@computersalat.de
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package perl-Convert-Bencode_XS (Version 0.06)
|
||||
# spec file for package perl-Convert-Bencode_XS
|
||||
#
|
||||
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2020 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
|
||||
@@ -12,62 +12,60 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: perl-Convert-Bencode_XS
|
||||
Version: 0.06
|
||||
Release: 1
|
||||
License: GPL+ or Artistic
|
||||
Release: 0
|
||||
%define cpan_name Convert-Bencode_XS
|
||||
Summary: Faster conversions to/from Bencode format
|
||||
Url: http://search.cpan.org/dist/Convert-Bencode_XS/
|
||||
License: Artistic-1.0 OR GPL-1.0-or-later
|
||||
Group: Development/Libraries/Perl
|
||||
#Source: http://www.cpan.org/authors/id/I/IW/IWADE/Convert-Bencode_XS-%{version}.tar.gz
|
||||
Source: %{cpan_name}-%{version}.tar.gz
|
||||
Url: https://metacpan.org/release/%{cpan_name}
|
||||
Source0: https://cpan.metacpan.org/authors/id/I/IW/IWADE/%{cpan_name}-%{version}.tar.gz
|
||||
Source1: cpanspec.yml
|
||||
Patch0: storable-canonical.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-macros
|
||||
BuildRequires: perl(Test::More)
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{perl_requires}
|
||||
|
||||
%description
|
||||
* bencode($stuff)
|
||||
|
||||
Returns a bencoded string representing what's in $stuff. $stuff can be
|
||||
either a scalar, an array reference or a hash reference. Every nesting of
|
||||
these data structures is allowed, other ones will croak.
|
||||
Returns a bencoded string representing what's in $stuff. $stuff can be
|
||||
either a scalar, an array reference or a hash reference. Every nesting of
|
||||
these data structures is allowed, other ones will croak.
|
||||
|
||||
* bdecode($bencoded)
|
||||
|
||||
Returns a Perl data structure: it could be either a scalar, array
|
||||
reference or hash reference depending on what's in $bencoded.
|
||||
Dictionaries are converted in hashes, lists in arrays, scalars in
|
||||
strings. If $COERCE (see below) is set to a false value then scalars
|
||||
encoded like integers will be cleanse() before being returned so that a
|
||||
re-serialization of the structure will give back exactly the same
|
||||
bencoded string.
|
||||
Returns a Perl data structure: it could be either a scalar, array reference
|
||||
or hash reference depending on what's in $bencoded. Dictionaries are
|
||||
converted in hashes, lists in arrays, scalars in strings. If $COERCE (see
|
||||
below) is set to a false value then scalars encoded like integers will be
|
||||
cleanse() before being returned so that a re-serialization of the structure
|
||||
will give back exactly the same bencoded string.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{cpan_name}-%{version}
|
||||
%patch0
|
||||
|
||||
%build
|
||||
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
||||
%{__make} %{?_smp_mflags}
|
||||
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
%{__make} test
|
||||
make test
|
||||
|
||||
%install
|
||||
%perl_make_install
|
||||
%perl_process_packlist
|
||||
%perl_gen_filelist
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%files -f %{name}.files
|
||||
%defattr(644,root,root,755)
|
||||
%defattr(-,root,root,755)
|
||||
%doc Changes README
|
||||
|
||||
%changelog
|
||||
|
10
storable-canonical.patch
Normal file
10
storable-canonical.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- t/001_tests.t.orig Sat Nov 15 14:41:13 2014
|
||||
+++ t/001_tests.t Sat Nov 15 14:41:27 2014
|
||||
@@ -109,6 +109,7 @@ SKIP: {
|
||||
#we use Storable so we do not rely on bencode
|
||||
eval q{use Storable qw(freeze)};
|
||||
skip "Storable not available", 12 if $@;
|
||||
+ local $Storable::canonical = 1;
|
||||
local $Convert::Bencode_XS::COERCE = 0;
|
||||
is( freeze(bdecode('le')), freeze([]) );
|
||||
is( freeze(bdecode('l0:0:0:e')), freeze(['', '', '']) );
|
Reference in New Issue
Block a user