Skip to content

Commit

Permalink
Allow macos-intel 10.15 target, for slower but updated machines
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Dec 30, 2023
1 parent 986636b commit 6ae19f1
Show file tree
Hide file tree
Showing 23 changed files with 97 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bootstrap-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function install_compiler() {
}

case "${1}" in
"macos"|"macos-universal"|"macos-universal-10.15")
"macos"|"macos-10.15"|"macos-universal"|"macos-universal-10.15")
brew install autoconf automake cmake coreutils gawk git gnu-sed jq make meson

[ -n "${GITHUB_ENV}" ] && echo "PAWPAW_PACK_NAME=${1}-$(sw_vers -productVersion | cut -d '.' -f 1)" >> "${GITHUB_ENV}"
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:

env:
CACHE_VERSION: 5
CACHE_VERSION: 6
DEBIAN_FRONTEND: noninteractive
PAWPAW_SKIP_TESTS: 1

Expand All @@ -16,13 +16,17 @@ jobs:
# macos 11
- target: macos
os: macos-11
- target: macos-10.15
os: macos-11
- target: macos-universal
os: macos-11
- target: macos-universal-10.15
os: macos-11
# macos 12
- target: macos
os: macos-12
- target: macos-10.15
os: macos-12
- target: macos-universal
os: macos-12
- target: macos-universal-10.15
Expand Down Expand Up @@ -181,13 +185,17 @@ jobs:
# macos 11
- target: macos
os: macos-11
- target: macos-10.15
os: macos-11
- target: macos-universal
os: macos-11
- target: macos-universal-10.15
os: macos-11
# macos 12
- target: macos
os: macos-12
- target: macos-10.15
os: macos-12
- target: macos-universal
os: macos-12
- target: macos-universal-10.15
Expand Down Expand Up @@ -357,13 +365,17 @@ jobs:
# macos 11
- target: macos
os: macos-11
- target: macos-10.15
os: macos-11
- target: macos-universal
os: macos-11
- target: macos-universal-10.15
os: macos-11
# macos 12
- target: macos
os: macos-12
- target: macos-10.15
os: macos-12
- target: macos-universal
os: macos-12
- target: macos-universal-10.15
Expand Down Expand Up @@ -513,13 +525,17 @@ jobs:
# macos 11
- target: macos
os: macos-11
- target: macos-10.15
os: macos-11
- target: macos-universal
os: macos-11
- target: macos-universal-10.15
os: macos-11
# macos 12
- target: macos
os: macos-12
- target: macos-10.15
os: macos-12
- target: macos-universal
os: macos-12
- target: macos-universal-10.15
Expand Down Expand Up @@ -787,9 +803,13 @@ jobs:
matrix:
include:
# macos 11
- target: macos-10.15
os: macos-11
- target: macos-universal-10.15
os: macos-11
# macos 12
- target: macos-10.15
os: macos-12
- target: macos-universal-10.15
os: macos-12
# debian 11
Expand Down
20 changes: 14 additions & 6 deletions local.env
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,20 @@ else
CMAKE="cmake"
fi

if [ "${MACOS_UNIVERSAL_10_15}" -eq 1 ]; then
CMAKE="${CMAKE} -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_OSX_SYSROOT=macosx"
elif [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
CMAKE="${CMAKE} -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_OSX_SYSROOT=macosx"
elif [ "${MACOS}" -eq 1 ]; then
CMAKE="${CMAKE} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8 -DCMAKE_OSX_SYSROOT=macosx"
if [ "${MACOS}" -eq 1 ]; then
CMAKE="${CMAKE} -DCMAKE_OSX_SYSROOT=macosx"
if [ "${MACOS_10_15}" -eq 1 ]; then
CMAKE="${CMAKE} -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15"
elif [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
CMAKE="${CMAKE} -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12"
else
CMAKE="${CMAKE} -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8"
fi
if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
CMAKE="${CMAKE} -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64'"
else
CMAKE="${CMAKE} -DCMAKE_OSX_ARCHITECTURES=x86_64"
fi
elif [ "${WIN32}" -eq 1 ]; then
CMAKE="${CMAKE} -DCMAKE_RC_COMPILER=${WINDRES}"
fi
Expand Down
1 change: 1 addition & 0 deletions patches/Python/macos-10.15
1 change: 0 additions & 1 deletion patches/Python/macos-universal-10.15

This file was deleted.

1 change: 1 addition & 0 deletions patches/artyfx/macos-10.15
1 change: 0 additions & 1 deletion patches/artyfx/macos-universal-10.15

This file was deleted.

1 change: 1 addition & 0 deletions patches/cx_Freeze/macos-10.15
1 change: 1 addition & 0 deletions patches/cx_Freeze/macos-universal
1 change: 0 additions & 1 deletion patches/cx_Freeze/macos-universal-10.15

This file was deleted.

1 change: 0 additions & 1 deletion patches/db/macos-universal-10.15

This file was deleted.

1 change: 0 additions & 1 deletion patches/flac/macos-universal-10.15

This file was deleted.

1 change: 1 addition & 0 deletions patches/glib/macos-10.15
1 change: 0 additions & 1 deletion patches/glib/macos-universal-10.15

This file was deleted.

1 change: 0 additions & 1 deletion patches/libsamplerate/macos-universal-10.15

This file was deleted.

1 change: 0 additions & 1 deletion patches/qtbase/macos-universal-10.15

This file was deleted.

20 changes: 16 additions & 4 deletions setup/check_target.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ INVALID_TARGET=0

LINUX=0
MACOS=0
MACOS_10_15=0
MACOS_UNIVERSAL=0
MACOS_UNIVERSAL_10_15=0
WASM=0
WIN32=0
WIN64=0
Expand All @@ -20,7 +20,14 @@ unset TOOLCHAIN_PREFIX_

function check_target() {
case "${target}" in
"macos"|"macos-intel"|"Darwin")
"Darwin")
CLANG=1
MACOS=1
if [ "$(uname -m)" = "x86_64" ]; then
MACOS_UNIVERSAL=1
fi
;;
"macos"|"macos-intel")
CLANG=1
MACOS=1
;;
Expand All @@ -29,11 +36,16 @@ function check_target() {
MACOS=1
MACOS_UNIVERSAL=1
;;
"macos-10.15"|"macos-universal-10.15")
"macos-10.15")
CLANG=1
MACOS=1
MACOS_10_15=1
;;
"macos-universal-10.15")
CLANG=1
MACOS=1
MACOS_10_15=1
MACOS_UNIVERSAL=1
MACOS_UNIVERSAL_10_15=1
;;
"wasm")
CLANG=1
Expand Down
17 changes: 10 additions & 7 deletions setup/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ if [ "${LINUX}" -eq 1 ]; then
elif [ "${MACOS}" -eq 1 ]; then
APP_EXT=""
CMAKE_SYSTEM_NAME="Darwin"
if [ "${MACOS_UNIVERSAL_10_15}" -eq 1 ]; then
PAWPAW_TARGET="macos-universal-10.15"
elif [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
PAWPAW_TARGET="macos-universal"
else
PAWPAW_TARGET="macos"
fi
if [ "${MACOS_10_15}" -eq 1 ]; then
PAWPAW_TARGET+="-10.15"
fi

elif [ "${WASM}" -eq 1 ]; then
APP_EXT=".html"
Expand Down Expand Up @@ -123,27 +124,29 @@ if [ -z "${PAWPAW_NOSIMD}" ] || [ "${PAWPAW_NOSIMD}" -eq 0 ]; then
fi

if [ "${MACOS}" -eq 1 ]; then
if [ "${MACOS_UNIVERSAL_10_15}" -eq 1 ]; then
if [ "${MACOS_10_15}" -eq 1 ]; then
BUILD_FLAGS+=" -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_15"
BUILD_FLAGS+=" -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_15"
BUILD_FLAGS+=" -mmacosx-version-min=10.15"
BUILD_FLAGS+=" -arch x86_64 -arch arm64"
export MACOSX_DEPLOYMENT_TARGET="10.15"
elif [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
BUILD_FLAGS+=" -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12"
BUILD_FLAGS+=" -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_12"
BUILD_FLAGS+=" -mmacosx-version-min=10.12"
BUILD_FLAGS+=" -arch x86_64 -arch arm64"
export MACOSX_DEPLOYMENT_TARGET="10.12"
else
BUILD_FLAGS+=" -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_8"
BUILD_FLAGS+=" -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_8"
BUILD_FLAGS+=" -mmacosx-version-min=10.8"
BUILD_FLAGS+=" -stdlib=libc++"
BUILD_FLAGS+=" -arch x86_64"
BUILD_FLAGS+=" -Wno-deprecated-declarations"
export MACOSX_DEPLOYMENT_TARGET="10.8"
fi
if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
BUILD_FLAGS+=" -arch x86_64 -arch arm64"
else
BUILD_FLAGS+=" -arch x86_64"
fi
BUILD_FLAGS+=" -Werror=objc-method-access"
elif [ "${WIN32}" -eq 1 ]; then
BUILD_FLAGS+=" -DPTW32_STATIC_LIB"
Expand Down
47 changes: 29 additions & 18 deletions setup/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,25 @@ function _prebuild() {
done
fi

if [ -d "${PAWPAW_ROOT}/patches/${name}/${PAWPAW_TARGET}" ] && [ ! -f "${pkgdir}/.stamp_cleanup" ]; then
for p in $(ls "${PAWPAW_ROOT}/patches/${name}/${PAWPAW_TARGET}/" | grep "\.patch$" | sort); do
if [ ! -f "${pkgdir}/.stamp_applied_${p}" ]; then
patch -p1 -d "${pkgdir}" -i "${PAWPAW_ROOT}/patches/${name}/${PAWPAW_TARGET}/${p}"
touch "${pkgdir}/.stamp_applied_${p}"
fi
done
fi
local patchtargets="${PAWPAW_TARGET}"
if [ "${PAWPAW_TARGET}" =~ "linux-"* ]; then
patchtargets+=" linux"
elif [ "${PAWPAW_TARGET}" = "macos-universal-10.15" ]; then
patchtargets+=" macos-10.15 macos-universal"
elif [ "${PAWPAW_TARGET}" = "win64" ]; then
patchtargets+=" win32"
fi

for target in ${patchtargets[@]}; do
if [ -d "${PAWPAW_ROOT}/patches/${name}/${target}" ] && [ ! -f "${pkgdir}/.stamp_cleanup" ]; then
for p in $(ls "${PAWPAW_ROOT}/patches/${name}/${target}/" | grep "\.patch$" | sort); do
if [ ! -f "${pkgdir}/.stamp_applied_${p}" ]; then
patch -p1 -d "${pkgdir}" -i "${PAWPAW_ROOT}/patches/${name}/${target}/${p}"
touch "${pkgdir}/.stamp_applied_${p}"
fi
done
fi
done

if [ ! -f "${pkgdir}/.stamp_configured" ]; then
rm -f "${pkgdir}/.stamp_built"
Expand Down Expand Up @@ -336,19 +347,19 @@ function build_cmake() {
fi

if [ "${MACOS}" -eq 1 ]; then
if [ "${MACOS_UNIVERSAL_10_15}" -eq 1 ]; then
OSX_ARCHS="arm64;x86_64"
OSX_TARGET="10.15"
extraconfrules+=" -DCMAKE_OSX_SYSROOT=macosx"
if [ "${MACOS_10_15}" -eq 1 ]; then
extraconfrules+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15"
elif [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
OSX_ARCHS="arm64;x86_64"
OSX_TARGET="10.12"
extraconfrules+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12"
else
OSX_ARCHS="x86_64"
OSX_TARGET="10.8"
extraconfrules+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.8"
fi
if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then
extraconfrules+=" -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64'"
else
extraconfrules+=" -DCMAKE_OSX_ARCHITECTURES=x86_64"
fi
extraconfrules+=" -DCMAKE_OSX_ARCHITECTURES=${OSX_ARCHS}"
extraconfrules+=" -DCMAKE_OSX_DEPLOYMENT_TARGET=${OSX_TARGET}"
extraconfrules+=" -DCMAKE_OSX_SYSROOT=macosx"
elif [ "${WIN32}" -eq 1 ]; then
extraconfrules+=" -DCMAKE_RC_COMPILER=${WINDRES}"
fi
Expand Down
2 changes: 1 addition & 1 deletion setup/versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ fi
# ---------------------------------------------------------------------------------------------------------------------
# bootstrap qt stuff

if [ "${LINUX}" -eq 1 ] || [ "${MACOS_UNIVERSAL}" -eq 1 ] || [ "${WIN32}" -eq 1 ]; then
if [ "${LINUX}" -eq 1 ] || [ "${MACOS_10_15}" -eq 1 ] || [ "${MACOS_UNIVERSAL}" -eq 1 ] || [ "${WIN32}" -eq 1 ]; then
QT5_VERSION=5.12.12
QT5_MVERSION=5.12
else
Expand Down

0 comments on commit 6ae19f1

Please sign in to comment.