Return-Path: Delivered-To: apmail-perl-modperl-cvs-archive@www.apache.org Received: (qmail 7131 invoked from network); 17 Oct 2010 18:46:14 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Oct 2010 18:46:14 -0000 Received: (qmail 99748 invoked by uid 500); 17 Oct 2010 18:46:14 -0000 Delivered-To: apmail-perl-modperl-cvs-archive@perl.apache.org Received: (qmail 99684 invoked by uid 500); 17 Oct 2010 18:46:14 -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 99677 invoked by uid 99); 17 Oct 2010 18:46:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Oct 2010 18:46:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 17 Oct 2010 18:46:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 718C623888CD; Sun, 17 Oct 2010 18:45:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1023553 - in /perl/modperl/trunk: Changes Makefile.PL lib/Apache2/Build.pm lib/ModPerl/BuildOptions.pm Date: Sun, 17 Oct 2010 18:45:17 -0000 To: modperl-cvs@perl.apache.org From: phred@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101017184517.718C623888CD@eris.apache.org> Author: phred Date: Sun Oct 17 18:45:16 2010 New Revision: 1023553 URL: http://svn.apache.org/viewvc?rev=1023553&view=rev Log: Look for a usable apxs in $ENV{PATH} if all other options fail, then prompt the user for one. Work around bootstrap warnings when Apache2::BuildConfig has not been created yet. Remove Apache::test compatibility (part of mod_perl 1.2.7), that code causes build issues and is 4 versions out of date. Modified: perl/modperl/trunk/Changes perl/modperl/trunk/Makefile.PL perl/modperl/trunk/lib/Apache2/Build.pm perl/modperl/trunk/lib/ModPerl/BuildOptions.pm Modified: perl/modperl/trunk/Changes URL: http://svn.apache.org/viewvc/perl/modperl/trunk/Changes?rev=1023553&r1=1023552&r2=1023553&view=diff ============================================================================== --- perl/modperl/trunk/Changes (original) +++ perl/modperl/trunk/Changes Sun Oct 17 18:45:16 2010 @@ -12,6 +12,15 @@ Also refer to the Apache::Test changes l =item 2.0.5-dev +Look for a usable apxs in $ENV{PATH} if all other options fail, then prompt the user for one. +[Phred] + +Work around bootstrap warnings when Apache2::BuildConfig has not been created yet. +[Phred] + +Remove Apache::test compatibility (part of mod_perl 1.2.7), that code causes build issues and is 4 versions out of date. +[Phred] + Make sure perl is built either with multiplicity and ithreads or without both [Theory, Torsten] Modified: perl/modperl/trunk/Makefile.PL URL: http://svn.apache.org/viewvc/perl/modperl/trunk/Makefile.PL?rev=1023553&r1=1023552&r2=1023553&view=diff ============================================================================== --- perl/modperl/trunk/Makefile.PL (original) +++ perl/modperl/trunk/Makefile.PL Sun Oct 17 18:45:16 2010 @@ -21,6 +21,7 @@ BEGIN { $old_Apache2_pm = delete $INC{'Apache2.pm'}; } }; + } use lib qw(lib Apache-Test/lib); @@ -629,13 +630,6 @@ use Config; use constant WIN32 => $^O eq 'MSWin32'; use constant BUILD_APREXT => Apache2::Build::BUILD_APREXT; -my $apache_test_install; -BEGIN { - $apache_test_install = -e 'Apache-Test'; - use lib './Apache-Test'; - require 'install-pl' if $apache_test_install; -} - sub MY::top_targets { my $self = shift; my $string = $self->ModPerl::BuildMM::MY::top_targets; @@ -729,9 +723,6 @@ modperl_banner: EOF - $string .= Apache::Test::install::nuke_Apache__test_target() - if $apache_test_install; - $string; } @@ -747,9 +738,6 @@ sub MY::install { # ModPerl::MM::add_dep(\$string, "pure${kind}_install" => 'aprext_install') # if BUILD_APREXT; - ModPerl::MM::add_dep(\$string, "pure${kind}_install" => 'nuke_Apache__test') - if $apache_test_install; - ModPerl::MM::add_dep_after(\$string, "install$kind", "doc${kind}_install", 'modperl_banner'); # glue_pods target must come first Modified: perl/modperl/trunk/lib/Apache2/Build.pm URL: http://svn.apache.org/viewvc/perl/modperl/trunk/lib/Apache2/Build.pm?rev=1023553&r1=1023552&r2=1023553&view=diff ============================================================================== --- perl/modperl/trunk/lib/Apache2/Build.pm (original) +++ perl/modperl/trunk/lib/Apache2/Build.pm Sun Oct 17 18:45:16 2010 @@ -897,6 +897,10 @@ sub default_file { sub file_path { my $self = shift; + + # work around when Apache2::BuildConfig has not been created yet + return unless $self && $self->{cwd}; + my @files = map { m:^/: ? $_ : join('/', $self->{cwd}, $_) } @_; return wantarray ? @files : $files[0]; } Modified: perl/modperl/trunk/lib/ModPerl/BuildOptions.pm URL: http://svn.apache.org/viewvc/perl/modperl/trunk/lib/ModPerl/BuildOptions.pm?rev=1023553&r1=1023552&r2=1023553&view=diff ============================================================================== --- perl/modperl/trunk/lib/ModPerl/BuildOptions.pm (original) +++ perl/modperl/trunk/lib/ModPerl/BuildOptions.pm Sun Oct 17 18:45:16 2010 @@ -66,6 +66,24 @@ sub init { $build->{MP_COMPAT_1X} = 1 unless exists $build->{MP_COMPAT_1X} && !$build->{MP_COMPAT_1X}; + # make a last ditch effort to find apxs in $ENV{PATH} + if (!$build->{MP_AP_PREFIX} && !$build->{MP_APXS}) { + + my @paths = split(/:/, $ENV{PATH}); + my $potential_apxs; + while (!$potential_apxs) { + + last if scalar(@paths) == 0; # don't loop endlessly + $potential_apxs = File::Spec->catfile(shift @paths, 'apxs'); + if (-e $potential_apxs && -x $potential_apxs) { + + $build->{MP_APXS} = $potential_apxs; + print "MP_APXS unspecified, using $potential_apxs\n\n"; + } else { + undef $potential_apxs; + } + } + } } sub parse {