mirror of
https://github.com/jimeh/build-emacs-for-macos.git
synced 2026-02-19 13:06:38 +00:00
Instead of just installing a pre-patched gcc formula, copy the local formula from Homebrew and apply a patch to it, before then installing it. This should be a lot more future-proof.
16 lines
351 B
Bash
Executable File
16 lines
351 B
Bash
Executable File
#! /usr/bin/env bash
|
|
set -e
|
|
|
|
brewdir="$(brew --prefix)"
|
|
formula="${brewdir}/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gcc.rb"
|
|
|
|
if [ ! -f "$formula" ]; then
|
|
echo "ERROR: ${formula} does not exist." 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
cp "$formula" ./Formula/
|
|
|
|
patch -f -p1 -i ./Formula/gcc.rb.patch
|
|
brew install ./Formula/gcc.rb --build-from-source --force
|