Return-Path: Delivered-To: apmail-perl-modperl-cvs-archive@www.apache.org Received: (qmail 86936 invoked from network); 17 Mar 2006 00:41:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Mar 2006 00:41:09 -0000 Received: (qmail 54135 invoked by uid 500); 17 Mar 2006 00:41:09 -0000 Delivered-To: apmail-perl-modperl-cvs-archive@perl.apache.org Received: (qmail 54119 invoked by uid 500); 17 Mar 2006 00:41:09 -0000 Mailing-List: contact modperl-cvs-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@perl.apache.org List-Id: Delivered-To: mailing list modperl-cvs@perl.apache.org Received: (qmail 54107 invoked by uid 99); 17 Mar 2006 00:41:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Mar 2006 16:41:08 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 16 Mar 2006 16:41:07 -0800 Received: (qmail 86815 invoked by uid 65534); 17 Mar 2006 00:40:47 -0000 Message-ID: <20060317004047.86814.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r386498 - in /perl/modperl/trunk: Changes lib/ModPerl/BuildMM.pm xs/APR/APR/Makefile.PL Date: Fri, 17 Mar 2006 00:40:46 -0000 To: modperl-cvs@perl.apache.org From: stas@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: stas Date: Thu Mar 16 16:40:43 2006 New Revision: 386498 URL: http://svn.apache.org/viewcvs?rev=386498&view=rev Log: Make sure that LIBS and other MakeMaker command line flags are not ignored by the top level Makefile.PL and xs/APR/APR/Makefile.PL Modified: perl/modperl/trunk/Changes perl/modperl/trunk/lib/ModPerl/BuildMM.pm perl/modperl/trunk/xs/APR/APR/Makefile.PL Modified: perl/modperl/trunk/Changes URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/Changes?rev=386498&r1=386497&r2=386498&view=diff ============================================================================== --- perl/modperl/trunk/Changes (original) +++ perl/modperl/trunk/Changes Thu Mar 16 16:40:43 2006 @@ -12,6 +12,9 @@ =item 2.0.3-dev +Make sure that LIBS and other MakeMaker command line flags are not +ignored by the top level Makefile.PL and xs/APR/APR/Makefile.PL [Stas] + Corrected a typo that would cause the corruption of $), the effective group id as Perl sees it [Gozer] Modified: perl/modperl/trunk/lib/ModPerl/BuildMM.pm URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/lib/ModPerl/BuildMM.pm?rev=386498&r1=386497&r2=386498&view=diff ============================================================================== --- perl/modperl/trunk/lib/ModPerl/BuildMM.pm (original) +++ perl/modperl/trunk/lib/ModPerl/BuildMM.pm Thu Mar 16 16:40:43 2006 @@ -75,7 +75,9 @@ $build ||= build_config(); ModPerl::MM::my_import(__PACKAGE__); - my $inc = $build->inc; + my $inc; + $inc = $args{INC} if $args{INC}; + $inc = " " . $build->inc; if (my $glue_inc = $build->{MP_XS_GLUE_DIR}) { for (split /\s+/, $glue_inc) { $inc .= " -I$_"; @@ -84,6 +86,7 @@ my $libs; my @libs = (); + push @libs, $args{LIBS} if $args{LIBS}; if (Apache2::Build::BUILD_APREXT) { # in order to decouple APR/APR::* from mod_perl.so, # link these modules against the static MP_APR_LIB lib, @@ -105,18 +108,33 @@ } $libs = join ' ', @libs; - my $ccflags = $build->perl_ccopts . $build->ap_ccopts; + my $ccflags; + $ccflags = $args{CCFLAGS} if $args{CCFLAGS}; + $ccflags = " " . $build->perl_ccopts . $build->ap_ccopts; + + my $optimize; + $optimize = $args{OPTIMIZE} if $args{OPTIMIZE}; + $optimize = " " . $build->perl_config('optimize'); + + my $lddlflags; + $lddlflags = $args{LDDLFLAGS} if $args{LDDLFLAGS}; + $lddlflags = " " . $build->perl_config('lddlflags'); + + my %dynamic_lib; + %dynamic_lib = %{ $args{dynamic_lib}||{} } if $args{dynamic_lib}; + $dynamic_lib{OTHERLDFLAGS} = $build->otherldflags; my @opts = ( - INC => $inc, - CCFLAGS => $ccflags, - OPTIMIZE => $build->perl_config('optimize'), - LDDLFLAGS => $build->perl_config('lddlflags'), - LIBS => $libs, - dynamic_lib => { OTHERLDFLAGS => $build->otherldflags }, + INC => $inc, + CCFLAGS => $ccflags, + OPTIMIZE => $optimize, + LDDLFLAGS => $lddlflags, + LIBS => $libs, + dynamic_lib => \%dynamic_lib, ); my @typemaps; + push @typemaps, $args{TYPEMAPS} if $args{TYPEMAPS}; my $pwd = Cwd::fastcwd(); for ('xs', $pwd, "$pwd/..") { my $typemap = $build->file_path("$_/typemap"); Modified: perl/modperl/trunk/xs/APR/APR/Makefile.PL URL: http://svn.apache.org/viewcvs/perl/modperl/trunk/xs/APR/APR/Makefile.PL?rev=386498&r1=386497&r2=386498&view=diff ============================================================================== --- perl/modperl/trunk/xs/APR/APR/Makefile.PL (original) +++ perl/modperl/trunk/xs/APR/APR/Makefile.PL Thu Mar 16 16:40:43 2006 @@ -13,12 +13,16 @@ use constant SOLARIS => $^O eq 'solaris'; use constant BUILD_APREXT => Apache2::Build::BUILD_APREXT; -my %args = ( - 'NAME' => 'APR', - 'VERSION_FROM' => 'APR.pm', -); +my %args; + +%args = map { split /=/, $_ } @ARGV; + +$args{NAME} = 'APR'; +$args{VERSION_FROM} = 'APR.pm'; my $libs = ''; +$libs = delete $args{LIBS} if $args{LIBS}; + my $build = ModPerl::BuildMM::build_config(); my @apru_link_flags = $build->apru_link_flags; @@ -53,7 +57,9 @@ # -R makes sure that these paths will be used $extralddflags =~ s{-L(\S+)}{-L$1 -R$1}g; - $args{LDDLFLAGS} = $extralddflags . " " . $build->perl_config('lddlflags'); + $args{LDDLFLAGS} = "" unless exists $args{LDDLFLAGS}; + $args{LDDLFLAGS} = join " ", $args{LDDLFLAGS}, $extralddflags, + $build->perl_config('lddlflags'); # -R are now copied to LDDFLAGS, but leave -L's in LIBS -- # EU::MM needs it.