1
0
mirror of https://github.com/open-simh/simh.git synced 2026-01-11 23:53:30 +00:00
B. Scott Michel 7adffe5794 Github CI/CD updates
- Nuke and reinstall HomeBrew for macOS builds. Gets around the whole
  problem of stale links and conflicting packages installed in the GitHub
  macOS images.

- macOS 12 and Ubuntu 20.04 officially deprecated. Ubuntu 20.04 will be
  removed from GitHub's runner images on 01 APR 2025.

- .travis/deps.sh: Add mingw32 as a dependency target, enable MinGW64
  32-bit builds.

- Work around LTO bug on Ubuntu and macOS compilers, where LTO appears
  to miscalculate the number of bytes stored when using the default byte
  swapping 'for' loop. This is a workaround that uses compiler swapping
  intrinsics for well known sizes that appeases LTO. The alternative is
  to wait for a compiler fix, which is infeasible.
2025-08-17 15:32:19 -04:00

99 lines
2.7 KiB
Bash
Executable File

#!/bin/sh
install_osx() {
brew update
brew install pkg-config pcre libpng libedit sdl2 freetype2 sdl2_ttf \
vde cmake gnu-getopt coreutils zlib
}
install_macports() {
sudo port install pkgconfig pcre libpng libedit libsdl2 freetype libsdl2_ttf \
vde2 cmake util-linux coreutils zlib
}
install_arch_linux() {
sudo pacman -S --noconfirm pkgconf
sudo pacman -S --noconfirm pcre libpng libedit
sudo pacman -S --noconfirm mesa
sudo pacman -S --noconfirm libsm
sudo pacman -S --noconfirm cmake
}
install_linux() {
sudo apt-get update -yqqm
sudo apt-get install -ym pkg-config
sudo apt-get install -ym libpcre3-dev libpng-dev libedit-dev
sudo apt-get install -ym libegl1-mesa-dev libgles2-mesa-dev
sudo apt-get install -ym libsdl2-dev libfreetype6-dev libsdl2-ttf-dev
sudo apt-get install -ym libpcap-dev libvdeplug-dev
sudo apt-get install -ym cmake cmake-data ninja-build
}
install_mingw32() {
## Doesn't have libpcap or cmake's extra modules. Not that this
## makes much of a difference.
pacman -S --needed mingw-w64-i686-ninja \
mingw-w64-i686-cmake \
mingw-w64-i686-gcc \
mingw-w64-i686-make \
mingw-w64-i686-pcre \
mingw-w64-i686-freetype \
mingw-w64-i686-SDL2 \
mingw-w64-i686-SDL2_ttf
}
install_mingw64() {
pacman -S --needed mingw-w64-x86_64-ninja \
mingw-w64-x86_64-cmake \
mingw-w64-x86_64-extra-cmake-modules \
mingw-w64-x86_64-gcc \
mingw-w64-x86_64-make \
mingw-w64-x86_64-pcre \
mingw-w64-x86_64-freetype \
mingw-w64-x86_64-SDL2 \
mingw-w64-x86_64-SDL2_ttf \
mingw-w64-x86_64-libpcap
}
install_ucrt64() {
pacman -S --needed mingw-w64-ucrt-x86_64-ninja \
mingw-w64-ucrt-x86_64-cmake \
mingw-w64-ucrt-x86_64-extra-cmake-modules \
mingw-w64-ucrt-x86_64-gcc \
mingw-w64-ucrt-x86_64-make \
mingw-w64-ucrt-x86_64-pcre \
mingw-w64-ucrt-x86_64-freetype \
mingw-w64-ucrt-x86_64-SDL2 \
mingw-w64-ucrt-x86_64-SDL2_ttf \
mingw-w64-ucrt-x86_64-libpcap
}
install_clang64() {
pacman -S --needed mingw-w64-clang-x86_64-ninja \
mingw-w64-clang-x86_64-cmake \
mingw-w64-clang-x86_64-extra-cmake-modules \
mingw-w64-clang-x86_64-clang \
mingw-w64-clang-x86_64-make \
mingw-w64-clang-x86_64-pcre \
mingw-w64-clang-x86_64-freetype \
mingw-w64-clang-x86_64-SDL2 \
mingw-w64-clang-x86_64-SDL2_ttf \
mingw-w64-clang-x86_64-libpcap
}
case "$1" in
osx|macports|linux|mingw32|mingw64|ucrt64|clang64)
install_"$1"
;;
arch-linux)
install_arch_linux
;;
*)
echo "$0: Need an operating system name:"
typeset -f | sed -e '/^install_/!d' -e 's/^install_/ - /' -e 's/ ()//' | sort
exit 1
;;
esac