httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cvs commit: httpd-apreq/c Makefile.PL
Date Sun, 07 Jan 2001 03:31:36 GMT
jimw        01/01/06 19:31:36

  Modified:    .        Changes Makefile.PL
               Cookie   Makefile.PL
               Request  Makefile.PL Request.xs
               c        Makefile.PL
  Log:
  fix win32 build (requires mod_perl later than 1.24_01)
  Submitted by:	Randy Kobes <randy@theoryx5.uwinnipeg.ca>
  
  Revision  Changes    Path
  1.27      +3 -0      httpd-apreq/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/httpd-apreq/Changes,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Changes	2001/01/05 00:05:22	1.26
  +++ Changes	2001/01/07 03:31:35	1.27
  @@ -4,6 +4,9 @@
   
   =item 0.32 - ?
   
  +fix win32 build (requires mod_perl later than 1.24_01)
  +[Randy Kobes <randy@theoryx5.uwinnipeg.ca>]
  +
   Handle cookies with names but no value [David Welton <davidw@prosa.it>]
   
   AIX compile fixes [Jens-Uwe Mager <jum@helios.de>]
  
  
  
  1.9       +36 -1     httpd-apreq/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/httpd-apreq/Makefile.PL,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Makefile.PL	2000/12/19 01:41:30	1.8
  +++ Makefile.PL	2001/01/07 03:31:35	1.9
  @@ -4,14 +4,49 @@
   
   my $myVERSION = MM->parse_version('Request/Request.pm');
   $myVERSION =~ s/(\d\d)(\d\d)$/$1_$2/;
  -
  +my $Is_Win32 = ($^O eq "MSWin32") || $ENV{WIN32_TEST}; 
  +my $lib;
   check_compat();
   
  +if ($Is_Win32) {
  +  use mod_perl;
  +  unless ($mod_perl::VERSION >= 1.2402) {
  +    die "Please upgrade mod_perl to 1.24_02 or greater";
  +  }
  +  use Cwd;
  +  my $cwd = cwd;
  +  $cwd =~ s !\\!/!g;
  +  my $root = "$cwd/blib/arch/auto";
  +  use File::Path qw(mkpath);
  +  mkpath $root, 1, 0755 unless -d $root;
  +  mkpath "$root/libapreq", 1, 0755 unless -d "$root/libapreq";
  +  $lib = "$root/libapreq/libapreq.lib";
  +  open (FILE, ">>$lib") 
  +    or die "Cannot touch $lib: $!\n";
  +  close FILE;  
  +  use Apache::MyConfig;
  +  $ENV{APREQ_LIB} = "$root/libapreq";
  +  $ENV{AP_INC} = $Apache::MyConfig::Setup{APACHE_INC};
  +  $ENV{MP_INC} = $Apache::MyConfig::Setup{MODPERL_INC};
  +  $ENV{AP_LIB} = $Apache::MyConfig::Setup{APACHE_LIB};
  +  $ENV{MP_LIB} = $Apache::MyConfig::Setup{MODPERL_LIB};
  +  unless (-d $ENV{MP_INC} and -f "$ENV{MP_LIB}/mod_perl.so") {
  +    die "Please build mod_perl first";
  +  }
  +  unless (-d $ENV{AP_INC} and -f "$ENV{AP_LIB}/ApacheCore.lib") {
  +    die "Please build Apache first";
  +  }
  +}
  +
   WriteMakefile(
   	      'NAME'	 => 'libapreq',
   	      'VERSION' => $myVERSION,
   	      'DIR' => [qw(c Request Cookie)], 
   	      );
  +
  +if ($Is_Win32 and -e $lib) {
  +  unlink $lib or die "Cannot unlink $lib: $!\n";
  +}
   
   sub check_compat {
       eval { require Apache::Request };
  
  
  
  1.3       +9 -10     httpd-apreq/Cookie/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/httpd-apreq/Cookie/Makefile.PL,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.PL	2001/01/03 03:58:53	1.2
  +++ Makefile.PL	2001/01/07 03:31:35	1.3
  @@ -11,8 +11,8 @@
   	       );
   
   if ($Is_Win32) {
  -    win32_setup();
  -    xsubpp("Cookie");
  +    win32_setup(@mm_args);
  +#    xsubpp("Cookie");
   }
   else {
       require Apache::src;
  @@ -36,12 +36,11 @@
   }
   
   sub win32_setup {
  -    *MY::dynamic = sub {
  -	my $self = shift;
  -	my $string = $self->MM::dynamic;
  -	$string =~ s/(Makefile\s+).*/$1/g;
  -	$string;
  -    };
  -    push @mm_args, SKIP => [qw(dynamic_bs dynamic_lib)];
  -    WriteMakefile(@mm_args);
  +  my @mm_args = @_;
  +  WriteMakefile(
  +		@mm_args,
  +		'INC' => qq{ -I../c -I"$ENV{AP_INC}" -I"$ENV{MP_INC}" },
  +		'LIBS' => qq{ -L"$ENV{MP_LIB}" -lmod_perl -L"$ENV{APREQ_LIB}" -llibapreq -L"$ENV{AP_LIB}"
-lApacheCore },
  +		'OBJECT' => 'Cookie.o',
  +	       );
   }
  
  
  
  1.3       +9 -10     httpd-apreq/Request/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/httpd-apreq/Request/Makefile.PL,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.PL	2001/01/03 03:58:54	1.2
  +++ Makefile.PL	2001/01/07 03:31:35	1.3
  @@ -11,8 +11,8 @@
   	       );
   
   if ($Is_Win32) {
  -    win32_setup();
  -    xsubpp("Request");
  +    win32_setup(@mm_args);
  +#    xsubpp("Request");
   }
   else {
       require Apache::src;
  @@ -36,12 +36,11 @@
   }
   
   sub win32_setup {
  -    *MY::dynamic = sub {
  -	my $self = shift;
  -	my $string = $self->MM::dynamic;
  -	$string =~ s/(Makefile\s+).*/$1/g;
  -	$string;
  -    };
  -    push @mm_args, SKIP => [qw(dynamic_bs dynamic_lib)];
  -    WriteMakefile(@mm_args);
  +  my @mm_args = @_;
  +  WriteMakefile(
  +		@mm_args,
  +		'INC' => qq{ -I../c -I"$ENV{AP_INC}" -I"$ENV{MP_INC}" },
  +		'LIBS' => qq{ -L"$ENV{MP_LIB}" -lmod_perl -L"$ENV{APREQ_LIB}" -llibapreq -L"$ENV{AP_LIB}"
-lApacheCore },
  +                'OBJECT' => 'Request.o',
  +	       );
   }
  
  
  
  1.6       +2 -2      httpd-apreq/Request/Request.xs
  
  Index: Request.xs
  ===================================================================
  RCS file: /home/cvs/httpd-apreq/Request/Request.xs,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Request.xs	2001/01/03 03:58:54	1.5
  +++ Request.xs	2001/01/07 03:31:36	1.6
  @@ -213,14 +213,14 @@
       if (ST(0) != &sv_undef) {
   	IO *io = GvIOn((GV*)SvRV(ST(0))); 
   	int fd = PerlIO_fileno(IoIFP(io));
  -	FILE *fp;
  +	PerlIO *fp;
   
   	fd = PerlLIO_dup(fd); 
   	if (!(fp = PerlIO_fdopen(fd, "r"))) { 
   	    PerlLIO_close(fd);
   	    croak("fdopen failed!");
   	} 
  -	fseek(fp, 0, 0); 
  +	PerlIO_seek(fp, 0, 0); 
   	IoIFP(GvIOn((GV*)SvRV(ST(0)))) = fp;
   	ap_register_cleanup(upload->req->r->pool, (void*)SvRV(ST(0)), 
   			    apreq_close_handle, ap_null_cleanup);    
  
  
  
  1.5       +8 -3      httpd-apreq/c/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/httpd-apreq/c/Makefile.PL,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile.PL	2000/03/30 06:22:28	1.4
  +++ Makefile.PL	2001/01/07 03:31:36	1.5
  @@ -61,9 +61,14 @@
   } 
   
   sub win32_setup {
  -    no_MY();
  -    push @mm_args, SKIP => [qw(dynamic_bs dynamic_lib)];
  -    WriteMakefile(@mm_args);
  +  my $myVERSION = MM->parse_version('../Request/Request.pm');
  +  $myVERSION =~ s/(\d\d)(\d\d)$/$1_$2/;
  +  my @objs = qw(apache_request.o apache_cookie.o apache_multipart_buffer.o);
  +  WriteMakefile('NAME' => 'libapreq',
  +		'VERSION' => $myVERSION,
  +		'OBJECT' => "@objs",
  +		'INC'  => qq{ -I"$ENV{AP_INC}" -I"$ENV{MP_INC}" },
  +  	       ); 
   }
   
   sub no_MY {
  
  
  

Mime
View raw message