mirror of
https://github.com/jimeh/build-emacs-for-macos.git
synced 2026-02-19 13:06:38 +00:00
An attempt at resolving #8 by getting the GCC compilation step to have GNU-based `sed` and other commands available. At the very least, I'm assuming this won't break things. Fingers crossed.
28 lines
596 B
Bash
Executable File
28 lines
596 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
|
|
|
|
gnubins=(
|
|
"${brewdir}/opt/coreutils/libexec/gnubin"
|
|
"${brewdir}/opt/make/libexec/gnubin"
|
|
"${brewdir}/opt/gnu-sed/libexec/gnubin"
|
|
)
|
|
|
|
for gnubin in "${gnubins[@]}"; do
|
|
if [ -d "$gnubin" ]; then
|
|
export PATH="${gnubin}:$PATH"
|
|
fi
|
|
done
|
|
|
|
cp "$formula" ./Formula/
|
|
|
|
patch -f -p1 -i ./Formula/gcc.rb.patch
|
|
brew install ./Formula/gcc.rb --build-from-source --force
|