qtwebengine: fix build for darwin
This commit is contained in:
@@ -97,8 +97,10 @@ let
|
||||
url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/qtbug-77037-workaround.patch?h=packages/qt5-webengine&id=fc77d6b3d5ec74e421b58f199efceb2593cbf951";
|
||||
sha256 = "1gv733qfdn9746nbqqxzyjx4ijjqkkb7zb71nxax49nna5bri3am";
|
||||
})
|
||||
]
|
||||
++ optional stdenv.isDarwin ./qtwebengine-darwin-no-platform-check.patch;
|
||||
] ++ optionals stdenv.isDarwin [
|
||||
./qtwebengine-darwin-no-platform-check.patch
|
||||
./qtwebengine-darwin-fix-failed-static-assertion.patch
|
||||
];
|
||||
qtwebkit = [ ./qtwebkit.patch ]
|
||||
++ optionals stdenv.isDarwin [
|
||||
./qtwebkit-darwin-no-readline.patch
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
Fix a following build error:
|
||||
|
||||
In file included from ../../3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm:7:
|
||||
../../3rdparty/chromium/base/bind.h:59:3: error: static_assert failed "Bound argument |i| of type |Arg| cannot be forwarded as |Unwrapped| to the bound functor, which declares it as |Param|."
|
||||
static_assert(
|
||||
^
|
||||
../../3rdparty/chromium/base/bind.h:91:7: note: in instantiation of template class 'base::internal::AssertConstructible<1, long, long, const long &, NSError *>' requested here
|
||||
: AssertConstructible<Ns, Args, std::decay_t<Args>, Unwrapped, Params>... {
|
||||
^
|
||||
../../3rdparty/chromium/base/bind.h:213:27: note: in instantiation of template class 'base::internal::AssertBindArgsValidity<std::__1::integer_sequence<unsigned long, 0, 1>, base::internal::TypeList<base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>, base::internal::TypeList<device::BluetoothRemoteGattCharacteristicMac *, const long &>, base::internal::TypeList<device::BluetoothRemoteGattCharacteristicMac *, NSError *> >' requested here
|
||||
static_assert(internal::AssertBindArgsValidity<
|
||||
^
|
||||
../../3rdparty/chromium/base/bind.h:242:16: note: in instantiation of function template specialization 'base::BindRepeating<void (device::BluetoothRemoteGattCharacteristicMac::*)(NSError *), base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>' requested here
|
||||
return base::BindRepeating(std::forward<Functor>(functor),
|
||||
^
|
||||
../../3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm:211:15: note: in instantiation of function template specialization 'base::Bind<void (device::BluetoothRemoteGattCharacteristicMac::*)(NSError *), base::WeakPtr<device::BluetoothRemoteGattCharacteristicMac>, long>' requested here
|
||||
base::Bind(&BluetoothRemoteGattCharacteristicMac::DidWriteValue,
|
||||
^
|
||||
|
||||
Resurrected from https://github.com/NixOS/nixpkgs/blob/ddcf01bca6c7a7a7f096bec836a1e6a707ad473d/pkgs/development/libraries/qt-5/5.11/qtwebengine-clang-fix.patch because the same problem is present in 5.12 when compiling on macOS.
|
||||
|
||||
--- a/src/3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm
|
||||
+++ b/src/3rdparty/chromium/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm
|
||||
@@ -209,7 +209,7 @@ void BluetoothRemoteGattCharacteristicMac::WriteRemoteCharacteristic(
|
||||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
FROM_HERE,
|
||||
base::Bind(&BluetoothRemoteGattCharacteristicMac::DidWriteValue,
|
||||
- weak_ptr_factory_.GetWeakPtr(), nil));
|
||||
+ weak_ptr_factory_.GetWeakPtr(), nullptr));
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,18 @@
|
||||
diff --git a/configure.pri b/configure.pri
|
||||
index 897bea54..6f834c20 100644
|
||||
--- a/configure.pri
|
||||
+++ b/configure.pri
|
||||
@@ -269,7 +269,7 @@ defineReplace(webEngineGetMacOSVersion) {
|
||||
}
|
||||
|
||||
defineReplace(webEngineGetMacOSSDKVersion) {
|
||||
- value = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null")
|
||||
+ value = $$system("xcrun --show-sdk-version")
|
||||
return($$value)
|
||||
}
|
||||
|
||||
diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf
|
||||
index 35eb6b89..7eed640a 100644
|
||||
--- a/mkspecs/features/platform.prf
|
||||
+++ b/mkspecs/features/platform.prf
|
||||
@@ -40,8 +40,6 @@ defineTest(isPlatformSupported) {
|
||||
@@ -19,15 +33,39 @@ diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf
|
||||
}
|
||||
} else {
|
||||
skipBuild("Unknown platform. Qt WebEngine only supports Linux, Windows, and macOS.")
|
||||
@@ -111,7 +107,7 @@ defineTest(isMinOSXSDKVersion) {
|
||||
requested_minor = $$2
|
||||
requested_patch = $$3
|
||||
isEmpty(requested_patch): requested_patch = 0
|
||||
- WEBENGINE_OSX_SDK_PRODUCT_VERSION = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null")
|
||||
+ WEBENGINE_OSX_SDK_PRODUCT_VERSION = $$system("xcrun --show-sdk-version")
|
||||
export(WEBENGINE_OSX_SDK_PRODUCT_VERSION)
|
||||
isEmpty(WEBENGINE_OSX_SDK_PRODUCT_VERSION) {
|
||||
skipBuild("Could not resolve SDK product version for \'$$QMAKE_MAC_SDK\'.")
|
||||
diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri
|
||||
index 4426901c..3aa6057e 100644
|
||||
--- a/src/core/config/mac_osx.pri
|
||||
+++ b/src/core/config/mac_osx.pri
|
||||
@@ -5,8 +5,6 @@ load(functions)
|
||||
@@ -5,16 +5,16 @@ 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_MAC_SDK_VERSION = $$system("xcrun --show-sdk-version")
|
||||
isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for \'$${QMAKE_MAC_SDK}\'")
|
||||
}
|
||||
|
||||
|
||||
QMAKE_CLANG_DIR = "/usr"
|
||||
-QMAKE_CLANG_PATH = $$eval(QMAKE_MAC_SDK.macx-clang.$${QMAKE_MAC_SDK}.QMAKE_CXX)
|
||||
-!isEmpty(QMAKE_CLANG_PATH) {
|
||||
- clang_dir = $$clean_path("$$dirname(QMAKE_CLANG_PATH)/../")
|
||||
- exists($$clang_dir): QMAKE_CLANG_DIR = $$clang_dir
|
||||
-}
|
||||
+# QMAKE_CLANG_PATH = $$eval(QMAKE_MAC_SDK.macx-clang.$${QMAKE_MAC_SDK}.QMAKE_CXX)
|
||||
+# !isEmpty(QMAKE_CLANG_PATH) {
|
||||
+# clang_dir = $$clean_path("$$dirname(QMAKE_CLANG_PATH)/../")
|
||||
+# exists($$clang_dir): QMAKE_CLANG_DIR = $$clang_dir
|
||||
+# }
|
||||
|
||||
QMAKE_CLANG_PATH = "$${QMAKE_CLANG_DIR}/bin/clang++"
|
||||
message("Using clang++ from $${QMAKE_CLANG_PATH}")
|
||||
|
||||
Reference in New Issue
Block a user