Pascal Bleser
2010-07-24 23:23:59 +00:00
committed by Git OBS Bridge
parent 7a15fb1869
commit a8b4e57a2d
2 changed files with 72 additions and 0 deletions

View File

@@ -6,6 +6,8 @@ Version: 1.07
Release: 0
Summary: Comprehensive set of aliasing operations
Source: http://search.cpan.org/CPAN/authors/id/X/XM/XMATH/Data-Alias-%{version}.tar.gz
# see https://rt.cpan.org/Public/Bug/Display.html?id=57410
Patch1: perl-Data-Alias-fix_for_perl_5_12.patch
URL: http://search.cpan.org/dist/Data-Alias/
Group: Development/Libraries/Perl
License: Perl License
@@ -13,6 +15,8 @@ BuildRoot: %{_tmppath}/build-%{name}-%{version}
Requires: perl = %{perl_version}
BuildRequires: make perl gcc glibc-devel
%define is_perl_5_12 %(perl -MConfig -e 'print $Config{api_revision} >= 5 && $Config{api_revision} < 6 && $Config{api_version} >= 12 ? "1":"0"')
%description
Aliasing is the phenomenon where two different expressions actually refer to
the same thing. Modifying one will modify the other, and if you take a
@@ -21,6 +25,10 @@ reference to both, the two values are the same.
%prep
%setup -q -n "Data-Alias-%{version}"
%__sed -i '/^auto_install/d' Makefile.PL
# only apply patch with Perl >= 5.12 and < 6 (presumably)
%if %is_perl_5_12
%patch1
%endif
%build
%__perl Makefile.PL PREFIX="%{_prefix}"
@@ -30,8 +38,10 @@ reference to both, the two values are the same.
%perl_make_install
%perl_process_packlist
%if !%is_perl_5_12
%check
%__make test
%endif
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}