From e0fd2b16eb91ac5a98ed4ec31f4773ab22cbd470 Mon Sep 17 00:00:00 2001 From: Alice Rum Date: Fri, 5 Aug 2022 20:30:14 +0200 Subject: [PATCH 1/2] fix(native-comp): compatibility with libgccjit 12 homebrew formula Since the latest update of `libgccjit` in brew to version 12, emacs does not build again. Problem is that now dylib exists in multiple locations, and `MAC_CFLAGS` environment variable is not filled correctly in `configure.ac`. This commit fixes the issue. --- build-emacs-for-macos | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build-emacs-for-macos b/build-emacs-for-macos index 9c76194..9e3374e 100755 --- a/build-emacs-for-macos +++ b/build-emacs-for-macos @@ -682,6 +682,17 @@ class Build } end + if %w[emacs-28 emacs-29].include?(effective_version) + p << { + replace: [ + 'configure.ac', + 'grep -E \'libgccjit\.(so|dylib)$\'))"', + 'grep -E \'libgccjit\.(so|dylib)$\' | tail -1))"' + ], + allow_failure: true + } + end + if effective_version == 'emacs-27' p << { url: 'https://github.com/d12frosted/homebrew-emacs-plus/raw/master/' \ From aeb3a75e5c6e4a8f313dfd53ce0af46f07790c28 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Wed, 10 Aug 2022 16:28:29 +0100 Subject: [PATCH 2/2] chore(patch): minor simplification to libgccjit patches By matching more targeted sets of strings, it should hopefully make these patches more future-proof. --- build-emacs-for-macos | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build-emacs-for-macos b/build-emacs-for-macos index 9e3374e..8a07cdb 100755 --- a/build-emacs-for-macos +++ b/build-emacs-for-macos @@ -675,8 +675,8 @@ class Build p << { replace: [ 'configure.ac', - 'grep libgccjit.so\$))"', - 'grep -E \'libgccjit\.(so|dylib)$\'))"' + 'grep libgccjit.so\$', + 'grep -E \'libgccjit\.(so|dylib)$\'' ], allow_failure: true } @@ -686,8 +686,8 @@ class Build p << { replace: [ 'configure.ac', - 'grep -E \'libgccjit\.(so|dylib)$\'))"', - 'grep -E \'libgccjit\.(so|dylib)$\' | tail -1))"' + 'grep -E \'libgccjit\.(so|dylib)$\'', + 'grep -E \'libgccjit\.(so|dylib)$\' | tail -1' ], allow_failure: true }