From 1edf28f1609cbc43ad0abcb5e2d7a2dcf04c0adf50f331655a3c5bbd5f1a3d3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Thu, 26 May 2011 09:28:10 +0000 Subject: [PATCH] backport CBuilder fix OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl?expand=0&rev=64 --- perl-cbuilder-ccflags.diff | 18 ++++++++++++++++++ perl.changes | 6 ++++++ perl.spec | 2 ++ 3 files changed, 26 insertions(+) create mode 100644 perl-cbuilder-ccflags.diff diff --git a/perl-cbuilder-ccflags.diff b/perl-cbuilder-ccflags.diff new file mode 100644 index 0000000..5883c31 --- /dev/null +++ b/perl-cbuilder-ccflags.diff @@ -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/\.[^.]*/); diff --git a/perl.changes b/perl.changes index e1cf4e4..945ac43 100644 --- a/perl.changes +++ b/perl.changes @@ -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 diff --git a/perl.spec b/perl.spec index 8e71345..a4f834d 100644 --- a/perl.spec +++ b/perl.spec @@ -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