From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Subject: [PATCH 2/3] Makefile: detect new Homebrew location for ARM-based Macs
Date: Mon, 15 Jan 2024 12:45:01 +0100 [thread overview]
Message-ID: <3adb0b7ae888db40949f788f9582569617c20c2b.1705318985.git.ps@pks.im> (raw)
In-Reply-To: <cover.1705318985.git.ps@pks.im>
[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]
With the introduction of the ARM-based Macs the default location for
Homebrew has changed from "/usr/local" to "/opt/homebrew". We only
handle the former location though, which means that unless the user has
manually configured required search paths we won't be able to locate it.
Improve upon this by adding relevant paths to our CFLAGS and LDFLAGS as
well as detecting the location of msgfmt(1).
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
config.mak.uname | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/config.mak.uname b/config.mak.uname
index 3bb03f423a..dacc95172d 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -158,6 +158,19 @@ ifeq ($(uname_S),Darwin)
ifeq ($(shell test -x /usr/local/opt/gettext/bin/msgfmt && echo y),y)
MSGFMT = /usr/local/opt/gettext/bin/msgfmt
endif
+ # On newer ARM-based machines the default installation path has changed to
+ # /opt/homebrew. Include it in our search paths so that the user does not
+ # have to configure this manually.
+ #
+ # Note that we do not employ the same workaround as above where we manually
+ # add gettext. The issue was fixed more than three years ago by now, and at
+ # that point there haven't been any ARM-based Macs yet.
+ else ifeq ($(shell test -d /opt/homebrew/ && echo y),y)
+ BASIC_CFLAGS += -I/opt/homebrew/include
+ BASIC_LDFLAGS += -L/opt/homebrew/lib
+ ifeq ($(shell test -x /opt/homebrew/bin/msgfmt && echo y),y)
+ MSGFMT = /opt/homebrew/bin/msgfmt
+ endif
endif
# The builtin FSMonitor on MacOS builds upon Simple-IPC. Both require
--
2.43.GIT
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-01-15 11:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-15 11:44 [PATCH 0/3] ci: add support for macOS to GitLab CI Patrick Steinhardt
2024-01-15 11:44 ` [PATCH 1/3] ci: make p4 setup on macOS more robust Patrick Steinhardt
2024-01-18 7:19 ` Matthias Aßhauer
2024-01-18 9:44 ` Patrick Steinhardt
2024-01-15 11:45 ` Patrick Steinhardt [this message]
2024-01-15 11:45 ` [PATCH 3/3] ci: add macOS jobs to GitLab CI Patrick Steinhardt
2024-01-16 14:58 ` Phillip Wood
2024-01-17 7:34 ` Patrick Steinhardt
2024-01-18 10:22 ` [PATCH v2 0/5] ci: add support for macOS " Patrick Steinhardt
2024-01-18 10:22 ` [PATCH v2 1/5] t7527: decrease likelihood of racing with fsmonitor daemon Patrick Steinhardt
2024-01-18 10:22 ` [PATCH v2 2/5] Makefile: detect new Homebrew location for ARM-based Macs Patrick Steinhardt
2024-01-18 10:22 ` [PATCH v2 3/5] ci: handle TEST_OUTPUT_DIRECTORY when printing test failures Patrick Steinhardt
2024-01-18 10:22 ` [PATCH v2 4/5] ci: make p4 setup on macOS more robust Patrick Steinhardt
2024-01-18 10:23 ` [PATCH v2 5/5] ci: add macOS jobs to GitLab CI Patrick Steinhardt
2024-01-21 14:50 ` [PATCH v2 0/5] ci: add support for macOS " Phillip Wood
2024-01-22 6:14 ` Patrick Steinhardt
2024-01-22 15:44 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3adb0b7ae888db40949f788f9582569617c20c2b.1705318985.git.ps@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).