From 7cdcd9b0a16889c20d201da7e6c0733446e181a7 Mon Sep 17 00:00:00 2001
From: Jeremy Soller <jackpot51@gmail.com>
Date: Tue, 27 Feb 2018 21:14:07 -0700
Subject: [PATCH] Fix extrautils build

---
 bin/x86_64-unknown-redox-pkg-config | 2 +-
 config.sh                           | 2 +-
 cook.sh                             | 2 ++
 recipes/extrautils/recipe.sh        | 4 ----
 4 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/bin/x86_64-unknown-redox-pkg-config b/bin/x86_64-unknown-redox-pkg-config
index db91a59ae..7693e6210 100644
--- a/bin/x86_64-unknown-redox-pkg-config
+++ b/bin/x86_64-unknown-redox-pkg-config
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 
-export PKG_CONFIG_DIR=
+export PKG_CONFIG_PATH=
 export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_RECIPE}/sysroot"
 export PKG_CONFIG_LIBDIR="${PKG_CONFIG_SYSROOT_DIR}/lib/pkgconfig"
 
diff --git a/config.sh b/config.sh
index 6e21f242d..da7b8902e 100755
--- a/config.sh
+++ b/config.sh
@@ -20,7 +20,7 @@ export LD="${HOST}-ld"
 export NM="${HOST}-nm"
 export OBJCOPY="${HOST}-objcopy"
 export OBJDUMP="${HOST}-objdump"
-export PKG_CONFIG="${HOST}-pkg-config"
+#export PKG_CONFIG="${HOST}-pkg-config"
 export RANLIB="${HOST}-ranlib"
 export READELF="${HOST}-readelf"
 export STRIP="${HOST}-strip"
diff --git a/cook.sh b/cook.sh
index c99c2f722..3de6157b3 100755
--- a/cook.sh
+++ b/cook.sh
@@ -423,6 +423,8 @@ then
     then
         export COOKBOOK_RECIPE="${ROOT}/recipes/$1"
 
+
+        export PKG_CONFIG_ALLOW_CROSS=1
         export PKG_CONFIG_PATH=
         export PKG_CONFIG_LIBDIR="${COOKBOOK_RECIPE}/sysroot/lib/pkgconfig"
         export PKG_CONFIG_SYSROOT_DIR="${COOKBOOK_RECIPE}/sysroot"
diff --git a/recipes/extrautils/recipe.sh b/recipes/extrautils/recipe.sh
index f36cbfcab..cef3940ac 100644
--- a/recipes/extrautils/recipe.sh
+++ b/recipes/extrautils/recipe.sh
@@ -1,6 +1,2 @@
 GIT=https://github.com/redox-os/extrautils.git
 BUILD_DEPENDS=(xz)
-export PKG_CONFIG_ALLOW_CROSS=1
-export PKG_CONFIG_PATH=
-export PKG_CONFIG_LIBDIR="$PWD/sysroot/lib/pkgconfig"
-export PKG_CONFIG_SYSROOT_DIR="$PWD/sysroot"
-- 
GitLab