Subject: Re: Pbms building ap2-php4 and ap2-perl
To: tech-pkg@netbsd.org, Johnny Lam <jlam@jgrind.org>
From: Eric Gillespie <epg@pretzelnet.org>
List: tech-pkg
Date: 05/30/2003 06:09:53
Eric Gillespie <epg@pretzelnet.org> writes:
> How does this patch look? Eventually, of course, it can be made
> to look for apr-config just as it does for apxs, then the patch
> can be submitted back the php folks. But this should solve the
> problem for pkgsrc.
And now here is a patch for ap2-perl, for which the same
description applies.
$NetBSD$
--- lib/Apache/Build.pm.orig Fri Jan 10 23:16:12 2003
+++ lib/Apache/Build.pm
@@ -771,6 +771,14 @@ my %wanted_apr_config = map { $_, 1} qw(
HAS_INLINE HAS_FORK
);
+sub get_apr_includes {
+ $_ = `apr-config --includes`;
+ chomp;
+ s/^\s*-I//;
+ s/\s*$//;
+ return $_;
+}
+
sub get_apr_config {
my $self = shift;
@@ -779,7 +787,7 @@ sub get_apr_config {
my $dir = $self->ap_includedir;
my $header;
- for my $d ($dir, "$dir/../srclib/apr/include") {
+ for my $d ($dir, "$dir/../srclib/apr/include", get_apr_includes()) {
$header = "$d/apr.h";
last if -e $header;
}
@@ -1150,6 +1158,8 @@ sub includes {
my @inc = $self->file_path("src/modules/perl", "xs");
push @inc, $self->mp_include_dir;
+
+ push @inc, get_apr_includes();
unless ($self->ap_prefix_is_source_tree) {
my $ainc = $self->apxs('-q' => 'INCLUDEDIR');