perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
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 GMT
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 {



Mime
View raw message