| 1 |
#!/usr/bin/env bash |
| 2 |
|
| 3 |
if [ -z ${CI+x} ]; then |
| 4 |
echo "this script is only intended to run in CI" >&2 |
| 5 |
exit 1 |
| 6 |
fi |
| 7 |
|
| 8 |
set -e |
| 9 |
set -o pipefail |
| 10 |
set -u |
| 11 |
set -x |
| 12 |
|
| 13 |
# Homebrew/Macports install steps may pull in newer versions of Flex or Bison, |
| 14 |
# but we still end up with the XCode-provided headers in the compiler’s include |
| 15 |
# path, so log what versions we have for debugging purposes |
| 16 |
echo -n 'XCode-provided version of Flex is: ' |
| 17 |
flex --version |
| 18 |
echo -n 'XCode-provided version of Bison is: ' |
| 19 |
bison --version | head -1 |
| 20 |
|
| 21 |
brew tap --repair |
| 22 |
brew update |
| 23 |
brew install autogen || brew upgrade autogen |
| 24 |
brew install automake || brew upgrade automake |
| 25 |
brew install cmake || brew upgrade cmake |
| 26 |
brew install bison || brew upgrade bison |
| 27 |
brew install devil || brew upgrade devil |
| 28 |
brew install gd || brew upgrade gd |
| 29 |
brew install gtk+ || brew upgrade gtk+ |
| 30 |
brew install gts || brew upgrade gts |
| 31 |
brew install swig || brew upgrade swig |
| 32 |
|
| 33 |
# quoting Homebrew: |
| 34 |
# |
| 35 |
# bison is keg-only, which means it was not symlinked into /opt/homebrew, |
| 36 |
# because macOS already provides this software and installing another version in |
| 37 |
# parallel can cause all kinds of trouble. |
| 38 |
# |
| 39 |
# If you need to have bison first in your PATH, run: |
| 40 |
# echo 'export PATH="/opt/homebrew/opt/bison/bin:$PATH"' >> ~/.zshrc |
| 41 |
# |
| 42 |
# For compilers to find bison you may need to set: |
| 43 |
# export LDFLAGS="-L/opt/homebrew/opt/bison/lib" |
| 44 |
export PATH="/opt/homebrew/opt/bison/bin:$PATH" |
| 45 |
|
| 46 |
brew install pango || brew upgrade pango |
| 47 |
brew install qt5 || brew upgrade qt5 |
| 48 |
|
| 49 |
# quoting Homebrew: |
| 50 |
# |
| 51 |
# qt@5 is keg-only, which means it was not symlinked into /opt/homebrew, |
| 52 |
# because this is an alternate version of another formula. |
| 53 |
# |
| 54 |
# If you need to have qt@5 first in your PATH, run: |
| 55 |
# echo 'export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"' >> ~/.zshrc |
| 56 |
# |
| 57 |
# For compilers to find qt@5 you may need to set: |
| 58 |
# export LDFLAGS="-L/opt/homebrew/opt/qt@5/lib" |
| 59 |
# export CPPFLAGS="-I/opt/homebrew/opt/qt@5/include" |
| 60 |
# |
| 61 |
# For pkg-config to find qt@5 you may need to set: |
| 62 |
# export PKG_CONFIG_PATH="/opt/homebrew/opt/qt@5/lib/pkgconfig" |
| 63 |
export PATH="/opt/homebrew/opt/qt@5/bin:$PATH" |
| 64 |
export LDFLAGS="-L/opt/homebrew/opt/qt@5/lib" |
| 65 |
export CPPFLAGS="-I/opt/homebrew/opt/qt@5/include" |
| 66 |
export PKG_CONFIG_PATH="/opt/homebrew/opt/qt@5/lib/pkgconfig" |
| 67 |
|
| 68 |
brew install librsvg || brew upgrade librsvg |
| 69 |
brew install libxaw || brew upgrade libxaw |
| 70 |
|
| 71 |
# install MacPorts for libANN |
| 72 |
curl --retry 3 --location --no-progress-meter -O \ |
| 73 |
https://github.com/macports/macports-base/releases/download/v2.10.5/MacPorts-2.10.5-14-Sonoma.pkg |
| 74 |
sudo installer -package MacPorts-2.10.5-14-Sonoma.pkg -target / |
| 75 |
export PATH=/opt/local/bin:${PATH} |
| 76 |
|
| 77 |
# lib/mingle dependency |
| 78 |
sudo port install libANN |