mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-15 16:20:08 +02:00
390 lines
16 KiB
Plaintext
390 lines
16 KiB
Plaintext
From 0f12ee97c4ca2f4fd7840c332a512827c3018fc9 Mon Sep 17 00:00:00 2001
|
|
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
|
Date: Thu, 7 Dec 2023 18:33:47 +1000
|
|
Subject: =?UTF-8?q?Patchset=20based=20on=20qtwebengine=20patches=20for=20F?=
|
|
=?UTF-8?q?reeBSD,=20as=20well=20as=20patches=20by=20Kacper=20Kasper=20(Ka?=
|
|
=?UTF-8?q?pix),=20J=C3=A9r=C3=B4me=20Duval=20(korli)=20and=20Gerasim=20Tr?=
|
|
=?UTF-8?q?oeglazov=20(3dEyes).?=
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
|
|
diff --git a/configure.pri b/configure.pri
|
|
index cb53c93..1ddc84f 100644
|
|
--- a/configure.pri
|
|
+++ b/configure.pri
|
|
@@ -136,6 +136,9 @@ defineTest(qtConfTest_detectPlatform) {
|
|
macos:qtwebengine_isMacOsPlatformSupported() {
|
|
$${1}.platform = "macos"
|
|
}
|
|
+ unix:qtwebengine_isLinuxPlatformSupported() {
|
|
+ $${1}.platform = "linux"
|
|
+ }
|
|
ios:qtwebengine_isMacOsPlatformSupported() {
|
|
$${1}.platform = "ios"
|
|
}
|
|
diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf
|
|
index 7f63058..dc536cc 100644
|
|
--- a/mkspecs/features/functions.prf
|
|
+++ b/mkspecs/features/functions.prf
|
|
@@ -89,6 +89,10 @@ defineReplace(gnWebEngineArgs) {
|
|
include($$QTWEBENGINE_ROOT/src/buildtools/config/windows.pri)
|
|
include($$QTWEBENGINE_ROOT/src/core/config/windows.pri)
|
|
}
|
|
+ haiku {
|
|
+ include($$QTWEBENGINE_ROOT/src/buildtools/config/haiku.pri)
|
|
+ include($$QTWEBENGINE_ROOT/src/core/config/haiku.pri)
|
|
+ }
|
|
isEmpty(gn_args): error(No gn_args found please make sure you have valid configuration.)
|
|
return($$gn_args)
|
|
}
|
|
@@ -98,6 +102,7 @@ defineReplace(gnPdfArgs) {
|
|
macos: include($$QTWEBENGINE_ROOT/src/buildtools/config/mac_osx.pri)
|
|
ios: include($$QTWEBENGINE_ROOT/src/pdf/config/ios.pri)
|
|
win32: include($$QTWEBENGINE_ROOT/src/buildtools/config/windows.pri)
|
|
+ haiku: include($$QTWEBENGINE_ROOT/src/buildtools/config/haiku.pri)
|
|
include($$QTWEBENGINE_ROOT/src/pdf/config/common.pri)
|
|
isEmpty(gn_args): error(No gn_args found please make sure you have valid configuration.)
|
|
return($$gn_args)
|
|
@@ -119,6 +124,7 @@ defineReplace(gnOS) {
|
|
macos: return(mac)
|
|
win32: return(win)
|
|
linux: return(linux)
|
|
+ haiku: return(haiku)
|
|
error(Unsupported platform)
|
|
return(unknown)
|
|
}
|
|
diff --git a/src/buildtools/buildtools.pro b/src/buildtools/buildtools.pro
|
|
index 1366d18..d6fbdfd 100644
|
|
--- a/src/buildtools/buildtools.pro
|
|
+++ b/src/buildtools/buildtools.pro
|
|
@@ -1,6 +1,6 @@
|
|
TEMPLATE = subdirs
|
|
|
|
-linux {
|
|
+unix {
|
|
# configure_host.pro and configure_target.pro are phony pro files that
|
|
# extract things like compiler and linker from qmake.
|
|
# Only used on Linux as it is only important for cross-building and alternative compilers.
|
|
diff --git a/src/buildtools/config/haiku.pri b/src/buildtools/config/haiku.pri
|
|
new file mode 100644
|
|
index 0000000..33aa8be
|
|
--- /dev/null
|
|
+++ b/src/buildtools/config/haiku.pri
|
|
@@ -0,0 +1,6 @@
|
|
+include(linux.pri)
|
|
+gn_args += \
|
|
+ enable_basic_printing=true \
|
|
+ enable_print_preview=true \
|
|
+ use_dbus=false \
|
|
+ use_udev=false
|
|
diff --git a/src/buildtools/config/linking.pri b/src/buildtools/config/linking.pri
|
|
index f295e2c..90d63b0 100644
|
|
--- a/src/buildtools/config/linking.pri
|
|
+++ b/src/buildtools/config/linking.pri
|
|
@@ -34,7 +34,7 @@ if(macos|ios) {
|
|
}
|
|
}
|
|
|
|
-linux {
|
|
+if(unix) {
|
|
!static {
|
|
QMAKE_LFLAGS += @$${RSP_OBJECT_FILE}
|
|
QMAKE_LFLAGS += -Wl,--start-group @$${RSP_ARCHIVE_FILE} -Wl,--end-group
|
|
@@ -60,7 +60,7 @@ LIBS_PRIVATE += $$NINJA_LIB_DIRS $$NINJA_LIBS
|
|
|
|
unix:qtConfig(webengine-noexecstack): \
|
|
QMAKE_LFLAGS += -Wl,-z,noexecstack
|
|
-linux {
|
|
+unix {
|
|
# add chromium flags
|
|
for(flag, NINJA_LFLAGS) {
|
|
# filter out some flags
|
|
diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri
|
|
index a9df3d2..e533ffc 100644
|
|
--- a/src/buildtools/config/support.pri
|
|
+++ b/src/buildtools/config/support.pri
|
|
@@ -5,7 +5,7 @@ defineTest(qtwebengine_skipBuild) {
|
|
|
|
# this should match webengine-core-support
|
|
defineReplace(qtwebengine_checkWebEngineCoreError) {
|
|
- !linux:!win32:!macos {
|
|
+ !linux:!win32:!macos:!unix {
|
|
qtwebengine_skipBuild("QtWebEngine can be built only on Linux, Windows or macOS.")
|
|
return(false)
|
|
}
|
|
@@ -24,14 +24,14 @@ defineReplace(qtwebengine_checkWebEngineCoreError) {
|
|
!qtwebengine_checkForPython(QtWebEngine):return(false)
|
|
!qtwebengine_checkForNodejs(QtWebEngine):return(false)
|
|
!qtwebengine_checkForSanitizer(QtWebEngine):return(false)
|
|
- linux:!qtwebengine_checkForPkgCfg(QtWebEngine):return(false)
|
|
- linux:!qtwebengine_checkForHostPkgCfg(QtWebEngine):return(false)
|
|
+ unix:!qtwebengine_checkForPkgCfg(QtWebEngine):return(false)
|
|
+ unix:!qtwebengine_checkForHostPkgCfg(QtWebEngine):return(false)
|
|
linux:!qtwebengine_checkForGlibc(QtWebEngine):return(false)
|
|
- linux:!qtwebengine_checkForKhronos(QtWebEngine):return(false)
|
|
- linux:!qtwebengine_checkForPackage(QtWebEngine,nss):return(false)
|
|
- linux:!qtwebengine_checkForPackage(QtWebEngine,dbus):return(false)
|
|
- linux:!qtwebengine_checkForPackage(QtWebEngine,fontconfig):return(false)
|
|
- linux:!qtwebengine_checkForQpaXcb(QtWebEngine):return(false)
|
|
+ unix:!qtwebengine_checkForKhronos(QtWebEngine):return(false)
|
|
+ unix:!qtwebengine_checkForPackage(QtWebEngine,nss):return(false)
|
|
+# unix:!qtwebengine_checkForPackage(QtWebEngine,dbus):return(false)
|
|
+ unix:!qtwebengine_checkForPackage(QtWebEngine,fontconfig):return(false)
|
|
+ unix:!qtwebengine_checkForQpaXcb(QtWebEngine):return(false)
|
|
win32:!qtwebengine_checkForCompiler64(QtWebEngine):return(false)
|
|
win32:!qtwebengine_checkForWinVersion(QtWebEngine):return(false)
|
|
return(true)
|
|
@@ -39,7 +39,7 @@ defineReplace(qtwebengine_checkWebEngineCoreError) {
|
|
|
|
# this shuold match webengine-qtpdf-support
|
|
defineReplace(qtwebengine_checkPdfError) {
|
|
- !linux:!win32:!macos:!ios {
|
|
+ !linux:!win32:!macos:!ios:!unix {
|
|
qtwebengine_skipBuild("QtPdf can be built only on Linux, Windows, macOS or iOS.")
|
|
return(false)
|
|
}
|
|
@@ -53,8 +53,8 @@ defineReplace(qtwebengine_checkPdfError) {
|
|
!qtwebengine_checkForFlex(QtPdf):return(false)
|
|
!qtwebengine_checkForPython(QtPdf):return(false)
|
|
!qtwebengine_checkForSanitizer(QtPdf):return(false)
|
|
- linux:!qtwebengine_checkForPkgCfg(QtPdf):return(false)
|
|
- linux:!qtwebengine_checkForHostPkgCfg(QtPdf):return(false)
|
|
+ unix:!qtwebengine_checkForPkgCfg(QtPdf):return(false)
|
|
+ unix:!qtwebengine_checkForHostPkgCfg(QtPdf):return(false)
|
|
win32:!qtwebengine_checkForWinVersion(QtPdf):return(false)
|
|
return(true)
|
|
}
|
|
diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
|
|
index 5e5d9d7..fe464c7 100644
|
|
--- a/src/buildtools/configure.json
|
|
+++ b/src/buildtools/configure.json
|
|
@@ -318,8 +318,8 @@
|
|
"type": "detectNinja"
|
|
},
|
|
"webengine-python": {
|
|
- "label": "python2",
|
|
- "type": "detectPython2",
|
|
+ "label": "python3",
|
|
+ "type": "detectPython",
|
|
"log": "location"
|
|
},
|
|
"webengine-winversion": {
|
|
@@ -386,7 +386,7 @@
|
|
"features": {
|
|
"webengine-core-support": {
|
|
"label": "Support Qt WebEngine Core",
|
|
- "condition": "(config.linux || config.win32 || config.macos)
|
|
+ "condition": "(config.unix || config.win32 || config.macos)
|
|
&& !config.static
|
|
&& module.gui
|
|
&& features.webengine-submodule
|
|
@@ -399,21 +399,20 @@
|
|
&& features.webengine-python
|
|
&& features.webengine-nodejs
|
|
&& (!config.sanitizer || features.webengine-sanitizer)
|
|
- && (!config.linux || features.pkg-config)
|
|
- && (!config.linux || features.webengine-host-pkg-config)
|
|
+ && (!config.unix || features.pkg-config)
|
|
+ && (!config.unix || features.webengine-host-pkg-config)
|
|
&& (!config.linux || features.webengine-system-glibc)
|
|
- && (!config.linux || features.webengine-system-khr)
|
|
- && (!config.linux || features.webengine-system-nss)
|
|
- && (!config.linux || features.webengine-system-dbus)
|
|
- && (!config.linux || features.webengine-system-fontconfig)
|
|
- && (!config.linux || !features.pkg-config || !features.xcb || features.webengine-ozone-x11)
|
|
+ && (!config.unix || features.webengine-system-khr)
|
|
+ && (!config.unix || features.webengine-system-nss)
|
|
+ && (!config.unix || features.webengine-system-fontconfig)
|
|
+ && (!config.unix || !features.pkg-config || !features.xcb || features.webengine-ozone-x11)
|
|
&& (!config.win32 || features.webengine-win-compiler64)
|
|
&& (!config.win32 || features.webengine-winversion)",
|
|
"output": [ "privateFeature" ]
|
|
},
|
|
"webengine-qtpdf-support": {
|
|
"label": "Support Qt Pdf",
|
|
- "condition": "(config.linux || config.win32 || config.macos || config.ios)
|
|
+ "condition": "(config.unix || config.win32 || config.macos || config.ios)
|
|
&& module.gui
|
|
&& features.webengine-submodule
|
|
&& features.webengine-nowhitespace
|
|
@@ -446,7 +445,7 @@
|
|
"output": [ "privateFeature" ]
|
|
},
|
|
"webengine-python": {
|
|
- "label": "python2",
|
|
+ "label": "python3",
|
|
"condition": "tests.webengine-python",
|
|
"output": [
|
|
"privateFeature",
|
|
@@ -525,7 +524,6 @@
|
|
},
|
|
"webengine-system-gn": {
|
|
"label": "Use System Gn",
|
|
- "autoDetect": "false",
|
|
"condition": "tests.webengine-gn",
|
|
"output": [ "privateFeature" ]
|
|
},
|
|
@@ -807,7 +805,6 @@
|
|
"condition": "config.unix && !config.macos && !config.ios",
|
|
"entries": [
|
|
"webengine-system-fontconfig",
|
|
- "webengine-system-dbus",
|
|
"webengine-system-nss",
|
|
"webengine-system-khr",
|
|
"webengine-system-glibc"
|
|
diff --git a/src/core/api/core_api.pro b/src/core/api/core_api.pro
|
|
index 28d5586..6564be6 100644
|
|
--- a/src/core/api/core_api.pro
|
|
+++ b/src/core/api/core_api.pro
|
|
@@ -73,7 +73,7 @@ SOURCES = \
|
|
qwebengineurlschemehandler.cpp
|
|
|
|
### Qt6 Remove this workaround
|
|
-unix:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!static {
|
|
+linux:!isEmpty(QMAKE_LFLAGS_VERSION_SCRIPT):!static {
|
|
SOURCES += qtbug-60565.cpp \
|
|
qtbug-61521.cpp
|
|
}
|
|
diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp
|
|
index 8a385e4..d6eb5e0 100644
|
|
--- a/src/core/chromium_overrides.cpp
|
|
+++ b/src/core/chromium_overrides.cpp
|
|
@@ -36,7 +36,7 @@
|
|
** $QT_END_LICENSE$
|
|
**
|
|
****************************************************************************/
|
|
-
|
|
+#pragma GCC diagnostic ignored "-Wdeprecated-copy"
|
|
#include "ozone/gl_context_qt.h"
|
|
#include "qtwebenginecoreglobal_p.h"
|
|
#include "web_contents_view_qt.h"
|
|
diff --git a/src/core/color_chooser_controller.cpp b/src/core/color_chooser_controller.cpp
|
|
index 361ff93..2714eef 100644
|
|
--- a/src/core/color_chooser_controller.cpp
|
|
+++ b/src/core/color_chooser_controller.cpp
|
|
@@ -37,6 +37,7 @@
|
|
**
|
|
****************************************************************************/
|
|
|
|
+#pragma GCC diagnostic ignored "-Wdeprecated-copy"
|
|
#include "content/browser/web_contents/web_contents_impl.h"
|
|
|
|
#include "color_chooser_controller.h"
|
|
diff --git a/src/core/config/haiku.pri b/src/core/config/haiku.pri
|
|
new file mode 100644
|
|
index 0000000..82139a4
|
|
--- /dev/null
|
|
+++ b/src/core/config/haiku.pri
|
|
@@ -0,0 +1,26 @@
|
|
+include(common.pri)
|
|
+
|
|
+!host_build{
|
|
+ gn_args += use_pulseaudio=false
|
|
+ gn_args += use_alsa=false
|
|
+
|
|
+ !packagesExist(libpci): gn_args += use_libpci=false
|
|
+
|
|
+ qtConfig(webengine-webrtc): qtConfig(webengine-webrtc-pipewire): gn_args += rtc_use_pipewire=true
|
|
+
|
|
+ qtConfig(webengine-system-libevent): gn_args += use_system_libevent=true
|
|
+ qtConfig(webengine-system-libwebp): gn_args += use_system_libwebp=true
|
|
+ qtConfig(webengine-system-libxml2): gn_args += use_system_libxml=true use_system_libxslt=true
|
|
+ qtConfig(webengine-system-opus): gn_args += use_system_opus=true
|
|
+ qtConfig(webengine-system-snappy): gn_args += use_system_snappy=true
|
|
+ qtConfig(webengine-system-libvpx): gn_args += use_system_libvpx=true
|
|
+ qtConfig(webengine-system-icu): gn_args += use_system_icu=true icu_use_data_file=false
|
|
+ qtConfig(webengine-system-ffmpeg): gn_args += use_system_ffmpeg=true
|
|
+ qtConfig(webengine-system-re2): gn_args += use_system_re2=true
|
|
+ qtConfig(webengine-system-lcms2): gn_args += use_system_lcms2=true
|
|
+
|
|
+ # FIXME:
|
|
+ #qtConfig(webengine-system-protobuf): gn_args += use_system_protobuf=true
|
|
+ #qtConfig(webengine-system-jsoncpp): gn_args += use_system_jsoncpp=true
|
|
+ #qtConfig(webengine-system-libsrtp: gn_args += use_system_libsrtp=true
|
|
+}
|
|
diff --git a/src/core/core_module.pro b/src/core/core_module.pro
|
|
index 9e087c8..decafe8 100644
|
|
--- a/src/core/core_module.pro
|
|
+++ b/src/core/core_module.pro
|
|
@@ -45,10 +45,10 @@ QMAKE_INFO_PLIST = Info_mac.plist
|
|
# and doesn't let Chromium get access to libc symbols through dlsym.
|
|
CONFIG -= bsymbolic_functions
|
|
|
|
-linux {
|
|
+unix {
|
|
!ccache:!use_gold_linker:!use_lld_linker {
|
|
- QMAKE_LINK="ulimit -n 4096 && $$QMAKE_LINK"
|
|
- QMAKE_LINK_SHLIB="ulimit -n 4096 && $$QMAKE_LINK_SHLIB"
|
|
+ QMAKE_LINK="ulimit -S -n 4096 && $$QMAKE_LINK"
|
|
+ QMAKE_LINK_SHLIB="ulimit -S -n 4096 && $$QMAKE_LINK_SHLIB"
|
|
}
|
|
qtConfig(separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)"
|
|
}
|
|
diff --git a/src/core/qtwebengine_resources.gni b/src/core/qtwebengine_resources.gni
|
|
index 3bf1a5d..29fd260 100644
|
|
--- a/src/core/qtwebengine_resources.gni
|
|
+++ b/src/core/qtwebengine_resources.gni
|
|
@@ -27,7 +27,6 @@ repack("qtwebengine_repack_resources") {
|
|
"$root_gen_dir/components/components_resources.pak",
|
|
"$root_gen_dir/components/dev_ui_components_resources.pak",
|
|
"$root_gen_dir/content/browser/resources/media/media_internals_resources.pak",
|
|
- "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
|
|
"$root_gen_dir/content/content_resources.pak",
|
|
"$root_gen_dir/content/dev_ui_content_resources.pak",
|
|
"$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
|
|
@@ -44,7 +43,6 @@ repack("qtwebengine_repack_resources") {
|
|
"//components/resources:components_resources_grit",
|
|
"//components/resources:dev_ui_components_resources_grit",
|
|
"//content/browser/resources/media:media_internals_resources",
|
|
- "//content/browser/tracing:resources",
|
|
"//content:content_resources_grit",
|
|
"//content:dev_ui_content_resources_grit",
|
|
"//mojo/public/js:resources",
|
|
--
|
|
2.45.2
|
|
|
|
|
|
From b0a9e6c4c09993da3ccf886ef2e362779a125fbf Mon Sep 17 00:00:00 2001
|
|
From: Ken Moffat <ken@linuxfromscratch.org>
|
|
Date: Sat, 16 Dec 2023 18:57:13 +1000
|
|
Subject: patches from Arch via gentoo to use python3
|
|
|
|
|
|
diff --git a/configure.pri b/configure.pri
|
|
index 1ddc84f..3792f42 100644
|
|
--- a/configure.pri
|
|
+++ b/configure.pri
|
|
@@ -7,17 +7,7 @@ QTWEBENGINE_SOURCE_TREE = $$PWD
|
|
equals(QMAKE_HOST.os, Windows): EXE_SUFFIX = .exe
|
|
|
|
defineTest(isPythonVersionSupported) {
|
|
- python = $$system_quote($$system_path($$1))
|
|
- python_version = $$system('$$python -c "import sys; print(sys.version_info[0:3])"')
|
|
- python_version ~= s/[()]//g
|
|
- python_version = $$split(python_version, ',')
|
|
- python_major_version = $$first(python_version)
|
|
- python_minor_version = $$member(python_version, 1)
|
|
- python_patch_version = $$member(python_version, 2)
|
|
- greaterThan(python_major_version, 2): greaterThan(python_minor_version, 7): return(true)
|
|
- greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): greaterThan(python_patch_version, 4): return(true)
|
|
- qtLog("Unsupported python version: $${python_major_version}.$${python_minor_version}.$${python_patch_version}.")
|
|
- return(false)
|
|
+ return(true)
|
|
}
|
|
|
|
defineTest(qtConfTest_detectJumboBuild) {
|
|
@@ -49,7 +39,7 @@ defineTest(qtConfReport_jumboBuild) {
|
|
qtConfReportPadded($${1}, $$mergeLimit)
|
|
}
|
|
|
|
-defineTest(qtConfTest_detectPython2) {
|
|
+defineTest(qtConfTest_detectPython) {
|
|
pythonOverride = $$eval(config.input.python_override)
|
|
!isEmpty(pythonOverride) {
|
|
python = $$qtConfFindInPath("$$pythonOverride$$EXE_SUFFIX")
|
|
--
|
|
2.45.2
|
|
|