You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by ra...@apache.org on 2005/05/19 07:55:31 UTC
svn commit: r170878 - /httpd/apreq/trunk/build/version_check.pl
Author: randyk
Date: Wed May 18 22:55:30 2005
New Revision: 170878
URL: http://svn.apache.org/viewcvs?rev=170878&view=rev
Log:
generate APR::DummyVersions under glue/perl/lib/, containing
just package names and versions of those packages to be provided.
Modified:
httpd/apreq/trunk/build/version_check.pl
Modified: httpd/apreq/trunk/build/version_check.pl
URL: http://svn.apache.org/viewcvs/httpd/apreq/trunk/build/version_check.pl?rev=170878&r1=170877&r2=170878&view=diff
==============================================================================
--- httpd/apreq/trunk/build/version_check.pl (original)
+++ httpd/apreq/trunk/build/version_check.pl Wed May 18 22:55:30 2005
@@ -103,6 +103,43 @@
return $prereq_string;
}
+sub print_dummy_versions {
+ require File::Spec;
+ my $version = shift;
+ my @mods = qw(APR::Request);
+ push @mods,
+ (map {"APR::Request::$_"} qw(Apache2 CGI Error Cookie Param)),
+ (map {"Apache2::$_"} qw(Request Cookie Upload));
+ my $dummy_versions = File::Spec->catfile(qw(glue perl lib APR),
+ 'DummyVersions.pm');
+ my $len = 0;
+ for (@mods) {
+ $len = length $_ if length $_ > $len;
+ }
+ $len += length '$::VERSION';
+
+ my $warning = << 'WARN';
+
+********************** WARNING ************************
+ This file was generated by build/version_check.pl
+ Any changes made here will be lost.
+*******************************************************
+
+WARN
+
+ $warning =~ s/^/\# /mg;
+ open(my $fh, '>', $dummy_versions)
+ or die "Cannot open $dummy_versions for writing: $!";
+ print $fh $warning;
+
+ for my $mod (@mods) {
+ printf $fh "\npackage %s;\n%-${len}s = %s;\n",
+ $mod, '$'.$mod."::VERSION", $version;
+ }
+ print $fh "\n\n1;\n";
+ close $fh;
+}
+
if ($path eq 'perl_prereqs') {
print perl_prereqs();
exit;
@@ -151,6 +188,7 @@
);
print_prereqs "requires:", \%runtime_prereqs;
print_prereqs "build_requires:", \%perl_glue;
+ print_dummy_versions($opts{version});
}
else { # generate PREREQUISITES file content