cvs commit: modperl-2.0/lib/ModPerl MM.pm
stas2003/02/03 17:53:36 Modified:lib/ModPerl MM.pm Log: need -MApache2 in 3rd party modules to run MOD_INSTALL macro Revision ChangesPath 1.22 +3 -1 modperl-2.0/lib/ModPerl/MM.pm Index: MM.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MM.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- MM.pm 23 Jun 2002 21:46:54 - 1.21 +++ MM.pm 4 Feb 2003 01:53:36 - 1.22 @@ -11,7 +11,9 @@ #to override MakeMaker MOD_INSTALL macro sub mod_install { -q{$(PERL) -I$(INST_LIB) -I$(PERL_LIB) -MModPerl::MM \\}."\n" . +# XXX: adding -MApache2 here so 3rd party modules could use this macro, +# may be should have different macros for core build and modules build +q{$(PERL) -I$(INST_LIB) -I$(PERL_LIB) -MApache2 -MModPerl::MM \\}."\n" . q{-e "ModPerl::MM::install({@ARGV},'$(VERBINST)',0,'$(UNINST)');"}."\n"; }
cvs commit: modperl-2.0/lib/ModPerl MM.pm
dougm 2002/06/23 14:46:54 Modified:lib/ModPerl MM.pm Log: dont build modules that require threads if unless APR_HAS_THREADS is 1 Revision ChangesPath 1.21 +6 -0 modperl-2.0/lib/ModPerl/MM.pm Index: MM.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MM.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- MM.pm 21 May 2002 17:42:39 - 1.20 +++ MM.pm 23 Jun 2002 21:46:54 - 1.21 @@ -175,6 +175,12 @@ return ''; #XXX: APR::PerlIO does not link on win32 } +my $apr_config = build_config()->get_apr_config(); + +if ($path =~ m/(Thread|Global)Mutex/) { +return unless $apr_config->{HAS_THREADS}; +} + return '' if $path =~ m/\.(pl|cvsignore)$/; return '' if $path =~ m:\bCVS/:; return '' if $path =~ m/~$/;
cvs commit: modperl-2.0/lib/ModPerl MM.pm
dougm 02/05/21 10:42:39 Modified:lib/Apache Build.pm lib/ModPerl MM.pm Log: get MP_STATIC_EXTS=1 working again Revision ChangesPath 1.90 +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.89 retrieving revision 1.90 diff -u -r1.89 -r1.90 --- Build.pm 21 May 2002 16:59:02 - 1.89 +++ Build.pm 21 May 2002 17:42:39 - 1.90 @@ -744,7 +744,7 @@ '$(MODPERL_PRIVLIBEXP)/ExtUtils/xsubpp', '-typemap', '$(MODPERL_PRIVLIBEXP)/ExtUtils/typemap'; -my $typemap = $self->file_path('src/modules/perl/typemap'); +my $typemap = $self->file_path('lib/typemap'); if (-e $typemap) { $xsubpp .= join ' ', ' -typemap', $typemap; @@ -764,8 +764,11 @@ my @xs_targ; while (my($name, $xs) = each %{ $self->{XS} }) { -#Foo/Bar.xs => Bar.c -(my $c = $xs) =~ s:.*/(\w+)\.xs$:$1.c:; +#Foo/Bar.xs => Foo_Bar.c +(my $c = $xs) =~ s:.*?WrapXS/::; +$c =~ s:/:_:g; +$c =~ s:\.xs$:.c:; + push @files, $c; push @xs_targ, <
cvs commit: modperl-2.0/lib/ModPerl MM.pm
dougm 02/05/14 11:22:06 Modified:lib/Apache Build.pm lib/ModPerl MM.pm Log: get MP_DEBUG=1 working on win32 Revision ChangesPath 1.83 +52 -9 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.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- Build.pm 12 May 2002 21:02:15 - 1.82 +++ Build.pm 14 May 2002 18:22:05 - 1.83 @@ -142,6 +142,11 @@ sub ldopts { my($self) = @_; +my $config = tied %Config; +my $ldflags = $config->{ldflags}; + +$config->{ldflags} = '' if WIN32; #same as lddlflags + my $ldopts = ExtUtils::Embed::ldopts(); chomp $ldopts; @@ -157,6 +162,8 @@ $ldopts .= $self->gtop_ldopts; } +$config->{ldflags} = $ldflags; #reset + $ldopts; } @@ -200,13 +207,23 @@ } sub perl_ccopts { -my $cflags = shift->strip_lfs(" $Config{ccflags} "); +my $self = shift; + +my $cflags = $self->strip_lfs(" $Config{ccflags} "); my $fixup = \&{"ccopts_$^O"}; if (defined &$fixup) { $fixup->(\$cflags); } +if ($self->{MP_DEBUG}) { +my $optim = $Config{optimize}; + +unless ($optim =~ /-DDEBUGGING/) { +$cflags =~ s/$optim//; + } +} + $cflags; } @@ -226,10 +243,41 @@ $cflags; } +sub perl_config_optimize { +my($self, $val) = @_; + +$val ||= $Config{optimize}; + +if ($self->{MP_DEBUG}) { +return ' ' unless $val =~ /-DDEBUGGING/; +} + +$val; +} + +sub perl_config_lddlflags { +my($self, $val) = @_; + +if ($self->{MP_DEBUG}) { +if (MSVC) { +$val =~ s/-release/-debug/; +} +} + +$val; +} + sub perl_config { my($self, $key) = @_; -return $Config{$key} ? $Config{$key} : ''; +my $val = $Config{$key} || ''; + +my $method = \&{"perl_config_$key"}; +if (defined &$method) { +return $method->($self, $val); +} + +return $val; } sub find_in_inc { @@ -731,7 +779,7 @@ my $mm_replace = join '|', keys %perl_config_pm_alias; my @perl_config_pm = - (qw(cc cpprun rm ranlib lib_ext obj_ext cccdlflags lddlflags), + (qw(cc cpprun rm ranlib lib_ext obj_ext cccdlflags lddlflags optimize), values %perl_config_pm_alias); sub mm_replace { @@ -745,11 +793,6 @@ for (@perl_config_pm) { print $fh $self->canon_make_attr($_, $self->perl_config($_)); } -unless ($self->{MP_DEBUG}) { -for (qw(optimize)) { -print $fh $self->canon_make_attr($_, $self->perl_config($_)); -} -} require ExtUtils::MakeMaker; my $mm = bless {}, 'MM'; @@ -929,7 +972,7 @@ clean: $(MODPERL_RM_F) *.a *.so *.xsc \ $(MODPERL_LIBNAME).exp $(MODPERL_LIBNAME).lib \ - *$(MODPERL_OBJ_EXT) *.lo *.i *.s \ + *$(MODPERL_OBJ_EXT) *.lo *.i *.s *.pdb \ $(MODPERL_CLEAN_FILES) \ $(MODPERL_XS_CLEAN_FILES) 1.19 +5 -3 modperl-2.0/lib/ModPerl/MM.pm Index: MM.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MM.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- MM.pm 12 May 2002 22:42:19 - 1.18 +++ MM.pm 14 May 2002 18:22:06 - 1.19 @@ -71,9 +71,11 @@ my $ccflags = $build->perl_ccopts . $build->ap_ccopts; my @opts = ( -INC => $inc, -CCFLAGS => $ccflags, -LIBS=> $libs, +INC => $inc, +CCFLAGS => $ccflags, +OPTIMIZE => $build->perl_config('optimize'), +LDDLFLAGS => $build->perl_config('lddlflags'), +LIBS => $libs, dynamic_lib => { OTHERLDFLAGS => $build->otherldflags }, );
cvs commit: modperl-2.0/lib/ModPerl MM.pm
dougm 02/05/12 15:42:19 Modified:lib/ModPerl MM.pm Log: APR::PerlIO does not link on win32; disable for the moment Revision ChangesPath 1.18 +4 -0 modperl-2.0/lib/ModPerl/MM.pm Index: MM.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MM.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- MM.pm 7 Apr 2002 22:47:31 - 1.17 +++ MM.pm 12 May 2002 22:42:19 - 1.18 @@ -168,6 +168,10 @@ sub ModPerl::MM::MY::libscan { my($self, $path) = @_; +if (Apache::Build::WIN32() and $path eq 'PerlIO') { +return ''; #XXX: APR::PerlIO does not link on win32 +} + return '' if $path =~ m/\.(pl|cvsignore)$/; return '' if $path =~ m:\bCVS/:; return '' if $path =~ m/~$/;
cvs commit: modperl-2.0/lib/ModPerl MM.pm
dougm 02/04/07 15:47:31 Modified:.Changes lib/ModPerl MM.pm Log: get rid of some "subroutine redefined" warnings in ModPerl::MM that show up with newer bleedperls. Revision ChangesPath 1.5 +3 -0 modperl-2.0/Changes Index: Changes === RCS file: /home/cvs/modperl-2.0/Changes,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Changes 7 Apr 2002 21:35:02 - 1.4 +++ Changes 7 Apr 2002 22:47:31 - 1.5 @@ -1,5 +1,8 @@ =item 1.99_02-dev +get rid of some "subroutine redefined" warnings in ModPerl::MM that +show up with newer bleedperls. [dougm] + a few fixes for Apache::compat [Dave Rolsky <[EMAIL PROTECTED]>] =item 1.99_01 - April 6, 2002 1.17 +3 -1 modperl-2.0/lib/ModPerl/MM.pm Index: MM.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MM.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- MM.pm 6 Apr 2002 16:11:56 - 1.16 +++ MM.pm 7 Apr 2002 22:47:31 - 1.17 @@ -50,7 +50,9 @@ my $stash = \%{__PACKAGE__ . '::MY::'}; for my $sym (keys %$stash) { next unless *{$stash->{$sym}}{CODE}; -*{"MY::$sym"} = *{$stash->{$sym}}{CODE}; +my $name = "MY::$sym"; +undef &$name if defined &$name; +*$name = *{$stash->{$sym}}{CODE}; } }
cvs commit: modperl-2.0/lib/ModPerl MM.pm
dougm 02/04/06 08:11:56 Modified:.Makefile.PL lib/ModPerl MM.pm Log: install xs/typemap to Apache2/typemap Revision ChangesPath 1.66 +4 -0 modperl-2.0/Makefile.PL Index: Makefile.PL === RCS file: /home/cvs/modperl-2.0/Makefile.PL,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- Makefile.PL 6 Apr 2002 15:44:09 - 1.65 +++ Makefile.PL 6 Apr 2002 16:11:56 - 1.66 @@ -57,6 +57,10 @@ configure(); +local %ModPerl::MM::PM = ( +'xs/typemap' => 'blib/lib/Apache2/typemap', +); + ModPerl::MM::WriteMakefile( NAME => 'mod_perl', VERSION => $VERSION, 1.16 +15 -3 modperl-2.0/lib/ModPerl/MM.pm Index: MM.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MM.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- MM.pm 6 Apr 2002 06:41:54 - 1.15 +++ MM.pm 6 Apr 2002 16:11:56 - 1.16 @@ -7,6 +7,8 @@ use Cwd (); use Apache::Build (); +our %PM; #add files to installation + #to override MakeMaker MOD_INSTALL macro sub mod_install { q{$(PERL) -I$(INST_LIB) -I$(PERL_LIB) -MModPerl::MM \\}."\n" . @@ -130,20 +132,30 @@ my $self = shift; my $build = build_config(); +my $pm = $self->{PM}; + +while (my($k,$v) = each %PM) { +if (-e $k) { +$pm->{$k} = $v; +} +} #not everything in MakeMaker uses INST_LIB #so we have do fixup a few PMs to make sure *everything* #gets installed into Apache2/ if ($build->{MP_INST_APACHE2}) { -my $pm = $self->{PM}; - while (my($k, $v) = each %$pm) { #up one from the Apache2/ subdir #so it can be found for 'use Apache2 ()' next if $v =~ /Apache2\.pm$/; #move everything else to the Apache2/ subdir -$v =~ s,(blib/lib),$1/Apache2,; +#unless already specified with \$(INST_LIB) +#or already in Apache2/ +unless ($v =~ /Apache2/) { +$v =~ s,(blib/lib),$1/Apache2,; +} + $pm->{$k} = $v; } }
cvs commit: modperl-2.0/lib/ModPerl MM.pm
dougm 02/04/05 22:41:54 Modified:.Makefile.PL lib/ModPerl MM.pm Log: not everything in MakeMaker uses INST_LIB so we have do fixup a few PMs to make sure *everything* gets installed into Apache2/ Revision ChangesPath 1.63 +0 -9 modperl-2.0/Makefile.PL Index: Makefile.PL === RCS file: /home/cvs/modperl-2.0/Makefile.PL,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- Makefile.PL 6 Apr 2002 04:13:56 - 1.62 +++ Makefile.PL 6 Apr 2002 06:41:54 - 1.63 @@ -375,15 +375,6 @@ ''; } -sub MY::post_initialize { -my $self = shift; - -#up one from the Apache2/ subdir -#so it can be found for 'use Apache2 ()' -$self->{PM}->{'lib/Apache2.pm'} = "blib/lib/Apache2.pm"; -''; -} - sub MY::manifypods { my $self = shift; my $ver = $self->{VERSION} || ""; 1.15 +26 -0 modperl-2.0/lib/ModPerl/MM.pm Index: MM.pm === RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MM.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- MM.pm 22 Oct 2001 01:38:06 - 1.14 +++ MM.pm 6 Apr 2002 06:41:54 - 1.15 @@ -125,6 +125,32 @@ $self->MM::constants; } + +sub ModPerl::MM::MY::post_initialize { +my $self = shift; + +my $build = build_config(); + +#not everything in MakeMaker uses INST_LIB +#so we have do fixup a few PMs to make sure *everything* +#gets installed into Apache2/ +if ($build->{MP_INST_APACHE2}) { +my $pm = $self->{PM}; + +while (my($k, $v) = each %$pm) { +#up one from the Apache2/ subdir +#so it can be found for 'use Apache2 ()' +next if $v =~ /Apache2\.pm$/; + +#move everything else to the Apache2/ subdir +$v =~ s,(blib/lib),$1/Apache2,; +$pm->{$k} = $v; +} +} + +''; +} + sub ModPerl::MM::MY::libscan { my($self, $path) = @_;