git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] macos: do let the build find the gettext headers/libraries/msgfmt
@ 2020-04-23  7:52 Johannes Schindelin via GitGitGadget
  2020-04-23 16:17 ` Eric Sunshine
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2020-04-23  7:52 UTC (permalink / raw)
  To: git; +Cc: SZEDER Gábor, Johannes Schindelin, Johannes Schindelin

From: Johannes Schindelin <johannes.schindelin@gmx.de>

Apparently a recent Homebrew update now installs `gettext` into a
subdirectory under /usr/local/, requiring the CFLAGS/LDFLAGS to list
explicit directories _even_ when asking to force-link the `gettext`
package.

Likewise, the `msgfmt` tool is no longer in the `PATH`.

Let's work around this issue.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
    Prepare for Homebrew changing the gettext package
    
    In an early Azure Pipelines preview of what is to come, I saw the 
    osx-clang and osx-gcc jobs fail consistently.
    
    This patch tries to prevent that from affecting our CI/PR builds.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-616%2Fdscho%2Fbrew-gettext-update-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-616/dscho/brew-gettext-update-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/616

 config.mak.uname | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/config.mak.uname b/config.mak.uname
index 0ab8e009383..540d124d2ef 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -133,8 +133,11 @@ ifeq ($(uname_S),Darwin)
 	HAVE_BSD_SYSCTL = YesPlease
 	FREAD_READS_DIRECTORIES = UnfortunatelyYes
 	HAVE_NS_GET_EXECUTABLE_PATH = YesPlease
-	BASIC_CFLAGS += -I/usr/local/include
-	BASIC_LDFLAGS += -L/usr/local/lib
+	BASIC_CFLAGS += -I/usr/local/include -I/usr/local/opt/gettext/include
+	BASIC_LDFLAGS += -L/usr/local/lib -L/usr/local/opt/gettext/lib
+	ifeq ($(shell test -x /usr/local/opt/gettext/bin/msgfmt && echo y),y)
+		MSGFMT = /usr/local/opt/gettext/bin/msgfmt
+	endif
 endif
 ifeq ($(uname_S),SunOS)
 	NEEDS_SOCKET = YesPlease

base-commit: e870325ee8575d5c3d7afe0ba2c9be072c692b65
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-04-26 20:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-23  7:52 [PATCH] macos: do let the build find the gettext headers/libraries/msgfmt Johannes Schindelin via GitGitGadget
2020-04-23 16:17 ` Eric Sunshine
2020-04-23 20:49   ` Eric Sunshine
2020-04-25 12:54     ` Johannes Schindelin
2020-04-26 15:54       ` Carlo Arenas
2020-04-26 16:59         ` Johannes Schindelin
2020-04-25  6:15 ` [PATCH] macos: do not assume brew and gettext are always available/wanted Carlo Marcelo Arenas Belón
2020-04-25 12:33   ` Johannes Schindelin
2020-04-25 12:54 ` [PATCH v2] macos: do let the build find the gettext headers/libraries/msgfmt Johannes Schindelin via GitGitGadget
2020-04-26 17:05   ` Torsten Bögershausen
2020-04-26 17:34   ` Carlo Marcelo Arenas Belón
2020-04-26 20:09   ` [PATCH v3 1/1] MacOs/brew: Let the build find " tboegi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).