diff options
author | phunkyfish <phunkyfish@gmail.com> | 2020-02-04 16:46:44 +0000 |
---|---|---|
committer | phunkyfish <phunkyfish@gmail.com> | 2020-02-05 08:54:03 +0000 |
commit | 33610d657297543e7ca719d3c9b65f483a573f90 (patch) | |
tree | e927074eb3793fd39cf7ef09452ff99a97d4e251 | |
parent | 3c3bb43feac3da359e83d37919aca83a6c2fbc5f (diff) |
[macosx] set minimum osx version to 10.13 (High Sierra), fix deprecations and cleanup dependencies
-rw-r--r-- | cmake/scripts/osx/ArchSetup.cmake | 2 | ||||
-rw-r--r-- | docs/README.iOS.md | 3 | ||||
-rw-r--r-- | docs/README.macOS.md | 8 | ||||
-rw-r--r-- | docs/README.tvOS.md | 1 | ||||
-rw-r--r-- | tools/depends/configure.ac | 6 | ||||
-rw-r--r-- | tools/depends/native/config.site.native.in | 13 | ||||
-rw-r--r-- | tools/depends/native/tar/Makefile | 2 | ||||
-rw-r--r-- | tools/depends/target/config-binaddons.site.in | 11 | ||||
-rw-r--r-- | tools/depends/target/config.site.in | 13 | ||||
-rw-r--r-- | tools/depends/target/curl/Makefile | 2 | ||||
-rw-r--r-- | tools/depends/target/gnutls/02-darwin-getentropy.patch | 19 | ||||
-rw-r--r-- | tools/depends/target/gnutls/Makefile | 4 | ||||
-rw-r--r-- | tools/depends/target/gnutls/remove-weak_import-check-for-osx.patch | 17 | ||||
-rw-r--r-- | tools/depends/target/samba-gplv3/Makefile | 4 | ||||
-rw-r--r-- | xbmc/platform/darwin/osx/SDLMain.mm | 8 | ||||
-rw-r--r-- | xbmc/platform/darwin/osx/smc.c | 9 | ||||
-rw-r--r-- | xbmc/threads/platform/pthreads/ThreadImpl.cpp | 2 | ||||
-rw-r--r-- | xbmc/utils/SystemInfo.cpp | 8 |
18 files changed, 14 insertions, 118 deletions
diff --git a/cmake/scripts/osx/ArchSetup.cmake b/cmake/scripts/osx/ArchSetup.cmake index 6b185aed00..7d8f58bc43 100644 --- a/cmake/scripts/osx/ArchSetup.cmake +++ b/cmake/scripts/osx/ArchSetup.cmake @@ -35,7 +35,7 @@ list(APPEND DEPLIBS "-framework DiskArbitration" "-framework IOKit" "-framework CoreGraphics" "-framework CoreMedia" "-framework VideoToolbox" "-framework Security") -set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9) +set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13) set(CMAKE_XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME OFF) include(cmake/scripts/darwin/Macros.cmake) diff --git a/docs/README.iOS.md b/docs/README.iOS.md index f6e235d8fa..0cff5ced38 100644 --- a/docs/README.iOS.md +++ b/docs/README.iOS.md @@ -55,9 +55,6 @@ Several different strategies are used to draw your attention to certain pieces o * Device with **iOS 9.0 or newer** to install Kodi after build. Building for iOS should work with the following constellations of Xcode and macOS versions: - * Xcode 8.x against iOS SDK 10.x on 10.11.x (El Capitan)(recommended) - * Xcode 8.x against iOS SDK 10.x on 10.12.x (Sierra)(recommended) - * Xcode 9.x against iOS SDK 11.x on 10.12.x (Sierra) * Xcode 9.x against iOS SDK 11.x on 10.13.x (High Sierra)(recommended) **WARNING:** Start Xcode after installation finishes. You need to accept the licenses and install missing components. diff --git a/docs/README.macOS.md b/docs/README.macOS.md index b32dd404b1..6cf9693752 100644 --- a/docs/README.macOS.md +++ b/docs/README.macOS.md @@ -55,11 +55,9 @@ Several different strategies are used to draw your attention to certain pieces o ## 2. Prerequisites * **[Java Development Kit (JDK)](http://www.oracle.com/technetwork/java/javase/downloads/index.html)** * **[Xcode](https://developer.apple.com/xcode/)**. Install it from the AppStore or from the **[Apple Developer Homepage](https://developer.apple.com/)**. -* Device with **OSX 10.9 or newer** to run Kodi after build. +* Device with **OSX 10.13 or newer** to run Kodi after build. Building for OSX/macOS should work with the following constellations of Xcode and OSX/macOS versions: - * Xcode 8.x on OSX 10.11.x (El Capitan) - * Xcode 9.x on OSX 10.12.x (Sierra) * Xcode 9.x on macOS 10.13.x (High Sierra) **WARNING:** Start Xcode after installation finishes. You need to accept the licenses and install missing components. @@ -107,9 +105,9 @@ make -j$(getconf _NPROCESSORS_ONLN) **WARNING:** Look for the `Dependencies built successfully.` success message. If in doubt run a single threaded `make` command until the message appears. If the single make fails, clean the specific library by issuing `make -C target/<name_of_failed_lib> distclean` and run `make`again. -**NOTE:** **Advanced developers** may want to specify an SDK version (if multiple versions are installed) in the configure line(s) shown above. The example below would use SDK 10.9: +**NOTE:** **Advanced developers** may want to specify an SDK version (if multiple versions are installed) in the configure line(s) shown above. The example below would use SDK 10.13: ``` -./configure --host=x86_64-apple-darwin --with-sdk=10.9 +./configure --host=x86_64-apple-darwin --with-sdk=10.13 ``` **[back to top](#table-of-contents)** | **[back to section top](#4-configure-and-build-tools-and-dependencies)** diff --git a/docs/README.tvOS.md b/docs/README.tvOS.md index a2beb42bba..90fddc3acc 100644 --- a/docs/README.tvOS.md +++ b/docs/README.tvOS.md @@ -63,7 +63,6 @@ Several different strategies are used to draw your attention to certain pieces o * Device with **tvOS 11.0 or newer** to install Kodi after build. Building for tvOS should work with the following combinations of Xcode and macOS versions: - * Xcode 9.x against tvOS SDK 11.x on 10.12.x (Sierra) * Xcode 9.x against tvOS SDK 11.x on 10.13.x (High Sierra)(recommended) * Xcode 9.x against tvOS SDK 11.x on 10.14.x (Mojave)(recommended) * Xcode 10.x against tvOS SDK 12.x on 10.14.x (Mojave)(recommended) diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac index 2c74c3b086..e2eced13d8 100644 --- a/tools/depends/configure.ac +++ b/tools/depends/configure.ac @@ -340,10 +340,6 @@ case $host in # now that we know which sdk, error check sdk_name case $use_sdk in - 10.9);; - 10.10);; - 10.11);; - 10.12);; 10.13);; 10.14);; 10.15);; @@ -351,7 +347,7 @@ case $host in AC_MSG_ERROR(error in configure of --with-sdk=$use_sdk) esac sdk_name=$target_platform$use_sdk - platform_min_version="macosx-version-min=10.9" + platform_min_version="macosx-version-min=10.13" use_sdk_path=[`$use_xcodebuild -version -sdk $sdk_name Path`] platform_os="osx" diff --git a/tools/depends/native/config.site.native.in b/tools/depends/native/config.site.native.in index deef5955d3..1510792b8f 100644 --- a/tools/depends/native/config.site.native.in +++ b/tools/depends/native/config.site.native.in @@ -24,16 +24,3 @@ fi LD_LIBRARY_PATH=@prefix@/@tool_dir@/lib:$LD_LIBRARY_PATH NASM=@prefix@/@tool_dir@/bin/yasm - -if test "@build_os@" = "osx" ; then - # Xcode 8 + 10.11, clock_gettime and getentropy is present - # in 10.12 but will get wrongly detected if building on 10.11 - ac_cv_search_clock_gettime=no - ac_cv_func_clock_gettime=no - ac_cv_func_getentropy=no - ac_cv_func_futimes=no - ac_cv_func_futimesat=no - ac_cv_func_futimens=no - ac_cv_func_utimensat=no -fi - diff --git a/tools/depends/native/tar/Makefile b/tools/depends/native/tar/Makefile index 8ba0fc615b..1341a7f424 100644 --- a/tools/depends/native/tar/Makefile +++ b/tools/depends/native/tar/Makefile @@ -11,7 +11,7 @@ ARCHIVE=$(SOURCE).tar.gz ifeq ($(NATIVE_OS),osx) # https://openradar.appspot.com/radar?id=6160634819379200 -PLATFORM_CONFIGURE=gl_cv_func_getcwd_abort_bug=no ac_cv_func_futimens=no ac_cv_func_utimensat=no +PLATFORM_CONFIGURE=gl_cv_func_getcwd_abort_bug=no endif export LIBTOOL=builds/unix/libtool diff --git a/tools/depends/target/config-binaddons.site.in b/tools/depends/target/config-binaddons.site.in index 7587a49be2..8958057778 100644 --- a/tools/depends/target/config-binaddons.site.in +++ b/tools/depends/target/config-binaddons.site.in @@ -68,18 +68,7 @@ if test "@platform_os@" = "android"; then fi -if test "@platform_os@" = "osx" ; then - # Xcode 8 + 10.11, clock_gettime getentropy is present - # in 10.12 but will get wrongly detected if building on 10.11 - ac_cv_search_clock_gettime=no - ac_cv_func_clock_gettime=no - ac_cv_func_getentropy=no -fi - - if test "@platform_os@" = "darwin_embedded"; then - # Xcode 8 + 10.11, clock_gettime getentropy is present - # in 10.12 but will get wrongly detected if building on 10.11 ac_cv_search_clock_gettime=no ac_cv_func_clock_gettime=no ac_cv_func_getentropy=no diff --git a/tools/depends/target/config.site.in b/tools/depends/target/config.site.in index f9260d15e1..734776a69b 100644 --- a/tools/depends/target/config.site.in +++ b/tools/depends/target/config.site.in @@ -80,20 +80,7 @@ if test "@platform_os@" = "android"; then fi -if test "@platform_os@" = "osx" ; then - # Xcode 8 + 10.11, clock_gettime and getentropy is present - # in 10.12 but will get wrongly detected if building on 10.11 - ac_cv_search_clock_gettime=no - ac_cv_func_clock_gettime=no - ac_cv_func_futimens=no - ac_cv_func_getentropy=no - ac_cv_func_utimensat=no -fi - - if test "@platform_os@" = "darwin_embedded"; then - # Xcode 8 + 10.11, clock_gettime and getentropy is present - # in 10.12 but will get wrongly detected if building on 10.11 ac_cv_search_clock_gettime=no ac_cv_func_clock_gettime=no ac_cv_func_clock_settime=no diff --git a/tools/depends/target/curl/Makefile b/tools/depends/target/curl/Makefile index 2fc397b8a2..abfa6bd03b 100644 --- a/tools/depends/target/curl/Makefile +++ b/tools/depends/target/curl/Makefile @@ -22,7 +22,7 @@ $(TARBALLS_LOCATION)/$(ARCHIVE): $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) -ifeq (darwin, $(findstring darwin, $(HOST))) +ifeq ($(TARGET_PLATFORM), iphoneos) cd $(PLATFORM); sed -ie "s/elif defined(HAVE_CLOCK_GETTIME_MONOTONIC)/#elif defined(HAVE_CLOCK_GETTIME_MONOTONIC_NOPE)/" lib/timeval.c endif cd $(PLATFORM); $(AUTORECONF) -vif diff --git a/tools/depends/target/gnutls/02-darwin-getentropy.patch b/tools/depends/target/gnutls/02-darwin-getentropy.patch deleted file mode 100644 index 80ddd9d43a..0000000000 --- a/tools/depends/target/gnutls/02-darwin-getentropy.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -Naur a/configure.ac b/configure.ac ---- a/configure.ac 2019-12-02 08:32:16.000000000 -0800 -+++ b/configure.ac 2020-01-31 10:25:36.473631501 -0800 -@@ -278,6 +278,7 @@ - - AM_CONDITIONAL(HAVE_KERN_ARND, test "$rnd_variant" = "kern_arnd") - -+if test "x$have_macosx" != "xyes"; then - AC_MSG_CHECKING([for getentropy]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([ - #include <unistd.h> -@@ -294,6 +295,7 @@ - AC_DEFINE([HAVE_GETENTROPY], 1, [Enable the OpenBSD getentropy function]) - rnd_variant=getentropy], - [AC_MSG_RESULT(no)]) -+fi - - AM_CONDITIONAL(HAVE_GETENTROPY, test "$rnd_variant" = "getentropy") - diff --git a/tools/depends/target/gnutls/Makefile b/tools/depends/target/gnutls/Makefile index 82a91cd764..8bea0c5f2a 100644 --- a/tools/depends/target/gnutls/Makefile +++ b/tools/depends/target/gnutls/Makefile @@ -1,5 +1,5 @@ include ../../Makefile.include -DEPS= ../../Makefile.include Makefile size-max.patch 02-darwin-getentropy.patch remove-weak_import-check-for-osx.patch add-dl-as-private-lib.patch +DEPS= ../../Makefile.include Makefile size-max.patch add-dl-as-private-lib.patch # lib name, version LIBNAME=gnutls @@ -30,8 +30,6 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) cd $(PLATFORM); patch -p1 -i ../size-max.patch - cd $(PLATFORM); patch -p1 -i ../02-darwin-getentropy.patch - cd $(PLATFORM); patch -p1 -i ../remove-weak_import-check-for-osx.patch cd $(PLATFORM); patch -p1 -i ../add-dl-as-private-lib.patch cd $(PLATFORM); $(AUTORECONF) -vif cd $(PLATFORM); $(CONFIGURE) diff --git a/tools/depends/target/gnutls/remove-weak_import-check-for-osx.patch b/tools/depends/target/gnutls/remove-weak_import-check-for-osx.patch deleted file mode 100644 index ec2b3b0a83..0000000000 --- a/tools/depends/target/gnutls/remove-weak_import-check-for-osx.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/configure.ac 2020-01-25 08:26:59.223068640 -0800 -+++ b/configure.ac 2020-01-25 08:26:38.846233553 -0800 -@@ -122,14 +122,6 @@ - ;; - *darwin*) - have_macosx=yes -- save_LDFLAGS="$LDFLAGS" -- dnl Try to use -no_weak_imports if available. This makes sure we -- dnl error out when linking to a function that doesn't exist in the -- dnl intended minimum runtime version. -- LDFLAGS="$LDFLAGS -Wl,-no_weak_imports" -- AC_MSG_CHECKING([whether the linker supports -Wl,-no_weak_imports]) -- AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], -- [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); LDFLAGS="$save_LDFLAGS"]) - ;; - *solaris*) - have_elf=yes diff --git a/tools/depends/target/samba-gplv3/Makefile b/tools/depends/target/samba-gplv3/Makefile index d046c25695..71a0e8ecdf 100644 --- a/tools/depends/target/samba-gplv3/Makefile +++ b/tools/depends/target/samba-gplv3/Makefile @@ -51,14 +51,12 @@ ifeq ($(OS), darwin_embedded) cd $(PLATFORM); patch -p1 -i ../crt_extensions.patch endif cd $(PLATFORM); $(CONFIGURE) -ifeq (darwin, $(findstring darwin, $(HOST))) -ifneq ($(TARGET_PLATFORM),appletvos) +ifeq ($(TARGET_PLATFORM), iphoneos) # clock_gettime is only available since macOS 10.12, iOS 10.0 and tvOS 10.0 # build sytem doesn't include time.h for the check, # so the version guards have no effect sed -ie -E "s/#define (HAVE_(CLOCK_GETTIME|CLOCK_MONOTONIC|CLOCK_PROCESS_CPUTIME_ID|CLOCK_REALTIME)) 1/\/* #undef \1 *\//g" $(PLATFORM)/bin/default/include/config.h endif -endif $(LIBDYLIB): $(PLATFORM) cd $(PLATFORM); WAF_MAKE=1 ./buildtools/bin/waf --targets=smbclient diff --git a/xbmc/platform/darwin/osx/SDLMain.mm b/xbmc/platform/darwin/osx/SDLMain.mm index ff8d6ee370..c3b81c51ec 100644 --- a/xbmc/platform/darwin/osx/SDLMain.mm +++ b/xbmc/platform/darwin/osx/SDLMain.mm @@ -85,7 +85,7 @@ static void setupApplicationMenu(void) [appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"]; menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"]; - [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)]; + [menuItem setKeyEquivalentModifierMask:(NSEventModifierFlagOption|NSEventModifierFlagCommand)]; [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""]; @@ -191,8 +191,8 @@ static void setupWindowMenu(void) - (void)titlebarToggle:(id)sender { NSWindow* window = [[[NSOpenGLContext currentContext] view] window]; - [window setStyleMask: [window styleMask] ^ NSTitledWindowMask ]; - BOOL isSet = [window styleMask] & NSTitledWindowMask; + [window setStyleMask: [window styleMask] ^ NSWindowStyleMaskTitled ]; + BOOL isSet = [window styleMask] & NSWindowStyleMaskTitled; [window setMovableByWindowBackground: !isSet]; [sender setState: isSet]; @@ -331,7 +331,7 @@ static void setupWindowMenu(void) //post a NOP event, so the run loop actually stops //see http://www.cocoabuilder.com/archive/cocoa/219842-nsapp-stop.html - NSEvent* event = [NSEvent otherEventWithType: NSApplicationDefined + NSEvent* event = [NSEvent otherEventWithType: NSEventTypeApplicationDefined location: NSMakePoint(0,0) modifierFlags: 0 timestamp: 0.0 diff --git a/xbmc/platform/darwin/osx/smc.c b/xbmc/platform/darwin/osx/smc.c index bfd678608d..7916f7ba2d 100644 --- a/xbmc/platform/darwin/osx/smc.c +++ b/xbmc/platform/darwin/osx/smc.c @@ -89,20 +89,11 @@ kern_return_t SMCCall(int index, SMCKeyData_t *inputStructure, SMCKeyData_t *out structureInputSize = sizeof(SMCKeyData_t); structureOutputSize = sizeof(SMCKeyData_t); -#if MAC_OS_X_VERSION_10_5 return IOConnectCallStructMethod( conn, index, // inputStructure inputStructure, structureInputSize, // outputStructure outputStructure, &structureOutputSize ); -#else - return IOConnectMethodStructureIStructureO( conn, index, - structureInputSize, /* structureInputSize */ - &structureOutputSize, /* structureOutputSize */ - inputStructure, /* inputStructure */ - outputStructure); /* outputStructure */ -#endif - } kern_return_t SMCReadKey(UInt32ConstChar_t key, SMCVal_t *val) diff --git a/xbmc/threads/platform/pthreads/ThreadImpl.cpp b/xbmc/threads/platform/pthreads/ThreadImpl.cpp index 58d9945ff0..8f6e661219 100644 --- a/xbmc/threads/platform/pthreads/ThreadImpl.cpp +++ b/xbmc/threads/platform/pthreads/ThreadImpl.cpp @@ -59,7 +59,7 @@ static pid_t GetCurrentThreadPid_() return pthread_getthreadid_np(); #elif defined(TARGET_ANDROID) return gettid(); -#elif TARGET_DARWIN_TVOS +#elif TARGET_DARWIN return pthread_mach_thread_np(pthread_self()); #else return syscall(SYS_gettid); diff --git a/xbmc/utils/SystemInfo.cpp b/xbmc/utils/SystemInfo.cpp index f7353e79d8..6a5d2c286b 100644 --- a/xbmc/utils/SystemInfo.cpp +++ b/xbmc/utils/SystemInfo.cpp @@ -1250,19 +1250,11 @@ std::string CSysInfo::GetBuildTargetPlatformVersion(void) std::string CSysInfo::GetBuildTargetPlatformVersionDecoded(void) { #if defined(TARGET_DARWIN_OSX) -#if defined(MAC_OS_X_VERSION_10_10) && __MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 if (__MAC_OS_X_VERSION_MIN_REQUIRED % 10) return StringUtils::Format("version %d.%d", (__MAC_OS_X_VERSION_MIN_REQUIRED / 1000) % 100, (__MAC_OS_X_VERSION_MIN_REQUIRED / 10) % 100); else return StringUtils::Format("version %d.%d.%d", (__MAC_OS_X_VERSION_MIN_REQUIRED / 1000) % 100, (__MAC_OS_X_VERSION_MIN_REQUIRED / 10) % 100, __MAC_OS_X_VERSION_MIN_REQUIRED % 10); -#else // defined(MAC_OS_X_VERSION_10_10) && __MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 - if (__MAC_OS_X_VERSION_MIN_REQUIRED % 10) - return StringUtils::Format("version %d.%d", (__MAC_OS_X_VERSION_MIN_REQUIRED / 100) % 100, (__MAC_OS_X_VERSION_MIN_REQUIRED / 10) % 10); - else - return StringUtils::Format("version %d.%d.%d", (__MAC_OS_X_VERSION_MIN_REQUIRED / 100) % 100, - (__MAC_OS_X_VERSION_MIN_REQUIRED / 10) % 10, __MAC_OS_X_VERSION_MIN_REQUIRED % 10); -#endif // defined(MAC_OS_X_VERSION_10_10) && __MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 #elif defined(TARGET_DARWIN_EMBEDDED) std::string versionStr = GetBuildTargetPlatformVersion(); static const int major = (std::stoi(versionStr) / 10000) % 100; |