]> Raphaƫl G. Git Repositories - ihttpd/blob - SOURCES/httpd-2.4.9-apxs.patch
Version 2.4.57
[ihttpd] / SOURCES / httpd-2.4.9-apxs.patch
1 --- httpd-2.4.43/support/apxs.in.apxs 2020-03-20 15:00:44.000000000 +0200
2 +++ httpd-2.4.43/support/apxs.in 2020-04-02 15:16:23.516349733 +0300
3 @@ -35,7 +35,18 @@
4
5 my %config_vars = ();
6
7 -my $installbuilddir = "@exp_installbuilddir@";
8 +# Awful hack to make apxs libdir-agnostic:
9 +my $pkg_config = "/usr/bin/pkg-config";
10 +if (! -x "$pkg_config") {
11 + error("$pkg_config not found!");
12 + exit(1);
13 +}
14 +
15 +my $libdir = `pkg-config --variable=libdir apr-1`;
16 +chomp $libdir;
17 +
18 +my $installbuilddir = $libdir . "/httpd/build";
19 +
20 get_config_vars($destdir . "$installbuilddir/config_vars.mk",\%config_vars);
21
22 # read the configuration variables once
23 @@ -285,7 +296,7 @@
24 $data =~ s|%NAME%|$name|sg;
25 $data =~ s|%TARGET%|$CFG_TARGET|sg;
26 $data =~ s|%PREFIX%|$prefix|sg;
27 - $data =~ s|%INSTALLBUILDDIR%|$installbuilddir|sg;
28 + $data =~ s|%LIBDIR%|$libdir|sg;
29
30 my ($mkf, $mods, $src) = ($data =~ m|^(.+)-=#=-\n(.+)-=#=-\n(.+)|s);
31
32 @@ -463,11 +474,11 @@
33 my $ldflags = "$CFG_LDFLAGS";
34 if ($opt_p == 1) {
35
36 - my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`;
37 + my $apr_libs=`$apr_config --cflags --ldflags --link-libtool`;
38 chomp($apr_libs);
39 my $apu_libs="";
40 if ($apr_major_version < 2) {
41 - $apu_libs=`$apu_config --ldflags --link-libtool --libs`;
42 + $apu_libs=`$apu_config --ldflags --link-libtool`;
43 chomp($apu_libs);
44 }
45
46 @@ -682,8 +693,8 @@
47
48 builddir=.
49 top_srcdir=%PREFIX%
50 -top_builddir=%PREFIX%
51 -include %INSTALLBUILDDIR%/special.mk
52 +top_builddir=%LIBDIR%/httpd
53 +include %LIBDIR%/httpd/build/special.mk
54
55 # the used tools
56 APACHECTL=apachectl