forked from mirrors/nixpkgs
293 lines
12 KiB
Diff
293 lines
12 KiB
Diff
diff -u -r qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/default_post.prf qtbase-opensource-src-5.9.2/mkspecs/features/mac/default_post.prf
|
|
--- qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/default_post.prf 2017-10-14 12:31:04.000000000 +0800
|
|
+++ qtbase-opensource-src-5.9.2/mkspecs/features/mac/default_post.prf 2017-10-14 12:42:02.000000000 +0800
|
|
@@ -24,166 +24,3 @@
|
|
}
|
|
}
|
|
}
|
|
-
|
|
-# Add the same default rpaths as Xcode does for new projects.
|
|
-# This is especially important for iOS/tvOS/watchOS where no other option is possible.
|
|
-!no_default_rpath {
|
|
- QMAKE_RPATHDIR += @executable_path/Frameworks
|
|
- equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks
|
|
-}
|
|
-
|
|
-# Don't pass -headerpad_max_install_names when using Bitcode.
|
|
-# In that case the linker emits a warning stating that the flag is ignored when
|
|
-# used with bitcode, for reasons that cannot be determined (rdar://problem/20748962).
|
|
-# Using this flag is also unnecessary in practice on UIKit platforms since they
|
|
-# are sandboxed, and only UIKit platforms support bitcode to begin with.
|
|
-!bitcode: QMAKE_LFLAGS += $$QMAKE_LFLAGS_HEADERPAD
|
|
-
|
|
-app_extension_api_only {
|
|
- QMAKE_CFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
|
|
- QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
|
|
- QMAKE_CXXFLAGS_PRECOMPILE += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
|
|
- QMAKE_LFLAGS += $$QMAKE_CFLAGS_APPLICATION_EXTENSION
|
|
-}
|
|
-
|
|
-macx-xcode {
|
|
- !isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) {
|
|
- debug_information_format.name = DEBUG_INFORMATION_FORMAT
|
|
- debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT
|
|
- debug_information_format.build = debug
|
|
- QMAKE_MAC_XCODE_SETTINGS += debug_information_format
|
|
- }
|
|
-
|
|
- QMAKE_XCODE_ARCHS =
|
|
-
|
|
- arch_device.name = "ARCHS[sdk=$${device.sdk}*]"
|
|
- arch_device.value = $$QMAKE_APPLE_DEVICE_ARCHS
|
|
- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_DEVICE_ARCHS
|
|
- QMAKE_MAC_XCODE_SETTINGS += arch_device
|
|
-
|
|
- simulator {
|
|
- arch_simulator.name = "ARCHS[sdk=$${simulator.sdk}*]"
|
|
- arch_simulator.value = $$QMAKE_APPLE_SIMULATOR_ARCHS
|
|
- QMAKE_XCODE_ARCHS += $$QMAKE_APPLE_SIMULATOR_ARCHS
|
|
- QMAKE_MAC_XCODE_SETTINGS += arch_simulator
|
|
- }
|
|
-
|
|
- only_active_arch.name = ONLY_ACTIVE_ARCH
|
|
- only_active_arch.value = YES
|
|
- only_active_arch.build = debug
|
|
- QMAKE_MAC_XCODE_SETTINGS += only_active_arch
|
|
-} else {
|
|
- device|!simulator: VALID_DEVICE_ARCHS = $$QMAKE_APPLE_DEVICE_ARCHS
|
|
- simulator: VALID_SIMULATOR_ARCHS = $$QMAKE_APPLE_SIMULATOR_ARCHS
|
|
- VALID_ARCHS = $$VALID_DEVICE_ARCHS $$VALID_SIMULATOR_ARCHS
|
|
-
|
|
- isEmpty(VALID_ARCHS): \
|
|
- error("QMAKE_APPLE_DEVICE_ARCHS or QMAKE_APPLE_SIMULATOR_ARCHS must contain at least one architecture")
|
|
-
|
|
- single_arch: VALID_ARCHS = $$first(VALID_ARCHS)
|
|
-
|
|
- ACTIVE_ARCHS = $(filter $(EXPORT_VALID_ARCHS), $(ARCHS))
|
|
- ARCH_ARGS = $(foreach arch, $(if $(EXPORT_ACTIVE_ARCHS), $(EXPORT_ACTIVE_ARCHS), $(EXPORT_VALID_ARCHS)), -arch $(arch))
|
|
-
|
|
- QMAKE_EXTRA_VARIABLES += VALID_ARCHS ACTIVE_ARCHS ARCH_ARGS
|
|
-
|
|
- arch_flags = $(EXPORT_ARCH_ARGS)
|
|
-
|
|
- QMAKE_CFLAGS += $$arch_flags
|
|
- QMAKE_CXXFLAGS += $$arch_flags
|
|
- QMAKE_LFLAGS += $$arch_flags
|
|
-
|
|
- QMAKE_PCH_ARCHS = $$VALID_ARCHS
|
|
-
|
|
- macos: deployment_target = $$QMAKE_MACOSX_DEPLOYMENT_TARGET
|
|
- ios: deployment_target = $$QMAKE_IOS_DEPLOYMENT_TARGET
|
|
- tvos: deployment_target = $$QMAKE_TVOS_DEPLOYMENT_TARGET
|
|
- watchos: deployment_target = $$QMAKE_WATCHOS_DEPLOYMENT_TARGET
|
|
-
|
|
- # If we're doing a simulator and device build, device and simulator
|
|
- # architectures use different paths and flags for the sysroot and
|
|
- # deployment target switch, so we must multiplex them across multiple
|
|
- # architectures using -Xarch. Otherwise we fall back to the simple path.
|
|
- # This is not strictly necessary, but results in cleaner command lines
|
|
- # and makes it easier for people to override EXPORT_VALID_ARCHS to limit
|
|
- # individual rules to a different set of architecture(s) from the overall
|
|
- # build (such as machtest in QtCore).
|
|
- simulator:device {
|
|
- QMAKE_XARCH_CFLAGS =
|
|
- QMAKE_XARCH_LFLAGS =
|
|
- QMAKE_EXTRA_VARIABLES += QMAKE_XARCH_CFLAGS QMAKE_XARCH_LFLAGS
|
|
-
|
|
- for (arch, VALID_ARCHS) {
|
|
- contains(VALID_SIMULATOR_ARCHS, $$arch) {
|
|
- sdk = $$simulator.sdk
|
|
- version_identifier = $$simulator.deployment_identifier
|
|
- } else {
|
|
- sdk = $$device.sdk
|
|
- version_identifier = $$device.deployment_identifier
|
|
- }
|
|
-
|
|
- version_min_flags = \
|
|
- -Xarch_$${arch} \
|
|
- -m$${version_identifier}-version-min=$$deployment_target
|
|
- QMAKE_XARCH_CFLAGS_$${arch} = $$version_min_flags \
|
|
- -Xarch_$${arch} \
|
|
- -isysroot$$xcodeSDKInfo(Path, $$sdk)
|
|
- QMAKE_XARCH_LFLAGS_$${arch} = $$version_min_flags \
|
|
- -Xarch_$${arch} \
|
|
- -Wl,-syslibroot,$$xcodeSDKInfo(Path, $$sdk)
|
|
-
|
|
- QMAKE_XARCH_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS_$${arch})
|
|
- QMAKE_XARCH_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS_$${arch})
|
|
-
|
|
- QMAKE_EXTRA_VARIABLES += \
|
|
- QMAKE_XARCH_CFLAGS_$${arch} \
|
|
- QMAKE_XARCH_LFLAGS_$${arch}
|
|
- }
|
|
-
|
|
- QMAKE_CFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
|
|
- QMAKE_CXXFLAGS += $(EXPORT_QMAKE_XARCH_CFLAGS)
|
|
- QMAKE_LFLAGS += $(EXPORT_QMAKE_XARCH_LFLAGS)
|
|
- } else {
|
|
- simulator: \
|
|
- version_identifier = $$simulator.deployment_identifier
|
|
- else: \
|
|
- version_identifier = $$device.deployment_identifier
|
|
- version_min_flag = -m$${version_identifier}-version-min=$$deployment_target
|
|
- QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag
|
|
- QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH $$version_min_flag
|
|
- QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK_PATH $$version_min_flag
|
|
- }
|
|
-
|
|
- # Enable precompiled headers for multiple architectures
|
|
- QMAKE_CFLAGS_USE_PRECOMPILE =
|
|
- for (arch, VALID_ARCHS) {
|
|
- icc_pch_style: \
|
|
- use_flag = "-pch-use "
|
|
- else: \
|
|
- use_flag = -include
|
|
-
|
|
- # Only use Xarch with multi-arch, as the option confuses ccache
|
|
- count(VALID_ARCHS, 1, greaterThan): \
|
|
- QMAKE_CFLAGS_USE_PRECOMPILE += \
|
|
- -Xarch_$${arch}
|
|
-
|
|
- QMAKE_CFLAGS_USE_PRECOMPILE += \
|
|
- $${use_flag}${QMAKE_PCH_OUTPUT_$${arch}}
|
|
- }
|
|
- icc_pch_style {
|
|
- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE -include ${QMAKE_PCH_INPUT}
|
|
- QMAKE_CFLAGS_USE_PRECOMPILE =
|
|
- } else {
|
|
- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
|
|
- QMAKE_OBJCFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
|
|
- QMAKE_OBJCXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
|
|
- }
|
|
-
|
|
- QMAKE_PCH_OUTPUT_EXT = _${QMAKE_PCH_ARCH}$${QMAKE_PCH_OUTPUT_EXT}
|
|
-}
|
|
-
|
|
-cache(QMAKE_XCODE_DEVELOPER_PATH, stash)
|
|
-!isEmpty(QMAKE_XCODE_VERSION): \
|
|
- cache(QMAKE_XCODE_VERSION, stash)
|
|
-
|
|
-QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix()
|
|
diff -u -r qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/default_pre.prf qtbase-opensource-src-5.9.2/mkspecs/features/mac/default_pre.prf
|
|
--- qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/default_pre.prf 2017-10-14 12:31:04.000000000 +0800
|
|
+++ qtbase-opensource-src-5.9.2/mkspecs/features/mac/default_pre.prf 2017-10-14 12:42:02.000000000 +0800
|
|
@@ -1,56 +1,2 @@
|
|
CONFIG = asset_catalogs rez $$CONFIG
|
|
load(default_pre)
|
|
-
|
|
-isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
|
|
- # Get path of Xcode's Developer directory
|
|
- QMAKE_XCODE_DEVELOPER_PATH = $$system("/usr/bin/xcode-select --print-path 2>/dev/null")
|
|
- isEmpty(QMAKE_XCODE_DEVELOPER_PATH): \
|
|
- error("Xcode path is not set. Please use xcode-select to choose Xcode installation path.")
|
|
-
|
|
- # Make sure Xcode path is valid
|
|
- !exists($$QMAKE_XCODE_DEVELOPER_PATH): \
|
|
- error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.")
|
|
-}
|
|
-
|
|
-isEmpty(QMAKE_XCODEBUILD_PATH): \
|
|
- QMAKE_XCODEBUILD_PATH = $$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")
|
|
-
|
|
-!isEmpty(QMAKE_XCODEBUILD_PATH) {
|
|
- # Make sure Xcode is set up properly
|
|
- !system("/usr/bin/xcrun xcodebuild -license check 2>/dev/null"): \
|
|
- error("Xcode not set up properly. You need to confirm the license agreement by running 'sudo xcrun xcodebuild -license accept'.")
|
|
-
|
|
- isEmpty(QMAKE_XCODE_VERSION) {
|
|
- # Extract Xcode version using xcodebuild
|
|
- xcode_version = $$system("/usr/bin/xcrun xcodebuild -version")
|
|
- QMAKE_XCODE_VERSION = $$member(xcode_version, 1)
|
|
- isEmpty(QMAKE_XCODE_VERSION): error("Could not resolve Xcode version.")
|
|
- unset(xcode_version)
|
|
- }
|
|
-}
|
|
-
|
|
-isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) {
|
|
- QMAKE_XCODE_PREFERENCES_FILE = $$(HOME)/Library/Preferences/com.apple.dt.Xcode.plist
|
|
- exists($$QMAKE_XCODE_PREFERENCES_FILE): \
|
|
- QMAKE_TARGET_BUNDLE_PREFIX = $$system("/usr/libexec/PlistBuddy -c 'print IDETemplateOptions:bundleIdentifierPrefix' $$QMAKE_XCODE_PREFERENCES_FILE 2>/dev/null")
|
|
-
|
|
- !isEmpty(_QMAKE_CACHE_):!isEmpty(QMAKE_TARGET_BUNDLE_PREFIX): \
|
|
- cache(QMAKE_TARGET_BUNDLE_PREFIX)
|
|
-}
|
|
-
|
|
-QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon
|
|
-
|
|
-# Make the default debug info format for static debug builds
|
|
-# DWARF instead of DWARF with dSYM. This cuts down build times
|
|
-# for application debug builds significantly, as Xcode doesn't
|
|
-# have to pull out all the DWARF info from the Qt static libs
|
|
-# and put it into a dSYM file. We don't need that dSYM file in
|
|
-# the first place, since the information is available in the
|
|
-# object files inside the archives (static libraries).
|
|
-macx-xcode:qtConfig(static): \
|
|
- QMAKE_XCODE_DEBUG_INFORMATION_FORMAT = dwarf
|
|
-
|
|
-# This variable is used by the xcode_dynamic_library_suffix
|
|
-# feature, which allows Xcode to choose the Qt libraries to link to
|
|
-# at build time, depending on the current Xcode SDK and configuration.
|
|
-QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX
|
|
diff -u -r qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/sdk.prf qtbase-opensource-src-5.9.2/mkspecs/features/mac/sdk.prf
|
|
--- qtbase-opensource-src-5.9.2.orig/mkspecs/features/mac/sdk.prf 2017-10-14 12:31:04.000000000 +0800
|
|
+++ qtbase-opensource-src-5.9.2/mkspecs/features/mac/sdk.prf 2017-10-14 12:42:10.000000000 +0800
|
|
@@ -1,58 +0,0 @@
|
|
-
|
|
-isEmpty(QMAKE_MAC_SDK): \
|
|
- error("QMAKE_MAC_SDK must be set when using CONFIG += sdk.")
|
|
-
|
|
-contains(QMAKE_MAC_SDK, .*/.*): \
|
|
- error("QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)")
|
|
-
|
|
-defineReplace(xcodeSDKInfo) {
|
|
- info = $$1
|
|
- equals(info, "Path"): \
|
|
- info = --show-sdk-path
|
|
- equals(info, "PlatformPath"): \
|
|
- info = --show-sdk-platform-path
|
|
- equals(info, "SDKVersion"): \
|
|
- info = --show-sdk-version
|
|
- sdk = $$2
|
|
- isEmpty(sdk): \
|
|
- sdk = $$QMAKE_MAC_SDK
|
|
-
|
|
- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}) {
|
|
- QMAKE_MAC_SDK.$${sdk}.$${info} = $$system("/usr/bin/xcrun --sdk $$sdk $$info 2>/dev/null")
|
|
- # --show-sdk-platform-path won't work for Command Line Tools; this is fine
|
|
- # only used by the XCTest backend to testlib
|
|
- isEmpty(QMAKE_MAC_SDK.$${sdk}.$${info}):if(!isEmpty(QMAKE_XCODEBUILD_PATH)|!equals(info, "--show-sdk-platform-path")): \
|
|
- error("Could not resolve SDK $$info for \'$$sdk\'")
|
|
- cache(QMAKE_MAC_SDK.$${sdk}.$${info}, set stash, QMAKE_MAC_SDK.$${sdk}.$${info})
|
|
- }
|
|
-
|
|
- return($$eval(QMAKE_MAC_SDK.$${sdk}.$${info}))
|
|
-}
|
|
-
|
|
-QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path)
|
|
-QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath)
|
|
-QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion)
|
|
-
|
|
-sysrootified =
|
|
-for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val
|
|
-QMAKE_INCDIR_OPENGL = $$sysrootified
|
|
-
|
|
-QMAKESPEC_NAME = $$basename(QMAKESPEC)
|
|
-
|
|
-# Resolve SDK version of various tools
|
|
-for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_ACTOOL)) {
|
|
- tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool}
|
|
- !isEmpty($$tool_variable) {
|
|
- $$tool = $$eval($$tool_variable)
|
|
- next()
|
|
- }
|
|
-
|
|
- value = $$eval($$tool)
|
|
- isEmpty(value): next()
|
|
-
|
|
- sysrooted = $$system("/usr/bin/xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value) 2>/dev/null")
|
|
- isEmpty(sysrooted): next()
|
|
-
|
|
- $$tool = $$sysrooted $$member(value, 1, -1)
|
|
- cache($$tool_variable, set stash, $$tool)
|
|
-}
|