cvs commit: modperl-2.0/lib/Apache Build.pm

2003-01-31 Thread stas
stas2003/01/31 23:46:24

  Modified:lib/Apache Build.pm
  Log:
  indent
  
  Revision  ChangesPath
  1.111 +1 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.110
  retrieving revision 1.111
  diff -u -r1.110 -r1.111
  --- Build.pm  1 Feb 2003 07:39:43 -   1.110
  +++ Build.pm  1 Feb 2003 07:46:24 -   1.111
  @@ -385,7 +385,7 @@
   
   my $maybe = $self->find_dlfile_maybe($name);
   my $suggest = @$maybe ? 
  -  "You could just symlink it to $maybe->[0]" :
  +"You could just symlink it to $maybe->[0]" :
   'You might need to install Perl from source';
   $self->phat_warn(<


cvs commit: modperl-2.0/lib/Apache Build.pm

2003-01-31 Thread stas
stas2003/01/31 23:39:43

  Modified:lib/Apache Build.pm
  Log:
  - create MKPATH make variable as we are going to use it more than once
there is no need to test for the existance of the path, before calling
mkpath(), it does no harm if the dir already exists
  - use the MKPATH variable
  
  Revision  ChangesPath
  1.110 +3 -3  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.109
  retrieving revision 1.110
  diff -u -r1.109 -r1.110
  --- Build.pm  14 Dec 2002 17:29:34 -  1.109
  +++ Build.pm  1 Feb 2003 07:39:43 -   1.110
  @@ -1052,14 +1052,14 @@
   
   MODPERL_PIC_OBJS = $(MODPERL_O_PIC_FILES) $(MODPERL_XS_O_PIC_FILES)
   
  +MKPATH = $(MODPERL_PERLPATH) "-MExtUtils::Command" -e mkpath
  +
   all: lib
   
   lib: $(MODPERL_LIB)
   
   install:
  - $(MODPERL_PERLPATH) -e "exit ! -d qq{$(MODPERL_AP_LIBEXECDIR)}" || \
  - $(MODPERL_PERLPATH) -MExtUtils::Command  \
  - -e mkpath $(MODPERL_AP_LIBEXECDIR)
  + @$(MKPATH) $(MODPERL_AP_LIBEXECDIR)
$(MODPERL_TEST_F) $(MODPERL_LIB_DSO) && \
$(MODPERL_CP) $(MODPERL_LIB_DSO) $(MODPERL_AP_LIBEXECDIR)
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-11-28 Thread stas
stas2002/11/28 08:31:36

  Modified:lib/Apache Build.pm
  Log:
  a comment speling fix
  
  Revision  ChangesPath
  1.108 +1 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- Build.pm  29 Aug 2002 02:00:56 -  1.107
  +++ Build.pm  28 Nov 2002 16:31:36 -  1.108
  @@ -431,7 +431,7 @@
   }
   }
   
  -#--- constuctors ---
  +#--- constructors ---
   
   my $bpm = 'Apache/BuildConfig.pm';
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-08-28 Thread dougm

dougm   2002/08/28 19:00:56

  Modified:lib/Apache Build.pm
  Log:
  dont add -Ae to ccopts when using gcc on hpux
  
  Revision  ChangesPath
  1.107 +1 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- Build.pm  26 Aug 2002 03:11:09 -  1.106
  +++ Build.pm  29 Aug 2002 02:00:56 -  1.107
  @@ -267,7 +267,7 @@
   
   sub ccopts_hpux {
   my $cflags = shift;
  -#return if $Config{cc} eq 'gcc'; #XXX?
  +return if $Config{cc} eq 'gcc'; #XXX?
   return if $$cflags =~ /(-Ae|\+e)/;
   $$cflags .= " -Ae ";
   }
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-08-25 Thread dougm

dougm   2002/08/25 20:11:09

  Modified:lib/Apache Build.pm
  Log:
  whoopsie
  
  Revision  ChangesPath
  1.106 +1 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.105
  retrieving revision 1.106
  diff -u -r1.105 -r1.106
  --- Build.pm  26 Aug 2002 03:08:19 -  1.105
  +++ Build.pm  26 Aug 2002 03:11:09 -  1.106
  @@ -755,7 +755,7 @@
   $version =~ s/\"//g;
   last;
   }
  -elseif (/^\#define\s+AP_SERVER_BASEREVISION\s+\"(.*)\"/) {
  +elsif (/^\#define\s+AP_SERVER_BASEREVISION\s+\"(.*)\"/) {
   $version = $1;
   last;
   }
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-08-25 Thread dougm

dougm   2002/08/25 20:08:20

  Modified:lib/Apache Build.pm
  Log:
  adjust to ap_release.h version changes.  SIGH.
  
  Revision  ChangesPath
  1.105 +17 -4 modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.104
  retrieving revision 1.105
  diff -u -r1.104 -r1.105
  --- Build.pm  15 Aug 2002 02:10:32 -  1.104
  +++ Build.pm  26 Aug 2002 03:08:19 -  1.105
  @@ -742,10 +742,23 @@
   
   my $version;
   
  -while(<$fh>) {
  -next unless /^\#define\s+AP_SERVER_BASEREVISION\s+\"(.*)\"/;
  -$version = $1;
  -last;
  +while (<$fh>) {
  +#now taking bets on how many friggin times this will change
  +#over the course of apache 2.0.  1.3 changed it at least a half
  +#dozen times.  hopefully it'll stay in the same file at least.
  +if (/^\#define\s+AP_SERVER_MAJORVERSION\s+\"(\d+)\"/) {
  +#XXX could be more careful here.  whatever.  see above.
  +my $major = $1;
  +my $minor = (split /\s+/, scalar(<$fh>))[-1];
  +my $patch = (split /\s+/, scalar(<$fh>))[-1];
  +$version = join '.', $major, $minor, $patch;
  +$version =~ s/\"//g;
  +last;
  +}
  +elseif (/^\#define\s+AP_SERVER_BASEREVISION\s+\"(.*)\"/) {
  +$version = $1;
  +last;
  +}
   }
   
   close $fh;
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-08-14 Thread stas

stas2002/08/14 19:10:32

  Modified:lib/Apache Build.pm
  Log:
  make it possible to build mod_perl against the source tree, where apr.h is
  located in srclib/include/apr/ and not include/
  
  Revision  ChangesPath
  1.104 +6 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.103
  retrieving revision 1.104
  diff -u -r1.103 -r1.104
  --- Build.pm  14 Aug 2002 02:33:00 -  1.103
  +++ Build.pm  15 Aug 2002 02:10:32 -  1.104
  @@ -765,7 +765,12 @@
   
   my $dir = $self->ap_includedir;
   
  -my $header = "$dir/apr.h";
  +my $header;
  +for my $d ($dir, "$dir/../srclib/apr/include") {
  +$header = "$d/apr.h";
  +last if -e $header;
  +}
  +
   open my $fh, $header or do {
   error "Unable to open $header: $!";
   return undef;
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-08-13 Thread stas

stas2002/08/13 19:33:01

  Modified:lib/Apache Build.pm
  Log:
  apxs post-2.0.40 adds a new line, so we strip it
  
  Revision  ChangesPath
  1.103 +1 -0  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- Build.pm  23 Jun 2002 21:46:09 -  1.102
  +++ Build.pm  14 Aug 2002 02:33:00 -  1.103
  @@ -123,6 +123,7 @@
   }
   
   my $val = qx($apxs @_ 2>/dev/null);
  +chomp $val if defined $val; # apxs post-2.0.40 adds a new line
   
   unless ($val) {
   error "'$apxs @_' failed:";
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-23 Thread dougm

dougm   2002/06/23 14:46:09

  Modified:.Makefile.PL
   lib/Apache Build.pm
  Log:
  parse apr.h and save some useful config values (e.g. APR_HAS_THREADS)
  
  Revision  ChangesPath
  1.86  +2 -0  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- Makefile.PL   31 May 2002 00:41:08 -  1.85
  +++ Makefile.PL   23 Jun 2002 21:46:09 -  1.86
  @@ -167,6 +167,8 @@
   printf "Configuring Apache/%s mod_perl/%s Perl/v%vd\n",
 $httpd_version, $VERSION, $^V;
   
  +my $apr_config = $build->get_apr_config; #cache it
  +
   for (@{ clean_files() }) {
   debug "unlink...$_" if -e $_ && unlink;
   }
  
  
  
  1.102 +32 -0 modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- Build.pm  19 Jun 2002 01:32:58 -  1.101
  +++ Build.pm  23 Jun 2002 21:46:09 -  1.102
  @@ -752,6 +752,38 @@
   $self->httpd_version_cache($dir, $version);
   }
   
  +my %wanted_apr_config = map { $_, 1} qw(
  +HAS_THREADS HAS_DSO HAS_MMAP HAS_RANDOM HAS_SENDFILE
  +HAS_INLINE HAS_FORK
  +);
  +
  +sub get_apr_config {
  +my $self = shift;
  +
  +return $self->{apr_config} if $self->{apr_config};
  +
  +my $dir = $self->ap_includedir;
  +
  +my $header = "$dir/apr.h";
  +open my $fh, $header or do {
  +error "Unable to open $header: $!";
  +return undef;
  +};
  +
  +my %cfg;
  +while (<$fh>) {
  +next unless s/^\#define\s+APR_((HAVE|HAS|USE)_\w+)/$1/;
  +chomp;
  +my($name, $val) = split /\s+/, $_, 2;
  +next unless $wanted_apr_config{$name};
  +$val =~ s/\s+$//;
  +next unless $val =~ /^\d+$/;
  +$cfg{$name} = $val;
  +}
  +
  +$self->{apr_config} = \%cfg;
  +}
  +
   #--- generate Makefile ---
   
   sub canon_make_attr {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-18 Thread dougm

dougm   2002/06/18 18:32:58

  Modified:lib/Apache Build.pm
  Log:
  only win32 has -DDEBUGGING in both optimize and ccflags
  
  Revision  ChangesPath
  1.101 +2 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- Build.pm  19 Jun 2002 01:26:28 -  1.100
  +++ Build.pm  19 Jun 2002 01:32:58 -  1.101
  @@ -252,7 +252,8 @@
   $fixup->(\$cflags);
   }
   
  -if ($self->{MP_DEBUG}) {
  +if (WIN32 and $self->{MP_DEBUG}) {
  +#only win32 has -DDEBUGGING in both optimize and ccflags
   my $optim = $Config{optimize};
   
   unless ($optim =~ /-DDEBUGGING/) {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-18 Thread dougm

dougm   2002/06/18 18:26:28

  Modified:lib/Apache Build.pm
  Log:
  need to check ccflags rather than optimize for -DDEBUGGING
  
  Revision  ChangesPath
  1.100 +1 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- Build.pm  17 Jun 2002 19:42:49 -  1.99
  +++ Build.pm  19 Jun 2002 01:26:28 -  1.100
  @@ -285,7 +285,7 @@
   $val ||= $Config{optimize};
   
   if ($self->{MP_DEBUG}) {
  -return ' ' unless $val =~ /-DDEBUGGING/;
  +return ' ' unless $Config{ccflags} =~ /-DDEBUGGING/;
   }
   
   $val;
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-15 Thread dougm

dougm   2002/06/15 18:58:50

  Modified:lib/Apache Build.pm
  Log:
  hmm, darwin ldflags fixup was not quite good enough
  
  Revision  ChangesPath
  1.98  +4 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- Build.pm  15 Jun 2002 17:26:29 -  1.97
  +++ Build.pm  16 Jun 2002 01:58:50 -  1.98
  @@ -175,7 +175,10 @@
   }
   elsif (DARWIN) {
   #not sure how this can happen, but it shouldn't
  -$config->{ldflags} =~ s/-undefined suppress//;
  +my @bogus_flags = 'flat_namespace', 'bundle', 'undefined suppress';
  +for my $flag (@bogus_flags) {
  +$config->{ldflags} =~ s/-$flag\s*//;
  +}
   }
   
   my $ldopts = ExtUtils::Embed::ldopts();
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-15 Thread dougm

dougm   2002/06/15 10:26:29

  Modified:lib/Apache Build.pm
  Log:
  remove "-undefined suppress" from ldflags on darwin (should never be there)
  
  Revision  ChangesPath
  1.97  +7 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- Build.pm  30 May 2002 06:00:49 -  1.96
  +++ Build.pm  15 Jun 2002 17:26:29 -  1.97
  @@ -170,7 +170,13 @@
   my $config = tied %Config;
   my $ldflags = $config->{ldflags};
   
  -$config->{ldflags} = '' if WIN32; #same as lddlflags
  +if (WIN32) {
  +$config->{ldflags} = ''; #same as lddlflags
  +}
  +elsif (DARWIN) {
  +#not sure how this can happen, but it shouldn't
  +$config->{ldflags} =~ s/-undefined suppress//;
  +}
   
   my $ldopts = ExtUtils::Embed::ldopts();
   chomp $ldopts;
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-29 Thread dougm

dougm   02/05/29 23:00:49

  Modified:lib/Apache Build.pm
  Log:
  prevent possible fatal warning seen in 5.6.0/darwin in MM->init_others
  
  Revision  ChangesPath
  1.96  +4 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -r1.95 -r1.96
  --- Build.pm  30 May 2002 01:52:55 -  1.95
  +++ Build.pm  30 May 2002 06:00:49 -  1.96
  @@ -824,6 +824,9 @@
   $$val =~ s/\(($mm_replace)\)/(MODPERL_\U$perl_config_pm_alias{$1})/g;
   }
   
  +#help prevent warnings
  +my @mm_init_vars = (BASEEXT => '');
  +
   sub make_tools {
   my($self, $fh) = @_;
   
  @@ -832,7 +835,7 @@
   }
   
   require ExtUtils::MakeMaker;
  -my $mm = bless {}, 'MM';
  +my $mm = bless { @mm_init_vars }, 'MM';
   $mm->init_others;
   
   for (qw(rm_f mv ld ar cp test_f)) {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-29 Thread dougm

dougm   02/05/29 18:52:55

  Modified:lib/Apache Build.pm
  Log:
  darwin does not like ranlib on mod_perl.so
  
  Revision  ChangesPath
  1.95  +9 -4  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.94
  retrieving revision 1.95
  diff -u -r1.94 -r1.95
  --- Build.pm  29 May 2002 03:26:40 -  1.94
  +++ Build.pm  30 May 2002 01:52:55 -  1.95
  @@ -20,6 +20,7 @@
   use constant HAS_ITHREADS =>
   $Config{useithreads} && ($Config{useithreads} eq 'define');
   
  +use constant DARWIN => $^O eq 'darwin';
   use constant WIN32 => $^O eq 'MSWin32';
   use constant MSVC  => WIN32() && ($Config{cc} eq 'cl');
   
  @@ -863,10 +864,14 @@
   
   sub dynamic_link_default {
   my $self = shift;
  -return $self->dynamic_link_header_default . <<'EOF';
  - -o $@
  - $(MODPERL_RANLIB) $@
  -EOF
  +
  +my $link = $self->dynamic_link_header_default . "\t" . '-o $@';
  +
  +my $ranlib = "\t" . '$(MODPERL_RANLIB) $@';
  +
  +$link .= "\n" . $ranlib unless DARWIN;
  +
  +$link;
   }
   
   sub dynamic_link_MSWin32 {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-28 Thread stas

stas02/05/28 20:26:40

  Modified:lib/Apache Build.pm
  Log:
  check that MP_AP_PREFIX is set before using it
  
  Revision  ChangesPath
  1.94  +2 -0  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.93
  retrieving revision 1.94
  diff -u -r1.93 -r1.94
  --- Build.pm  23 May 2002 23:36:31 -  1.93
  +++ Build.pm  29 May 2002 03:26:40 -  1.94
  @@ -72,6 +72,8 @@
   sub ap_prefix_is_source_tree {
   my $self = shift;
   
  +return unless exists $self->{MP_AP_PREFIX};
  +
   my $prefix = $self->{MP_AP_PREFIX};
   
   -d $prefix and -e "$prefix/CHANGES";
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-23 Thread dougm

dougm   02/05/23 16:36:31

  Modified:lib/Apache Build.pm
  Log:
  leave out libperl dep if it isnt found in the properl place
  
  Revision  ChangesPath
  1.93  +9 -5  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- Build.pm  23 May 2002 02:35:19 -  1.92
  +++ Build.pm  23 May 2002 23:36:31 -  1.93
  @@ -940,11 +940,15 @@
   print $fh $self->canon_make_attr("lib_$type", $libs{$type});
   }
   
  -print $fh $self->canon_make_attr('libperl',
  - join '/',
  - $self->perl_config('archlibexp'),
  - 'CORE',
  - $self->perl_config('libperl'));
  +my $libperl = join '/',
  +  $self->perl_config('archlibexp'), 'CORE', $self->perl_config('libperl');
  +
  +#this is only used for deps, if libperl has changed, relink mod_perl.so
  +#not all perl dists put libperl where it should be, so just leave this
  +#out if it isn't in the proper place
  +if (-e $libperl) {
  +print $fh $self->canon_make_attr('libperl', $libperl);
  +}
   
   for my $method (qw(ccopts ldopts inc)) {
   print $fh $self->canon_make_attr($method, $self->$method());
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-22 Thread dougm

dougm   02/05/22 19:35:19

  Modified:.Makefile.PL
   lib/Apache Build.pm
  Log:
  on hpux with bleedperl $Config{ld} is the fullpath, strip to the basename
  
  Revision  ChangesPath
  1.84  +2 -1  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- Makefile.PL   22 May 2002 02:07:08 -  1.83
  +++ Makefile.PL   23 May 2002 02:35:19 -  1.84
  @@ -344,8 +344,9 @@
   
   sub os_check_hpux {
   my $ccflags = $build->perl_config('ccflags');
  +my $ld = $build->perl_config('ld');
   
  -if ($build->is_dynamic and $Config{ld} eq 'ld') {
  +if ($build->is_dynamic and $ld eq 'ld') {
   unless ($ccflags =~ /\+z/i) {
   $build->phat_warn(

cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-21 Thread dougm

dougm   02/05/21 18:59:00

  Modified:.Makefile.PL
   lib/Apache Build.pm
  Log:
  make it possible to change the name of src/modules/perl/Makefile
  in case static build requires a src/modules/perl/Makefile.in
  
  Revision  ChangesPath
  1.82  +12 -8 modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- Makefile.PL   21 May 2002 16:19:51 -  1.81
  +++ Makefile.PL   22 May 2002 01:58:59 -  1.82
  @@ -23,6 +23,7 @@
   use File::Spec::Functions;
   use DirHandle ();
   use File::Copy 'cp';
  +use File::Basename 'basename';
   
   use Apache::Build ();
   use Apache::TestReportPerl ();
  @@ -70,11 +71,14 @@
   VERSION => $VERSION,
   DIR => get_dirs_with_makefile(@remote_makefile_dirs),
   macro => {
  -MODPERL_SRC   => $code->path,
  -PERL  => $build->perl_config('perlpath'),
  -MOD_INSTALL   => ModPerl::MM::mod_install(),
  -APACHE_PREFIX => $build->apxs('-q' => 'prefix'),
  -APACHE_LIBDIR => $build->apxs('-q' => 'libexecdir'),
  +MODPERL_SRC  => $code->path,
  +MODPERL_MAKEFILE => basename($build->default_file('makefile')),
  +MAKE_F   => '$(MAKE) ' . (WIN32 ? '/f' : '-f'),
  +MODPERL_LIBMAKE  => '$(MAKE) -f $(MODPERL_MAKEFILE)',
  +PERL => $build->perl_config('perlpath'),
  +MOD_INSTALL  => ModPerl::MM::mod_install(),
  +APACHE_PREFIX=> $build->apxs('-q' => 'prefix'),
  +APACHE_LIBDIR=> $build->apxs('-q' => 'libexecdir'),
   },
   clean => {
   FILES => "@{ clean_files() }",
  @@ -390,13 +394,13 @@
$(SHELL) build/make_etags
   
   modperl_lib:
  - cd "$(MODPERL_SRC)" && $(MAKE)
  + cd "$(MODPERL_SRC)" && $(MODPERL_LIBMAKE)
   
   modperl_lib_install:
  - cd "$(MODPERL_SRC)" && $(MAKE) install
  + cd "$(MODPERL_SRC)" && $(MODPERL_LIBMAKE) install
   
   modperl_src_clean:
  - cd "$(MODPERL_SRC)" && $(MAKE) clean
  + cd "$(MODPERL_SRC)" && $(MODPERL_LIBMAKE) clean
   
   EOF
   
  
  
  
  1.91  +6 -3  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.90
  retrieving revision 1.91
  diff -u -r1.90 -r1.91
  --- Build.pm  21 May 2002 17:42:39 -  1.90
  +++ Build.pm  22 May 2002 01:58:59 -  1.91
  @@ -9,6 +9,7 @@
   use Config;
   use Cwd ();
   use File::Spec ();
  +use File::Basename;
   use ExtUtils::Embed ();
   use ModPerl::Code ();
   use ModPerl::BuildOptions ();
  @@ -450,7 +451,7 @@
   my %default_files = (
   'build_config' => 'lib/Apache/BuildConfig.pm',
   'ldopts' => 'src/modules/perl/ldopts',
  -'makefile' => 'src/modules/perl/Makefile',
  +'makefile' => 'src/modules/perl/Makefile.modperl',
   );
   
   sub clean_files {
  @@ -908,6 +909,8 @@
   
   print $fh noedit_warning_hash();
   
  +print $fh $self->canon_make_attr('makefile', basename $mf);
  +
   $self->make_tools($fh);
   
   print $fh $self->canon_make_attr('ap_libs', $self->apache_libs);
  @@ -1006,8 +1009,8 @@
$(MODPERL_CLEAN_FILES) \
$(MODPERL_XS_CLEAN_FILES)
   
  -$(MODPERL_OBJS): $(MODPERL_H_FILES) Makefile
  -$(MODPERL_PIC_OBJS): $(MODPERL_H_FILES) Makefile
  +$(MODPERL_OBJS): $(MODPERL_H_FILES) $(MODPERL_MAKEFILE)
  +$(MODPERL_PIC_OBJS): $(MODPERL_H_FILES) $(MODPERL_MAKEFILE)
   $(MODPERL_LIB): $(MODPERL_LIBPERL)
   
   $(MODPERL_LIBNAME)$(MODPERL_LIB_EXT): $(MODPERL_OBJS)
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-21 Thread dougm

dougm   02/05/21 09:59:02

  Modified:lib/Apache Build.pm
  Log:
  add ap_prefix_is_source_tree method
  
  Revision  ChangesPath
  1.89  +9 -2  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- Build.pm  21 May 2002 16:49:53 -  1.88
  +++ Build.pm  21 May 2002 16:59:02 -  1.89
  @@ -68,6 +68,14 @@
   return '';
   }
   
  +sub ap_prefix_is_source_tree {
  +my $self = shift;
  +
  +my $prefix = $self->{MP_AP_PREFIX};
  +
  +-d $prefix and -e "$prefix/CHANGES";
  +}
  +
   sub apxs {
   my $self = shift;
   
  @@ -1049,8 +1057,7 @@
   
   push @inc, $self->mp_include_dir;
   
  -my $prefix = $self->{MP_AP_PREFIX};
  -if (-d $prefix and not -e "$prefix/CHANGES") {
  +unless ($self->ap_prefix_is_source_tree) {
   my $ainc = $self->apxs('-q' => 'INCLUDEDIR');
   if (-d $ainc) {
   push @inc, $ainc;
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-21 Thread dougm

dougm   02/05/21 09:49:53

  Modified:lib/Apache Build.pm
  Log:
  dont bother looking for the ssl includes, we dont use them
  
  Revision  ChangesPath
  1.88  +0 -7  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- Build.pm  21 May 2002 16:48:29 -  1.87
  +++ Build.pm  21 May 2002 16:49:53 -  1.88
  @@ -1066,13 +1066,6 @@
 push @inc, $_ if -d $_;
 }
   
  -my $ssl_dir = "$src/../ssl/include";
  -unless (-d $ssl_dir) {
  -my $build = $self->build_config;
  -$ssl_dir = join '/', $self->{MP_SSL_BASE} || '', 'include';
  -}
  -push @inc, $ssl_dir if -d $ssl_dir;
  -
   return \@inc;
   }
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-20 Thread dougm

dougm   02/05/20 15:27:30

  Modified:lib/Apache Build.pm
  Log:
  use Apache::TestConfig::which instead of duplicating
  
  Revision  ChangesPath
  1.85  +2 -7  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- Build.pm  19 May 2002 19:46:08 -  1.84
  +++ Build.pm  20 May 2002 22:27:30 -  1.85
  @@ -13,6 +13,7 @@
   use ModPerl::Code ();
   use ModPerl::BuildOptions ();
   use Apache::TestTrace;
  +use Apache::TestConfig ();
   
   use constant REQUIRE_ITHREADS => grep { $^O eq $_ } qw(MSWin32);
   use constant HAS_ITHREADS =>
  @@ -96,7 +97,7 @@
   #these extra tries are for things built outside of mod_perl
   #e.g. libapreq
   push @trys,
  -which('apxs'),
  +Apache::TestConfig::which('apxs'),
   '/usr/local/apache/bin/apxs';
   }
   
  @@ -133,12 +134,6 @@
   my $cflags = __PACKAGE__->apxs('-q' => 'CFLAGS');
   $cflags =~ s/\"/\\\"/g;
   $cflags;
  -}
  -
  -sub which {
  -foreach (map { File::Spec->catfile($_, $_[0]) } File::Spec->path) {
  - return $_ if -x;
  -}
   }
   
   #--- Perl Config stuff ---
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-19 Thread dougm

dougm   02/05/19 12:46:08

  Modified:.Makefile.PL
   lib/Apache Build.pm
  Log:
  add some more validation of MP_AP_PREFIX
  
  Revision  ChangesPath
  1.80  +5 -1  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- Makefile.PL   19 May 2002 19:08:11 -  1.79
  +++ Makefile.PL   19 May 2002 19:46:08 -  1.80
  @@ -124,7 +124,11 @@
   if ($build->{MP_APXS}) {
   debug "Using APXS => $build->{MP_APXS}";
   }
  -elsif ($build->{MP_AP_PREFIX} and -e $build->apxs(-q => 'INCLUDEDIR')) {
  +elsif ($build->{MP_AP_PREFIX}) {
  +if (my $reason = $build->ap_prefix_invalid) {
  +error "invalid MP_AP_PREFIX: $reason";
  +exit 1;
  +}
   debug "Using Apache prefix => $build->{MP_AP_PREFIX}";
   }
   else {
  
  
  
  1.84  +22 -0 modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- Build.pm  14 May 2002 18:22:05 -  1.83
  +++ Build.pm  19 May 2002 19:46:08 -  1.84
  @@ -49,6 +49,28 @@
   PREFIX => '',
   );
   
  +sub ap_prefix_invalid {
  +my $self = shift;
  +
  +my $prefix = $self->{MP_AP_PREFIX};
  +
  +unless (-d $prefix) {
  +return "$prefix: No such file or directory";
  +}
  +
  +my $include_dir = $self->apxs(-q => 'INCLUDEDIR');
  +
  +unless (-e $include_dir) {
  +return "include/ directory not found in $prefix";
  +}
  +
  +if (-e "$prefix/CHANGES") {
  +return "$prefix is a build directory (need an install directory)";
  +}
  +
  +return '';
  +}
  +
   sub apxs {
   my $self = shift;
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-12 Thread dougm

dougm   02/05/12 14:02:15

  Modified:lib/Apache Build.pm
  Log:
  use proper debug flags for win32/msvc
  
  Revision  ChangesPath
  1.82  +6 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- Build.pm  12 May 2002 19:09:54 -  1.81
  +++ Build.pm  12 May 2002 21:02:15 -  1.82
  @@ -19,6 +19,8 @@
   $Config{useithreads} && ($Config{useithreads} eq 'define');
   
   use constant WIN32 => $^O eq 'MSWin32';
  +use constant MSVC  => WIN32() && ($Config{cc} eq 'cl');
  +
   use constant IS_MOD_PERL_BUILD => grep { -e "$_/lib/mod_perl.pm" } qw(. ..);
   
   our $VERSION = '0.01';
  @@ -180,7 +182,10 @@
   
   if ($self->{MP_DEBUG}) {
   $self->{MP_TRACE} = 1;
  -$ccopts .= " -g -DMP_DEBUG";
  +my $win32_flags = MSVC  ? '-Od -MD -Zi' : '';
  +my $debug_flags = WIN32 ? $win32_flags : '-g';
  +$ccopts .= " $debug_flags" unless $Config{optimize} =~ /$debug_flags/;
  +$ccopts .= ' -DMP_DEBUG';
   }
   
   if ($self->{MP_CCOPTS}) {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-05-12 Thread dougm

dougm   02/05/12 12:09:54

  Modified:.Makefile.PL
   lib/Apache Build.pm
  Log:
  s/Apache::Build::is_win32/Apache::Build::WIN32/g
  
  Revision  ChangesPath
  1.77  +3 -3  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- Makefile.PL   9 Apr 2002 01:42:42 -   1.76
  +++ Makefile.PL   12 May 2002 19:09:54 -  1.77
  @@ -53,7 +53,7 @@
   #Stop.
   #NMAKE : fatal error U1077: 'cd' : return code '0x2'
   #Stop.
  -my @remote_makefile_dirs = Apache::Build::is_win32() ? () :
  +my @remote_makefile_dirs = Apache::Build::WIN32() ? () :
  qw(docs/api/mod_perl-2.0);
   
   configure();
  @@ -105,7 +105,7 @@
   }
   }
   
  -if (Apache::Build::is_win32()) {
  +if (Apache::Build::WIN32()) {
   #Makefile.PL's in WrapXS/ just need to pass the -e mod_perl.lib test
   #the real mod_perl.lib will be in place when WrapXS/ dll's are
   #actually linked
  @@ -271,7 +271,7 @@
   }
   
   sub system_sanity_check {
  -return if $build->is_win32;
  +return if Apache::Build::WIN32;
   
   my $ccflags = $build->perl_config('ccflags');
   for (split /\s+/, $ccflags) {
  
  
  
  1.81  +3 -3  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- Build.pm  11 May 2002 18:55:41 -  1.80
  +++ Build.pm  12 May 2002 19:09:54 -  1.81
  @@ -18,7 +18,7 @@
   use constant HAS_ITHREADS =>
   $Config{useithreads} && ($Config{useithreads} eq 'define');
   
  -use constant is_win32 => $^O eq 'MSWin32';
  +use constant WIN32 => $^O eq 'MSWin32';
   use constant IS_MOD_PERL_BUILD => grep { -e "$_/lib/mod_perl.pm" } qw(. ..);
   
   our $VERSION = '0.01';
  @@ -551,7 +551,7 @@
   sub mmn_eq {
   my($class, $dir) = @_;
   
  -return 1 if is_win32; #just assume, till Apache::Build works under win32
  +return 1 if WIN32; #just assume, till Apache::Build works under win32
   
   my $instsrc;
   {
  @@ -977,7 +977,7 @@
   sub includes {
   my $self = shift;
   my $src  = $self->dir;
  -my $os = is_win32 ? 'win32' : 'unix';
  +my $os = WIN32 ? 'win32' : 'unix';
   my @inc = $self->file_path("src/modules/perl", "xs");
   
   push @inc, $self->mp_include_dir;
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-04-06 Thread dougm

dougm   02/04/06 18:56:52

  Modified:.Makefile.PL
   lib/Apache Build.pm
  Log:
  more hints if includes cannot be found
  
  Revision  ChangesPath
  1.72  +5 -1  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- Makefile.PL   7 Apr 2002 02:45:32 -   1.71
  +++ Makefile.PL   7 Apr 2002 02:56:52 -   1.72
  @@ -137,7 +137,11 @@
   my $httpd_version = $build->httpd_version;
   unless ($httpd_version) {
   error 'Unable to determine server version, aborting.';
  -unless ($build->{MP_APXS} || $build->{MP_AP_PREFIX}) {
  +if ($build->{MP_APXS} || $build->{MP_AP_PREFIX}) {
  +my $what = $build->{MP_APXS} ? 'MP_APXS' : 'MP_AP_PREFIX';
  +error "Invalid $what specified?";
  +}
  +else {
   error 'Please specify MP_APXS or MP_AP_PREFIX.';
   }
   exit(1);
  
  
  
  1.79  +6 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- Build.pm  6 Apr 2002 16:24:51 -   1.78
  +++ Build.pm  7 Apr 2002 02:56:52 -   1.79
  @@ -636,7 +636,12 @@
   return $v;
   }
   
  -open my $fh, "$dir/ap_release.h" or return undef;
  +my $header = "$dir/ap_release.h";
  +open my $fh, $header or do {
  +error "Unable to open $header: $!";
  +return undef;
  +};
  +
   my $version;
   
   while(<$fh>) {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-04-06 Thread dougm

dougm   02/04/06 06:56:46

  Modified:lib/Apache Build.pm
  Log:
  changing default dso name from libmodperl.so to mod_perl.so
  
  Revision  ChangesPath
  1.77  +2 -2  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- Build.pm  6 Apr 2002 02:25:10 -   1.76
  +++ Build.pm  6 Apr 2002 14:56:46 -   1.77
  @@ -362,7 +362,7 @@
   
   my $self = bless {
   cwd => Cwd::fastcwd(),
  -MP_LIBNAME => 'libmodperl',
  +MP_LIBNAME => 'mod_perl',
   @_,
   }, $class;
   
  @@ -810,7 +810,7 @@
   sub modperl_libs_MSWin32 {
   my $self = shift;
   #XXX: install/use libmodperl.lib for 3rd party xs modules
  -"$self->{cwd}/src/modules/perl/libmodperl.lib";
  +"$self->{cwd}/src/modules/perl/$self->{MP_LIBNAME}.lib";
   }
   
   sub modperl_libs {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-04-05 Thread dougm

dougm   02/04/05 18:25:10

  Modified:lib/Apache Build.pm
  Log:
  dont delete Apache2.pm anymore
  
  Revision  ChangesPath
  1.76  +0 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- Build.pm  5 Dec 2001 02:22:24 -   1.75
  +++ Build.pm  6 Apr 2002 02:25:10 -   1.76
  @@ -377,7 +377,6 @@
   'build_config' => 'lib/Apache/BuildConfig.pm',
   'ldopts' => 'src/modules/perl/ldopts',
   'makefile' => 'src/modules/perl/Makefile',
  -'apache2_pm' => 'lib/Apache2.pm',
   );
   
   sub clean_files {
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-06-27 Thread dougm

dougm   01/06/27 19:59:18

  Modified:.Makefile.PL
   lib/Apache Build.pm
  Log:
  give better apxs failure messages, die if server version cannot be found/parsed
  
  Revision  ChangesPath
  1.35  +4 -6  modperl-2.0/Makefile.PL
  
  Index: Makefile.PL
  ===
  RCS file: /home/cvs/modperl-2.0/Makefile.PL,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- Makefile.PL   2001/04/20 17:42:57 1.34
  +++ Makefile.PL   2001/06/28 02:59:14 1.35
  @@ -2,13 +2,13 @@
   use strict;
   use warnings FATAL => 'all';
   
  -use lib qw(lib);
  +use lib qw(lib Apache-Test/lib);
   use Config;
   use Apache::Build ();
   use ModPerl::Code ();
   use ModPerl::MM ();
   
  -use lib qw(Apache-Test/lib);
  +use Apache::TestTrace;
   use Apache::TestMM qw(test);
   
   our $VERSION;
  @@ -53,10 +53,8 @@
   
   my $httpd_version = $build->httpd_version;
   unless ($httpd_version) {
  -$build->phat_warn(< $^O eq 'MSWin32';
   use constant IS_MOD_PERL_BUILD => grep { -e "$_/lib/mod_perl.pm" } qw(. ..);
  @@ -58,7 +59,18 @@
   return '' unless $apxs and -x $apxs;
   
   my $val = qx($apxs @_ 2>/dev/null);
  -warn "ERROR: `$apxs query @_' failed\n" unless $val;
  +
  +unless ($val) {
  +error "'$apxs @_' failed:";
  +
  +if (my $error = qx($apxs @_ 2>&1)) {
  +error $error;
  +}
  +else {
  +error 'unknown error';
  +}
  +}
  +
   $val;
   }
   
  @@ -459,7 +471,7 @@
   return $self->{ap_includedir}
 if $self->{ap_includedir} and -d $self->{ap_includedir};
   
  -$d ||= $self->apxs('-q' => 'INCLUDEDIR') || $self->dir;
  +return unless $d ||= $self->apxs('-q' => 'INCLUDEDIR') || $self->dir;
   
   if (-e "$d/include/ap_release.h") {
   return $self->{ap_includedir} = "$d/include";
  @@ -551,7 +563,8 @@
   
   sub httpd_version {
   my($self, $dir) = @_;
  -$dir = $self->ap_includedir($dir);
  +
  +return unless $dir = $self->ap_includedir($dir);
   
   if (my $v = $self->httpd_version_cache($dir)) {
   return $v;
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-05-13 Thread dougm

dougm   01/05/13 19:41:50

  Modified:lib/Apache Build.pm
  Log:
  add new -Dthinger so we compile when apache is built with maintainer mode
  
  Revision  ChangesPath
  1.44  +1 -0  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- Build.pm  2001/04/27 21:12:25 1.43
  +++ Build.pm  2001/05/14 02:41:49 1.44
  @@ -123,6 +123,7 @@
   if ($self->perl_config('gccversion')) {
   #same as --with-maintainter-mode
   $ccopts .= " $Wall -DAP_DEBUG";
  +$ccopts .= " -DAP_HAVE_DESIGNATED_INITIALIZER";
   }
   }