diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-07 15:36:28 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-07 16:04:42 +0000 |
commit | 87e86b457467e09a1e26a48b7b4abc223a4d7d3f (patch) | |
tree | 06e40bea96794b40296120b5d8bc6ceebbfcf738 | |
parent | b78c6d47eecb0641a4f1eb0a9a77fbaa9fa2d975 (diff) | |
download | nixlib-87e86b457467e09a1e26a48b7b4abc223a4d7d3f.tar nixlib-87e86b457467e09a1e26a48b7b4abc223a4d7d3f.tar.gz nixlib-87e86b457467e09a1e26a48b7b4abc223a4d7d3f.tar.bz2 nixlib-87e86b457467e09a1e26a48b7b4abc223a4d7d3f.tar.lz nixlib-87e86b457467e09a1e26a48b7b4abc223a4d7d3f.tar.xz nixlib-87e86b457467e09a1e26a48b7b4abc223a4d7d3f.tar.zst nixlib-87e86b457467e09a1e26a48b7b4abc223a4d7d3f.zip |
autoen: Fix cross build
See comments for details. Patch can be removed whend version is bumped.
-rw-r--r-- | pkgs/development/tools/misc/autogen/default.nix | 16 | ||||
-rw-r--r-- | pkgs/development/tools/misc/autogen/pkg-config-use-var.patch | 13 |
2 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/development/tools/misc/autogen/default.nix b/pkgs/development/tools/misc/autogen/default.nix index 17aa6e5fdf9c..65c4f3174051 100644 --- a/pkgs/development/tools/misc/autogen/default.nix +++ b/pkgs/development/tools/misc/autogen/default.nix @@ -11,6 +11,22 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "lib" "out" "man" "info" ]; + patches = [ + # Temporary, so builds with a prefixed pkg-config (like cross builds) work. + # + # https://savannah.gnu.org/support/?109050 was supposed to fix this, but + # the generated configure script mysteriously still contained hard-coded + # pkg-config. I tried regenerating it, but that didn't help. Only + # https://git.savannah.gnu.org/cgit/autogen.git/commit/?h=5cbe233387d7f7b36752736338d1cd4f71287daa, + # in the next release, finally fixes this, by getting rid of some + # metaprogramming of the autoconf m4 metaprogram! There evidentally was + # some sort escaping error such that the `PKG_CONFIG` check got evaluated + # before `configure` was generated. + # + # Remove this when the version is bumped + ./pkg-config-use-var.patch + ]; + nativeBuildInputs = [ which pkgconfig perl ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ diff --git a/pkgs/development/tools/misc/autogen/pkg-config-use-var.patch b/pkgs/development/tools/misc/autogen/pkg-config-use-var.patch new file mode 100644 index 000000000000..69476f62c6db --- /dev/null +++ b/pkgs/development/tools/misc/autogen/pkg-config-use-var.patch @@ -0,0 +1,13 @@ +diff --git a/configure b/configure +index c3f761d1c3f..14b101f67c1 +--- a/configure ++++ b/configure +@@ -16683,7 +16683,7 @@ fi + + + +- ag_gv=`gdir=\`pkg-config --cflags-only-I \ ++ ag_gv=`gdir=\`${PKG_CONFIG} --cflags-only-I \ + guile-${GUILE_EFFECTIVE_VERSION} | \ + sed 's/\(^\| \)-I/\1/g'\` + for d in $gdir |