mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 03:39:59 +00:00
qt5.qtwebengine: disable platform check using patches
The previous code using substituteInPlace was broken for both 5.9 and
5.11 (latter was broken after a minor release bump). Using patches
should make things fail loudly and prevent modules/qtwebengine.nix from
being littered with version checks.
(cherry picked from commit 1809832958)
This commit is contained in:
@@ -63,7 +63,10 @@ let
|
||||
qtwebengine =
|
||||
optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch
|
||||
++ optional stdenv.cc.isClang ./qtwebengine-clang-fix.patch
|
||||
++ optional stdenv.isDarwin ./qtwebengine-darwin-sdk-10.10.patch;
|
||||
++ optionals stdenv.isDarwin [
|
||||
./qtwebengine-darwin-no-platform-check.patch
|
||||
./qtwebengine-darwin-sdk-10.10.patch
|
||||
];
|
||||
qtwebkit = [ ./qtwebkit.patch ];
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf
|
||||
--- a/mkspecs/features/platform.prf
|
||||
+++ b/mkspecs/features/platform.prf
|
||||
@@ -38,10 +38,6 @@ defineTest(isPlatformSupported) {
|
||||
return(false)
|
||||
}
|
||||
} else:osx {
|
||||
- !isMinXcodeVersion(7, 3) {
|
||||
- skipBuild("Using Xcode version $$QMAKE_XCODE_VERSION, but at least version 7.3 is required to build Qt WebEngine.")
|
||||
- return(false)
|
||||
- }
|
||||
!clang|intel_icc {
|
||||
skipBuild("Qt WebEngine on macOS requires Clang.")
|
||||
return(false)
|
||||
@@ -52,10 +48,6 @@ defineTest(isPlatformSupported) {
|
||||
skipBuild("Building Qt WebEngine requires macOS version 10.11 or newer.")
|
||||
return(false)
|
||||
}
|
||||
- !isMinOSXSDKVersion(10, 10): {
|
||||
- skipBuild("Building Qt WebEngine requires a macOS SDK version of 10.11 or newer. Current version is $${WEBENGINE_OSX_SDK_PRODUCT_VERSION}.")
|
||||
- return(false)
|
||||
- }
|
||||
} else {
|
||||
skipBuild("Unknown platform. Qt WebEngine only supports Linux, Windows, and macOS.")
|
||||
return(false)
|
||||
diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri
|
||||
--- a/src/core/config/mac_osx.pri
|
||||
+++ b/src/core/config/mac_osx.pri
|
||||
@@ -5,8 +5,6 @@ load(functions)
|
||||
# otherwise query for it.
|
||||
QMAKE_MAC_SDK_VERSION = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.SDKVersion)
|
||||
isEmpty(QMAKE_MAC_SDK_VERSION) {
|
||||
- QMAKE_MAC_SDK_VERSION = $$system("/usr/bin/xcodebuild -sdk $${QMAKE_MAC_SDK} -version SDKVersion 2>/dev/null")
|
||||
- isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for \'$${QMAKE_MAC_SDK}\'")
|
||||
}
|
||||
|
||||
QMAKE_CLANG_DIR = "/usr"
|
||||
@@ -42,7 +42,9 @@ let
|
||||
qtscript = [ ./qtscript.patch ];
|
||||
qtserialport = [ ./qtserialport.patch ];
|
||||
qttools = [ ./qttools.patch ];
|
||||
qtwebengine = optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch;
|
||||
qtwebengine = [ ./qtwebengine-no-build-skip.patch ]
|
||||
++ optional stdenv.needsPax ./qtwebengine-paxmark-mksnapshot.patch
|
||||
++ optional stdenv.isDarwin ./qtwebengine-darwin-no-platform-check.patch;
|
||||
qtwebkit = [ ./qtwebkit.patch ];
|
||||
qtvirtualkeyboard = [
|
||||
(fetchpatch {
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
|
||||
--- a/mkspecs/features/configure.prf
|
||||
+++ b/mkspecs/features/configure.prf
|
||||
@@ -194,9 +194,6 @@ defineTest(runConfigure) {
|
||||
} else {
|
||||
log("Native Spellchecker .............. Not enabled (Default, enable with WEBENGINE_CONFIG+=use_native_spellchecker)$${EOL}")
|
||||
}
|
||||
- !isMinOSXSDKVersion(10, 10, 3) {
|
||||
- log(" Force Touch API usage .............. Not enabled (Because the OS X SDK version to be used \"$${WEBENGINE_OSX_SDK_PRODUCT_VERSION}\" is lower than the required \"10.10.3\")$${EOL}")
|
||||
- }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf
|
||||
--- a/mkspecs/features/functions.prf
|
||||
+++ b/mkspecs/features/functions.prf
|
||||
@@ -38,10 +38,6 @@ defineTest(isPlatformSupported) {
|
||||
return(false)
|
||||
}
|
||||
} else:osx {
|
||||
- !isMinXcodeVersion(5, 1) {
|
||||
- skipBuild("Using XCode version $$QMAKE_XCODE_VERSION, but at least version 5.1 is required to build Qt WebEngine.")
|
||||
- return(false)
|
||||
- }
|
||||
!clang|intel_icc {
|
||||
skipBuild("Qt WebEngine on macOS requires Clang.")
|
||||
return(false)
|
||||
@@ -52,10 +48,6 @@ defineTest(isPlatformSupported) {
|
||||
skipBuild("Qt WebEngine requires OS X version 10.10 or newer.")
|
||||
return(false)
|
||||
}
|
||||
- !isMinOSXSDKVersion(10, 10): {
|
||||
- skipBuild("Qt WebEngine requires an OS X SDK version of 10.10 or newer. Current version is $${WEBENGINE_OSX_SDK_PRODUCT_VERSION}.")
|
||||
- return(false)
|
||||
- }
|
||||
} else {
|
||||
skipBuild("Unknown platform. Qt WebEngine only supports Linux, Windows, and OS X.")
|
||||
return(false)
|
||||
diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri
|
||||
--- a/src/core/config/mac_osx.pri
|
||||
+++ b/src/core/config/mac_osx.pri
|
||||
@@ -5,8 +5,6 @@ load(functions)
|
||||
# otherwise query for it.
|
||||
QMAKE_MAC_SDK_VERSION = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.SDKVersion)
|
||||
isEmpty(QMAKE_MAC_SDK_VERSION) {
|
||||
- QMAKE_MAC_SDK_VERSION = $$system("/usr/bin/xcodebuild -sdk $${QMAKE_MAC_SDK} -version SDKVersion 2>/dev/null")
|
||||
- isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for \'$${QMAKE_MAC_SDK}\'")
|
||||
}
|
||||
|
||||
QMAKE_CLANG_DIR = "/usr"
|
||||
@@ -68,18 +68,8 @@ qtModule {
|
||||
src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc
|
||||
''
|
||||
+ optionalString stdenv.isDarwin (''
|
||||
# Remove annoying xcode check
|
||||
substituteInPlace mkspecs/features/platform.prf \
|
||||
--replace "lessThan(QMAKE_XCODE_VERSION, 7.3)" false \
|
||||
--replace "/usr/bin/xcodebuild" "xcodebuild"
|
||||
|
||||
substituteInPlace src/3rdparty/chromium/build/mac_toolchain.py \
|
||||
--replace "/usr/bin/xcode-select" "xcode-select"
|
||||
|
||||
substituteInPlace src/core/config/mac_osx.pri \
|
||||
--replace /usr ${stdenv.cc} \
|
||||
--replace "isEmpty(QMAKE_MAC_SDK_VERSION)" false
|
||||
|
||||
--replace /usr ${stdenv.cc}
|
||||
''
|
||||
# TODO remove when new Apple SDK is in
|
||||
+ (if lib.versionOlder qtCompatVersion "5.11" then ''
|
||||
|
||||
Reference in New Issue
Block a user