diff --git a/.github/workflows/bootstrap-deps.sh b/.github/workflows/bootstrap-deps.sh index 4076d0b..0a2697e 100755 --- a/.github/workflows/bootstrap-deps.sh +++ b/.github/workflows/bootstrap-deps.sh @@ -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}" diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index de206fc..0ffdb5f 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -4,7 +4,7 @@ on: push: env: - CACHE_VERSION: 5 + CACHE_VERSION: 6 DEBIAN_FRONTEND: noninteractive PAWPAW_SKIP_TESTS: 1 @@ -16,6 +16,8 @@ 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 @@ -23,6 +25,8 @@ jobs: # 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 @@ -181,6 +185,8 @@ 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 @@ -188,6 +194,8 @@ jobs: # 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 @@ -357,6 +365,8 @@ 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 @@ -364,6 +374,8 @@ jobs: # 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 @@ -513,6 +525,8 @@ 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 @@ -520,6 +534,8 @@ jobs: # 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 @@ -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 diff --git a/bootstrap-qt.sh b/bootstrap-qt.sh index caa4695..b7d3053 100755 --- a/bootstrap-qt.sh +++ b/bootstrap-qt.sh @@ -170,7 +170,7 @@ function build_qt_conf() { # base qtbase_conf_args="-opensource -confirm-license" qtbase_conf_args+=" -c++std" -if [ "${LINUX}" -eq 1 ] || [ "${MACOS_UNIVERSAL}" -eq 1 ]; then +if [ "${QT5_MVERSION}" = "5.12" ]; then qtbase_conf_args+=" c++14" else qtbase_conf_args+=" c++11" @@ -328,6 +328,8 @@ if [ "${MACOS_UNIVERSAL}" -eq 1 ]; then patch_file qtbase${qtsuffix} ${QT5_VERSION} "mkspecs/common/macx.conf" 's/QT_MAC_SDK_VERSION_MIN = 10.13/QT_MAC_SDK_VERSION_MIN = 10.12/' patch_file qtbase${qtsuffix} ${QT5_VERSION} "mkspecs/common/macx.conf" 's/QT_MAC_SDK_VERSION_MAX = 10.15/QT_MAC_SDK_VERSION_MAX = 10.12/' patch_file qtbase${qtsuffix} ${QT5_VERSION} "mkspecs/features/toolchain.prf" 's/-arch $$QMAKE_APPLE_DEVICE_ARCHS/-arch arm64/' +elif [ "${MACOS_10_15}" -eq 1 ]; then + patch_file qtbase${qtsuffix} ${QT5_VERSION} "mkspecs/common/macx.conf" 's/QT_MAC_SDK_VERSION_MIN = 10.13/QT_MAC_SDK_VERSION_MIN = 10.15/' elif [ "${MACOS}" -eq 1 ]; then patch_file qtbase${qtsuffix} ${QT5_VERSION} "mkspecs/macx-clang/qmake.conf" 's/10.10/10.8/' elif [ "${WIN32}" -eq 1 ]; then diff --git a/local.env b/local.env index 4ecf0c6..fffc076 100644 --- a/local.env +++ b/local.env @@ -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 diff --git a/patches/Python/macos-10.15 b/patches/Python/macos-10.15 new file mode 120000 index 0000000..a8d0f9c --- /dev/null +++ b/patches/Python/macos-10.15 @@ -0,0 +1 @@ +macos \ No newline at end of file diff --git a/patches/Python/macos-universal-10.15 b/patches/Python/macos-universal-10.15 deleted file mode 120000 index 0687b17..0000000 --- a/patches/Python/macos-universal-10.15 +++ /dev/null @@ -1 +0,0 @@ -macos-universal \ No newline at end of file diff --git a/patches/artyfx/macos-10.15 b/patches/artyfx/macos-10.15 new file mode 120000 index 0000000..a8d0f9c --- /dev/null +++ b/patches/artyfx/macos-10.15 @@ -0,0 +1 @@ +macos \ No newline at end of file diff --git a/patches/artyfx/macos-universal-10.15 b/patches/artyfx/macos-universal-10.15 deleted file mode 120000 index 0687b17..0000000 --- a/patches/artyfx/macos-universal-10.15 +++ /dev/null @@ -1 +0,0 @@ -macos-universal \ No newline at end of file diff --git a/patches/cx_Freeze/macos-10.15 b/patches/cx_Freeze/macos-10.15 new file mode 120000 index 0000000..a8d0f9c --- /dev/null +++ b/patches/cx_Freeze/macos-10.15 @@ -0,0 +1 @@ +macos \ No newline at end of file diff --git a/patches/cx_Freeze/macos-universal b/patches/cx_Freeze/macos-universal new file mode 120000 index 0000000..a8d0f9c --- /dev/null +++ b/patches/cx_Freeze/macos-universal @@ -0,0 +1 @@ +macos \ No newline at end of file diff --git a/patches/cx_Freeze/macos-universal-10.15 b/patches/cx_Freeze/macos-universal-10.15 deleted file mode 120000 index 0687b17..0000000 --- a/patches/cx_Freeze/macos-universal-10.15 +++ /dev/null @@ -1 +0,0 @@ -macos-universal \ No newline at end of file diff --git a/patches/cx_Freeze/macos-universal/01_pawpaw-aetup.patch b/patches/cx_Freeze/macos/01_pawpaw-aetup.patch similarity index 100% rename from patches/cx_Freeze/macos-universal/01_pawpaw-aetup.patch rename to patches/cx_Freeze/macos/01_pawpaw-aetup.patch diff --git a/patches/db/macos-universal-10.15 b/patches/db/macos-universal-10.15 deleted file mode 120000 index 0687b17..0000000 --- a/patches/db/macos-universal-10.15 +++ /dev/null @@ -1 +0,0 @@ -macos-universal \ No newline at end of file diff --git a/patches/flac/macos-universal-10.15 b/patches/flac/macos-universal-10.15 deleted file mode 120000 index 0687b17..0000000 --- a/patches/flac/macos-universal-10.15 +++ /dev/null @@ -1 +0,0 @@ -macos-universal \ No newline at end of file diff --git a/patches/glib/macos-10.15 b/patches/glib/macos-10.15 new file mode 120000 index 0000000..a8d0f9c --- /dev/null +++ b/patches/glib/macos-10.15 @@ -0,0 +1 @@ +macos \ No newline at end of file diff --git a/patches/glib/macos-universal-10.15 b/patches/glib/macos-universal-10.15 deleted file mode 120000 index 0687b17..0000000 --- a/patches/glib/macos-universal-10.15 +++ /dev/null @@ -1 +0,0 @@ -macos-universal \ No newline at end of file diff --git a/patches/libsamplerate/macos-universal-10.15 b/patches/libsamplerate/macos-universal-10.15 deleted file mode 120000 index 0687b17..0000000 --- a/patches/libsamplerate/macos-universal-10.15 +++ /dev/null @@ -1 +0,0 @@ -macos-universal \ No newline at end of file diff --git a/patches/qtbase/macos-universal/01_force-10.12-universal-build.patch b/patches/qtbase/macos-10.15/01_force-10.12-universal-build.patch similarity index 100% rename from patches/qtbase/macos-universal/01_force-10.12-universal-build.patch rename to patches/qtbase/macos-10.15/01_force-10.12-universal-build.patch diff --git a/patches/qtbase/macos-universal/02_fix-12.0-build.patch b/patches/qtbase/macos-10.15/02_fix-12.0-build.patch similarity index 100% rename from patches/qtbase/macos-universal/02_fix-12.0-build.patch rename to patches/qtbase/macos-10.15/02_fix-12.0-build.patch diff --git a/patches/qtbase/macos-universal b/patches/qtbase/macos-universal new file mode 120000 index 0000000..09a260c --- /dev/null +++ b/patches/qtbase/macos-universal @@ -0,0 +1 @@ +macos-10.15 \ No newline at end of file diff --git a/patches/qtbase/macos-universal-10.15 b/patches/qtbase/macos-universal-10.15 deleted file mode 120000 index 0687b17..0000000 --- a/patches/qtbase/macos-universal-10.15 +++ /dev/null @@ -1 +0,0 @@ -macos-universal \ No newline at end of file diff --git a/setup/check_target.sh b/setup/check_target.sh index b946b7c..ed2dfaa 100644 --- a/setup/check_target.sh +++ b/setup/check_target.sh @@ -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 @@ -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 ;; @@ -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 diff --git a/setup/env.sh b/setup/env.sh index b1a88c5..167ce7c 100644 --- a/setup/env.sh +++ b/setup/env.sh @@ -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" @@ -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" diff --git a/setup/functions.sh b/setup/functions.sh index 97db89a..5325aa2 100644 --- a/setup/functions.sh +++ b/setup/functions.sh @@ -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" @@ -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 diff --git a/setup/versions.sh b/setup/versions.sh index bf7571a..98b7b49 100644 --- a/setup/versions.sh +++ b/setup/versions.sh @@ -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