Accepting request 778068 from home:tinita:branches:devel:languages:perl

- Add patch defined-array-ConstructorInjection.patch,
   defined-array-SetterInjection.patch

OBS-URL: https://build.opensuse.org/request/show/778068
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-IOC?expand=0&rev=5
This commit is contained in:
Lars Vogdt
2020-02-21 20:03:49 +00:00
committed by Git OBS Bridge
parent 281d99e8d7
commit 51ae2c85b4
5 changed files with 116 additions and 34 deletions

31
cpanspec.yml Normal file
View File

@@ -0,0 +1,31 @@
---
#description_paragraphs: 3
#description: |-
# override description from CPAN
#summary: override summary from CPAN
#no_testing: broken upstream
#sources:
# - source1
# - source2
patches:
# Can't use 'defined(@array)'
# https://rt.cpan.org/Public/Bug/Display.html?id=108764
defined-array-ConstructorInjection.patch: -p1
defined-array-SetterInjection.patch: -p1
# bar.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

View File

@@ -0,0 +1,11 @@
--- IOC-0.29.orig/lib/IOC/Service/ConstructorInjection.pm 2007-04-23 01:51:12.000000000 +0200
+++ IOC-0.29/lib/IOC/Service/ConstructorInjection.pm 2020-02-21 18:44:10.935524139 +0100
@@ -46,7 +46,7 @@
# and then to be sure, lets look for
# either the VERSION or the ISA variables
(defined ${"${component_class}::VERSION"}
- || defined @{"${component_class}::ISA"})) ? 1 : 0;
+ || @{"${component_class}::ISA"})) ? 1 : 0;
} || eval "use $component_class";
# throw our exception if the class fails to load
throw IOC::ClassLoadingError "The class '$component_class' could not be loaded" => $@ if $@;

View File

@@ -0,0 +1,11 @@
--- IOC-0.29.orig/lib/IOC/Service/SetterInjection.pm 2007-04-23 01:51:12.000000000 +0200
+++ IOC-0.29/lib/IOC/Service/SetterInjection.pm 2020-02-21 18:44:25.703631360 +0100
@@ -43,7 +43,7 @@
# and then to be sure, lets look for
# either the VERSION or the ISA variables
(defined ${"${component_class}::VERSION"}
- || defined @{"${component_class}::ISA"})) ? 1 : 0;
+ || @{"${component_class}::ISA"})) ? 1 : 0;
} || eval "use $component_class";
# throw our exception if the class fails to load
throw IOC::ClassLoadingError "The class '$component_class' could not be loaded" => $@ if $@;

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 21 17:40:59 UTC 2020 - Tina Müller <tina.mueller@suse.com>
- Add patch defined-array-ConstructorInjection.patch,
defined-array-SetterInjection.patch
-------------------------------------------------------------------
Mon Nov 29 18:30:15 UTC 2010 - coolo@novell.com

View File

@@ -1,51 +1,74 @@
%define cpan_name IOC
#
# spec file for package perl-IOC
#
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
Name: perl-%cpan_name
Version: 0.29
Release: 1
Provides: %cpan_name
Requires: perl-Class-Interfaces perl-Class-StrongSingleton perl-Class-Throwable perl-XML-SAX
Group: Development/Libraries/Perl
License: Artistic
URL: http://search.cpan.org/dist/IOC/
Summary: A lightweight IOC (Inversion of Control) framework
Source: %cpan_name-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl-Class-Interfaces perl-Class-StrongSingleton perl-Class-Throwable perl-Test-Exception perl-Test-Pod perl-XML-SAX perl-macros perl
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: perl-IOC
Version: 0.29
Release: 0
%define cpan_name IOC
Summary: Lightweight IOC (Inversion of Control) framework
License: Artistic-1.0 OR GPL-1.0-or-later
Group: Development/Libraries/Perl
Url: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/S/ST/STEVAN/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
Patch0: defined-array-ConstructorInjection.patch
Patch1: defined-array-SetterInjection.patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Class::Interfaces) >= 0.01
BuildRequires: perl(Class::StrongSingleton) >= 0.01
BuildRequires: perl(Class::Throwable) >= 0.04
BuildRequires: perl(Test::Exception) >= 0.150000
BuildRequires: perl(XML::SAX) >= 0.12
Requires: perl(Class::Interfaces) >= 0.01
Requires: perl(Class::StrongSingleton) >= 0.01
Requires: perl(Class::Throwable) >= 0.04
Requires: perl(Test::Exception) >= 0.150000
Requires: perl(XML::SAX) >= 0.12
%{perl_requires}
%description
This module provide a lightweight IOC or Inversion of Control framework.
Inversion of Control, sometimes called Dependency Injection, is a component
management style which aims to clean up component configuration and provide
a cleaner, more flexible means of configuring a large application.
a cleaner, more flexible means of configuring a large application.
%prep
%setup -q -n %cpan_name-%{version}
%setup -q -n %{cpan_name}-%{version}
%patch0 -p1
%patch1 -p1
%build
perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall"
make
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%check
make test
%install
make DESTDIR=$RPM_BUILD_ROOT install_vendor
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%clean
# clean up the hard disc after build
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc %{_mandir}/man?/*
%{perl_vendorlib}/IOC.pm
%{perl_vendorlib}/IOC
%{perl_vendorlib}/Test
%{perl_vendorarch}/auto/IOC
%doc Changes MANIFEST README
%changelog -n %{name}
* Sun Oct 26 2008 - gerrit.beine@gmx.de
- first release 0.29
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README
%changelog