backport CBuilder fix

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=64
This commit is contained in:
Michael Schröder 2011-05-26 09:28:10 +00:00 committed by Git OBS Bridge
parent 520e73ddc7
commit 1edf28f160
3 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,18 @@
--- dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm.orig 2011-05-26 09:23:49.000000000 +0000
+++ dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm 2011-05-26 09:26:10.000000000 +0000
@@ -40,11 +40,13 @@ sub new {
$self->{config}{$k} = $v unless exists $self->{config}{$k};
}
$self->{config}{cc} = $ENV{CC} if defined $ENV{CC};
- $self->{config}{ccflags} = $ENV{CFLAGS} if defined $ENV{CFLAGS};
+ $self->{config}{ccflags} = join(" ", $self->{config}{ccflags}, $ENV{CFLAGS})
+ if defined $ENV{CFLAGS};
$self->{config}{cxx} = $ENV{CXX} if defined $ENV{CXX};
$self->{config}{cxxflags} = $ENV{CXXFLAGS} if defined $ENV{CXXFLAGS};
$self->{config}{ld} = $ENV{LD} if defined $ENV{LD};
- $self->{config}{ldflags} = $ENV{LDFLAGS} if defined $ENV{LDFLAGS};
+ $self->{config}{ldflags} = join(" ", $self->{config}{ldflags}, $ENV{LDFLAGS})
+ if defined $ENV{LDFLAGS};
unless ( exists $self->{config}{cxx} ) {
my ($ccpath, $ccbase, $ccsfx ) = fileparse($self->{config}{cc}, qr/\.[^.]*/);

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu May 26 11:27:14 CEST 2011 - mls@suse.de
- backport CBuilder fix that keeps it from overwriting ccflags
from the perl config if CCFLAGS is set in the environment
-------------------------------------------------------------------
Tue May 17 16:20:56 CEST 2011 - mls@suse.de

View File

@ -39,6 +39,7 @@ Patch3: perl-nroff.diff
Patch4: perl-netcmdutf8.diff
Patch5: perl-HiRes.t-timeout.diff
Patch6: perl-saverecontext.diff
Patch7: perl-cbuilder-ccflags.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: perl-base = %version
#PreReq: %fillup_prereq
@ -134,6 +135,7 @@ cp -p %{S:3} .
%patch4
%patch5
%patch6
%patch7
%build
cp -a lib savelib