From 8e10e1504d03518c22741475bb3160115c531ba8 Mon Sep 17 00:00:00 2001
From: samuela <skainsworth@gmail.com>
Date: Wed, 8 Jan 2020 19:44:24 +0000
Subject: [PATCH] Workaround for homebrew gettext when building xz.

---
 recipes/xz/recipe.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/recipes/xz/recipe.sh b/recipes/xz/recipe.sh
index 8e483f20b..1d86fb00f 100644
--- a/recipes/xz/recipe.sh
+++ b/recipes/xz/recipe.sh
@@ -14,7 +14,12 @@ function recipe_update {
 function recipe_build {
     export CFLAGS="-static"
 
-    ./autogen.sh
+    # autogen.sh requires autopoint which is provided by the gettext homebrew
+    # formula on macOS. Unfortunately, homebrew does not install it into PATH
+    # because macOS provides the BSD gettext library. So we make sure to include
+    # it in PATH.
+    PATH="/usr/local/opt/gettext/bin:$PATH" ./autogen.sh
+
     chmod +w build-aux/config.sub
     wget -O build-aux/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
     ./configure \
-- 
GitLab