Author: jkaluza
Date: Thu Jun 27 06:39:28 2013
New Revision: 1497221
URL: http://svn.apache.org/r1497221
Log:
Save results of xs_generate to xs/tables/current24 when buildign with httpd-2.4.
This allows having generated xs wrapping for both httpd-2.4 and httpd-2.2
versions.
Modified:
perl/modperl/branches/httpd24/Makefile.PL
perl/modperl/branches/httpd24/lib/Apache2/ParseSource.pm
perl/modperl/branches/httpd24/lib/ModPerl/MapUtil.pm
Modified: perl/modperl/branches/httpd24/Makefile.PL
URL:
http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/Makefile.PL?rev=1497221&r1=1497220&r2=1497221&view=diff
==============================================================================
--- perl/modperl/branches/httpd24/Makefile.PL (original)
+++ perl/modperl/branches/httpd24/Makefile.PL Thu Jun 27 06:39:28 2013
@@ -8,6 +8,7 @@ $ENV{MOD_PERL_2_BUILD} = 1;
use constant MIN_HTTPD_VERSION_DYNAMIC => '2.0.47';
use constant MIN_HTTPD_VERSION_STATIC => '2.0.51';
+use constant MIN_HTTPD_24_VERSION => '2.4.0';
my($old_modperl_version, $old_modperl_pm, $old_Apache2_pm);
@@ -412,9 +413,13 @@ sub post_configure {
sub tables_dir {
my $httpd_version = shift;
- my $tables_version = 'current';
- #XXX: support versioning
- #$httpd_version =~ /-dev$/ ? 'current' : $httpd_version;
+ my $tables_version='';
+ if ($httpd_version lt MIN_HTTPD_24_VERSION) {
+ $tables_version='current';
+ }
+ else {
+ $tables_version='current24';
+ }
my $tables_dir = "xs/tables/$tables_version";
}
Modified: perl/modperl/branches/httpd24/lib/Apache2/ParseSource.pm
URL:
http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/lib/Apache2/ParseSource.pm?rev=1497221&r1=1497220&r2=1497221&view=diff
==============================================================================
--- perl/modperl/branches/httpd24/lib/Apache2/ParseSource.pm (original)
+++ perl/modperl/branches/httpd24/lib/Apache2/ParseSource.pm Thu Jun 27
06:39:28 2013
@@ -539,7 +539,16 @@ sub write_pm {
my ($subdir) = (split '::', $name)[0];
- my $tdir = 'xs/tables/current';
+ my $tdir = '';
+ my $build = Apache2::Build->new(init => 1);
+ my $httpd_version = $build->httpd_version;
+ if ($httpd_version lt '2.4.0') {
+ $tdir='xs/tables/current';
+ }
+ else {
+ $tdir='xs/tables/current24';
+ }
+
if (-d "$tdir/$subdir") {
$file = "$tdir/$subdir/$file";
}
Modified: perl/modperl/branches/httpd24/lib/ModPerl/MapUtil.pm
URL:
http://svn.apache.org/viewvc/perl/modperl/branches/httpd24/lib/ModPerl/MapUtil.pm?rev=1497221&r1=1497220&r2=1497221&view=diff
==============================================================================
--- perl/modperl/branches/httpd24/lib/ModPerl/MapUtil.pm (original)
+++ perl/modperl/branches/httpd24/lib/ModPerl/MapUtil.pm Thu Jun 27 06:39:28
2013
@@ -46,7 +46,14 @@ my $function_table = [];
sub function_table {
return $function_table if @$function_table;
- push @INC, "xs/tables/current";
+ my $build = Apache2::Build->new(init => 1);
+ my $httpd_version = $build->httpd_version;
+ if ($httpd_version lt '2.4.0' || ! -d "xs/tables/current24") {
+ push @INC, "xs/tables/current";
+ }
+ else {
+ push @INC, "xs/tables/current24";
+ }
require Apache2::FunctionTable;
require ModPerl::FunctionTable;
require APR::FunctionTable;