httpd-2.4.3-apxs.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --- httpd-2.4.3/support/apxs.in.apxs
  2. +++ httpd-2.4.3/support/apxs.in
  3. @@ -25,7 +25,18 @@ package apxs;
  4. my %config_vars = ();
  5. -my $installbuilddir = "@exp_installbuilddir@";
  6. +# Awful hack to make apxs libdir-agnostic:
  7. +my $pkg_config = "/usr/bin/pkg-config";
  8. +if (! -x "$pkg_config") {
  9. + error("$pkg_config not found!");
  10. + exit(1);
  11. +}
  12. +
  13. +my $libdir = `pkg-config --variable=libdir apr-1`;
  14. +chomp $libdir;
  15. +
  16. +my $installbuilddir = $libdir . "/apache2/build";
  17. +
  18. get_config_vars("$installbuilddir/config_vars.mk",\%config_vars);
  19. # read the configuration variables once
  20. @@ -275,7 +286,7 @@ if ($opt_g) {
  21. $data =~ s|%NAME%|$name|sg;
  22. $data =~ s|%TARGET%|$CFG_TARGET|sg;
  23. $data =~ s|%PREFIX%|$prefix|sg;
  24. - $data =~ s|%INSTALLBUILDDIR%|$installbuilddir|sg;
  25. + $data =~ s|%LIBDIR%|$libdir|sg;
  26. my ($mkf, $mods, $src) = ($data =~ m|^(.+)-=#=-\n(.+)-=#=-\n(.+)|s);
  27. @@ -453,11 +464,11 @@ if ($opt_c) {
  28. my $ldflags = "$CFG_LDFLAGS";
  29. if ($opt_p == 1) {
  30. - my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`;
  31. + my $apr_libs=`$apr_config --cflags --ldflags --link-libtool`;
  32. chomp($apr_libs);
  33. my $apu_libs="";
  34. if ($apr_major_version < 2) {
  35. - $apu_libs=`$apu_config --ldflags --link-libtool --libs`;
  36. + $apu_libs=`$apu_config --ldflags --link-libtool`;
  37. chomp($apu_libs);
  38. }
  39. @@ -672,8 +683,8 @@ __DATA__
  40. builddir=.
  41. top_srcdir=%PREFIX%
  42. -top_builddir=%PREFIX%
  43. -include %INSTALLBUILDDIR%/special.mk
  44. +top_builddir=%LIBDIR%/apache2
  45. +include %LIBDIR%/apache2/build/special.mk
  46. # the used tools
  47. APXS=apxs