From 8e10e1504d03518c22741475bb3160115c531ba8 Mon Sep 17 00:00:00 2001 From: samuela Date: Wed, 8 Jan 2020 19:44:24 +0000 Subject: [PATCH 1/2] 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 8e483f20..1d86fb00 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 \ From b16fe2e832595fa450b2f85e49e187d3facf3607 Mon Sep 17 00:00:00 2001 From: samuela Date: Mon, 20 Jan 2020 17:52:18 +0000 Subject: [PATCH 2/2] Only change the path when on macOS --- recipes/xz/recipe.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/recipes/xz/recipe.sh b/recipes/xz/recipe.sh index 1d86fb00..b82f8240 100644 --- a/recipes/xz/recipe.sh +++ b/recipes/xz/recipe.sh @@ -13,12 +13,16 @@ function recipe_update { function recipe_build { export CFLAGS="-static" - + # 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 + # it in PATH, preceding the default BSD version. + if [[ "$(uname)" == "Darwin" ]]; then + export PATH="/usr/local/opt/gettext/bin:$PATH" + fi + + ./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