On Sat, 8 Sep 2001, Doug MacEachern wrote:
> On Sat, 8 Sep 2001, Stas Bekman wrote:
>
> > I've tried to use Apache-Test outside of modperl, but the server won't
> > find libmodperl.so, since it wasn't installed on my system on 'make
> > install'. Is this on purpose? I see ModPerl::MM::install is supposed to do
> > that, but it doesn't end up in Makefile. Or do I miss something?
>
> ModPerl::MM::install does not try to install libmodperl.so
> the *.so references in there are for the *.xs modules.
> patch welcome of course.
should we change the default log level to notice in Apache::TestTrace?
Using warning for things like: "installing foo" doesn't seem right.
not sure how clean is this patch, but it installs the right lib, based on
the value of MODPERL_LIB. I think this will work for the static build as
well.
Index: lib/Apache/Build.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
retrieving revision 1.46
diff -u -r1.46 Build.pm
--- lib/Apache/Build.pm 2001/08/26 03:38:27 1.46
+++ lib/Apache/Build.pm 2001/09/09 16:44:41
@@ -311,6 +311,8 @@
ModPerl::BuildOptions->init($self) if delete $self->{init};
+ $self->modules_dir;
+
$self;
}
@@ -322,6 +324,11 @@
'makefile' => 'src/modules/perl/Makefile',
'apache2_pm' => 'lib/Apache2.pm',
);
+
+sub modules_dir{
+ my($self, $name, $override) = @_;
+ $self->{libexecdir} = $self->apxs('-q' => 'libexecdir');
+}
sub clean_files {
my $self = shift;
Index: lib/ModPerl/MM.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/MM.pm,v
retrieving revision 1.10
diff -u -r1.10 MM.pm
--- lib/ModPerl/MM.pm 2001/04/11 22:46:57 1.10
+++ lib/ModPerl/MM.pm 2001/09/09 16:44:41
@@ -6,6 +6,10 @@
use ExtUtils::Install ();
use Cwd ();
use Apache::Build ();
+use File::Basename ();
+use File::Spec ();
+use File::Copy ();
+use Apache::TestTrace;
#to override MakeMaker MOD_INSTALL macro
sub mod_install {
@@ -34,6 +38,23 @@
delete $hash->{$k};
$k =~ s:/Apache2$::;
$hash->{$k} = $v;
+ }
+ }
+
+ # try to install libmodperl.{so|a}
+ my $libmodperl = build_config('MODPERL_LIB') || '';
+ if ($libmodperl) {
+ my $libexec_makefile = build_config('file_makefile') || '';
+ my $libexec_src_dir = File::Basename::dirname($libexec_makefile);
+ my $libexec_path = File::Spec->catfile($libexec_src_dir, $libmodperl);
+ my $libexec_dir = build_config('libexecdir') || '';
+ my $target_path = File::Spec->catfile($libexec_dir, $libmodperl);
+ if (-d $libexec_dir and -e $libexec_path) {
+ warning "Installing $target_path";
+ File::Copy::syscopy($libexec_path, $target_path);
+ chmod 0755, $target_path;
+ } else {
+ error "Cannot find the modperl library: $libmodperl";
}
}
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]