]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
Set minimum macOS version to 10.14
authortobtoht <tob@featherwallet.org>
Tue, 10 Jan 2023 01:50:16 +0000 (02:50 +0100)
committertobtoht <tob@featherwallet.org>
Thu, 12 Jan 2023 14:13:03 +0000 (15:13 +0100)
contrib/depends/hosts/darwin.mk
contrib/depends/packages/qt.mk
contrib/depends/patches/qt/MacToolchain.cmake
contrib/depends/patches/qt/___isOSVersionAtLeast_hack.patch [deleted file]
contrib/depends/toolchain.cmake.in
contrib/macdeploy/Info.plist.in
contrib/macdeploy/README.md
contrib/macdeploy/gen-sdk
src/CMakeLists.txt

index 9415abc7822b54946f92e6bff4d1326d55897ed7..6ba716a8db843b897462ed54f49a80a08297be70 100644 (file)
@@ -1,4 +1,4 @@
-OSX_MIN_VERSION=10.15
+OSX_MIN_VERSION=10.14
 OSX_SDK_VERSION=11.0
 XCODE_VERSION=12.2
 XCODE_BUILD_ID=12B45b
index 11418d1a42426dff7317abd0d574cc4295cc2c24..a02758ad11811a7b48bd04b0e7399e4cb3e98a35 100644 (file)
@@ -263,7 +263,6 @@ define $(package)_preprocess_cmds
   patch -p1 -i $($(package)_patch_dir)/no_pthread_cond_clockwait.patch && \
   patch -p1 -i $($(package)_patch_dir)/windows_func_fix.patch && \
   patch -p1 -i $($(package)_patch_dir)/no_wraprt_on_apple.patch && \
-  patch -p1 -i $($(package)_patch_dir)/___isOSVersionAtLeast_hack.patch && \
   mv $($(package)_patch_dir)/WindowsToolchain.cmake . && \
   mv $($(package)_patch_dir)/MacToolchain.cmake . && \
   mv $($(package)_patch_dir)/aarch64Toolchain.cmake . && \
index ffb3a035f9c16e5064d987d1f361c2b63c0d4a45..15a53fa98d0c56da030a836639e90f7b34bd9d22 100644 (file)
@@ -10,8 +10,8 @@ set(CMAKE_C_COMPILER clang)
 set(CMAKE_CXX_COMPILER clang++)
 
 # TODO: don't hardcode this
-set(CMAKE_C_FLAGS "--target=x86_64-apple-darwin -mmacosx-version-min=10.15 -B/feather/contrib/depends/x86_64-apple-darwin/native/bin -mlinker-version=609 -isysroot/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers -Xclang -internal-externc-isystem/gnu/store/rwsysyzpxzwi7g1jv4hxwi3m8i36iwcc-clang-10.0.1/lib/clang/10.0.1/include -Xclang -internal-externc-isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include")
-set(CMAKE_CXX_FLAGS "--target=x86_64-apple-darwin -mmacosx-version-min=10.15 -B/feather/contrib/depends/x86_64-apple-darwin/native/bin -mlinker-version=609 -isysroot/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers -stdlib=libc++ -stdlib++-isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1 -isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1 -isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include -Xclang -internal-externc-isystem/gnu/store/rwsysyzpxzwi7g1jv4hxwi3m8i36iwcc-clang-10.0.1/lib/clang/10.0.1/include -Xclang -internal-externc-isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include")
+set(CMAKE_C_FLAGS "--target=x86_64-apple-darwin -mmacosx-version-min=10.14 -B/feather/contrib/depends/x86_64-apple-darwin/native/bin -mlinker-version=609 -isysroot/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers -Xclang -internal-externc-isystem/gnu/store/rwsysyzpxzwi7g1jv4hxwi3m8i36iwcc-clang-10.0.1/lib/clang/10.0.1/include -Xclang -internal-externc-isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include")
+set(CMAKE_CXX_FLAGS "--target=x86_64-apple-darwin -mmacosx-version-min=10.14 -B/feather/contrib/depends/x86_64-apple-darwin/native/bin -mlinker-version=609 -isysroot/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers -stdlib=libc++ -stdlib++-isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1 -isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1 -isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include -Xclang -internal-externc-isystem/gnu/store/rwsysyzpxzwi7g1jv4hxwi3m8i36iwcc-clang-10.0.1/lib/clang/10.0.1/include -Xclang -internal-externc-isystem/feather/contrib/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include")
 
 set(CMAKE_INSTALL_NAME_TOOL x86_64-apple-darwin-install_name_tool)
 set(CMAKE_FIND_ROOT_PATH /feather/contrib/depends/x86_64-apple-darwin/)
diff --git a/contrib/depends/patches/qt/___isOSVersionAtLeast_hack.patch b/contrib/depends/patches/qt/___isOSVersionAtLeast_hack.patch
deleted file mode 100644 (file)
index 02059dc..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-From 3a7a87074b8c1efd93b587e25a0790708f43dc17 Mon Sep 17 00:00:00 2001
-From: tobtoht <tob@featherwallet.org>
-Date: Sat, 26 Nov 2022 19:50:04 +0100
-Subject: [PATCH] don't use @available
-
----
- src/gui/rhi/qrhimetal.mm | 25 ++-----------------------
- 1 file changed, 2 insertions(+), 23 deletions(-)
-
-diff --git a/qtbase/src/gui/rhi/qrhimetal.mm b/qtbase/src/gui/rhi/qrhimetal.mm
-index bd761b4e15..deb584125c 100644
---- a/qtbase/src/gui/rhi/qrhimetal.mm
-+++ b/qtbase/src/gui/rhi/qrhimetal.mm
-@@ -2545,119 +2545,102 @@ static inline MTLPixelFormat toMetalTextureFormat(QRhiTexture::Format format, QR
- #else
-     case QRhiTexture::ETC2_RGB8:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatETC2_RGB8_sRGB : MTLPixelFormatETC2_RGB8;
-         }
-         qWarning("QRhiMetal: ETC2 compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ETC2_RGB8A1:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatETC2_RGB8A1_sRGB : MTLPixelFormatETC2_RGB8A1;
-         }
-         qWarning("QRhiMetal: ETC2 compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ETC2_RGBA8:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatEAC_RGBA8_sRGB : MTLPixelFormatEAC_RGBA8;
-         }
-         qWarning("QRhiMetal: ETC2 compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ASTC_4x4:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatASTC_4x4_sRGB : MTLPixelFormatASTC_4x4_LDR;
-         }
-         qWarning("QRhiMetal: ASTC compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ASTC_5x4:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatASTC_5x4_sRGB : MTLPixelFormatASTC_5x4_LDR;
-         }
-         qWarning("QRhiMetal: ASTC compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ASTC_5x5:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatASTC_5x5_sRGB : MTLPixelFormatASTC_5x5_LDR;
-         }
-         qWarning("QRhiMetal: ASTC compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ASTC_6x5:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatASTC_6x5_sRGB : MTLPixelFormatASTC_6x5_LDR;
-         }
-         qWarning("QRhiMetal: ASTC compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ASTC_6x6:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatASTC_6x6_sRGB : MTLPixelFormatASTC_6x6_LDR;
-         }
-         qWarning("QRhiMetal: ASTC compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ASTC_8x5:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatASTC_8x5_sRGB : MTLPixelFormatASTC_8x5_LDR;
-         }
-         qWarning("QRhiMetal: ASTC compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ASTC_8x6:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatASTC_8x6_sRGB : MTLPixelFormatASTC_8x6_LDR;
-         }
-         qWarning("QRhiMetal: ASTC compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ASTC_8x8:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatASTC_8x8_sRGB : MTLPixelFormatASTC_8x8_LDR;
-         }
-         qWarning("QRhiMetal: ASTC compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ASTC_10x5:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatASTC_10x5_sRGB : MTLPixelFormatASTC_10x5_LDR;
-         }
-         qWarning("QRhiMetal: ASTC compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ASTC_10x6:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatASTC_10x6_sRGB : MTLPixelFormatASTC_10x6_LDR;
-         }
-         qWarning("QRhiMetal: ASTC compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ASTC_10x8:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatASTC_10x8_sRGB : MTLPixelFormatASTC_10x8_LDR;
-         }
-         qWarning("QRhiMetal: ASTC compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ASTC_10x10:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatASTC_10x10_sRGB : MTLPixelFormatASTC_10x10_LDR;
-         }
-         qWarning("QRhiMetal: ASTC compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ASTC_12x10:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatASTC_12x10_sRGB : MTLPixelFormatASTC_12x10_LDR;
-         }
-         qWarning("QRhiMetal: ASTC compression not supported on this platform");
-         return MTLPixelFormatInvalid;
-     case QRhiTexture::ASTC_12x12:
-         if (d->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *))
-                 return srgb ? MTLPixelFormatASTC_12x12_sRGB : MTLPixelFormatASTC_12x12_LDR;
-         }
-         qWarning("QRhiMetal: ASTC compression not supported on this platform");
-@@ -2727,12 +2710,8 @@ bool QMetalRenderBuffer::create()
-     case DepthStencil:
- #ifdef Q_OS_MACOS
-         if (rhiD->caps.isAppleGPU) {
--            if (@available(macOS 11.0, *)) {
--                desc.storageMode = MTLStorageModeMemoryless;
--                d->format = MTLPixelFormatDepth32Float_Stencil8;
--            } else {
--                Q_UNREACHABLE();
--            }
-+            desc.storageMode = MTLStorageModeMemoryless;
-+            d->format = MTLPixelFormatDepth32Float_Stencil8;
-         } else {
-             desc.storageMode = MTLStorageModePrivate;
-             d->format = rhiD->d->dev.depth24Stencil8PixelFormatSupported
--- 
-2.38.1
-
index b5cff5881f96a046877c9d5029b0940d902b14bd..91c3322776ed60913e81d51f92378da021b37c1a 100644 (file)
@@ -112,7 +112,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
   SET(BREW OFF)
   SET(PORT OFF)
   SET(CMAKE_OSX_SYSROOT "@prefix@/../SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/")
-  SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")
+  SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.14")
   SET(CMAKE_CXX_STANDARD 14)
   SET(LLVM_ENABLE_PIC OFF)
   SET(LLVM_ENABLE_PIE OFF)
index c3e4f24d300835d88bfe71de06e234711d0678a0..03d82fa72651346573a815a0d5767b043211f4c1 100644 (file)
@@ -3,7 +3,7 @@
 <plist version="0.9">
 <dict>
   <key>LSMinimumSystemVersion</key>
-  <string>10.15.0</string>
+  <string>10.14.0</string>
 
   <key>LSArchitecturePriority</key>
   <array>
index 599a0bfa6ce497342a5b8008863bdddefb8df55f..82ee4f2da0493186fac43693519e6c14ea729384 100644 (file)
@@ -24,7 +24,7 @@ and search for [`Xcode 12.2`](https://developer.apple.com/download/all/?q=Xcode%
 
 An Apple ID and cookies enabled for the hostname are needed to download this.
 
-The `sha256sum` of the downloaded XIP archive should be `28d352f8c14a43d9b8a082ac6338dc173cb153f964c6e8fb6ba389e5be528bd0`.
+The `sha256sum` of the downloaded XIP archive should be `332477876917786b26dd7c3fc1665d2c5cdca81c72755e6a9754f308de77d33b`.
 
 After Xcode version 7.x, Apple started shipping the `Xcode.app` in a `.xip`
 archive. This makes the SDK less-trivial to extract on non-macOS machines. One
index 6efaaccb8e16b0d05994b9411aa29d20133b3079..e93a3eabf2902d8c12779795cd23aed55fe66c33 100755 (executable)
@@ -60,6 +60,8 @@ def run():
         sdk_build_id = pl['ProductBuildVersion']
     print("Found MacOSX SDK (version: {sdk_version}, build id: {sdk_build_id})".format(sdk_version=sdk_version, sdk_build_id=sdk_build_id))
 
+    clang_rt = xcode_app.joinpath("Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin")
+
     out_name = "Xcode-{xcode_version}-{xcode_build_id}-extracted-SDK-with-libcxx-headers".format(xcode_version=xcode_version, xcode_build_id=xcode_build_id)
 
     xcode_libcxx_dir = xcode_app.joinpath("Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1")
@@ -109,6 +111,8 @@ def run():
                 tarfp_add_with_base_change(tarfp, sdk_dir, out_name)
                 print("Adding libc++ headers...")
                 tarfp_add_with_base_change(tarfp, xcode_libcxx_dir, "{}/usr/include/c++/v1".format(out_name))
+                print("Adding clang_rt libraries")
+                tarfp_add_with_base_change(tarfp, clang_rt, "{}/lib/darwin".format(out_name))
     print("Done! Find the resulting gzipped tarball at:")
     print(out_sdktgz_path.resolve())
 
index dac430dc68b1cc4424f2f9dc682bbde57f6c4fee..59014fcf7cd3114f217eab5814802a3309480ab0 100644 (file)
@@ -284,6 +284,12 @@ if(STATIC AND NOT Qt6_FOUND)
     endif()
 endif()
 
+if(DEPENDS AND APPLE)
+    # TODO: Needed for ___isOSVersionAtLeast
+    target_link_libraries(feather
+            ${CMAKE_OSX_SYSROOT}/lib/darwin/libclang_rt.osx.a)
+endif()
+
 install(TARGETS feather
         DESTINATION ${CMAKE_INSTALL_PREFIX}
 )