[vlc-commits] [Git][videolan/vlc][master] 3 commits: contrib: qtdeclarative: add patch to not care about patch version when checking QML cache
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Mar 13 06:35:50 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
f6e166f0 by Fatih Uzunoglu at 2025-03-13T05:53:10+00:00
contrib: qtdeclarative: add patch to not care about patch version when checking QML cache
- - - - -
bcf1aa5e by Fatih Uzunoglu at 2025-03-13T05:53:10+00:00
Reapply "contrib: qt: allow using Qt tools with different patch version"
This reverts commit 185d3fba7391649d7d7e339c95d098e027d872b5.
- - - - -
59da34a2 by Fatih Uzunoglu at 2025-03-13T05:53:10+00:00
Partial revert "contrib: qt: only allow using the exact same version of native tools"
This reverts commit 37f01a65683cf13c14c2eeb6027e1bc339571b78.
- - - - -
4 changed files:
- contrib/src/main.mak
- contrib/src/qt/rules.mak
- + contrib/src/qtdeclarative/0001-QtQml-do-not-care-about-patch-version-when-checking-.patch
- contrib/src/qtdeclarative/rules.mak
Changes:
=====================================
contrib/src/main.mak
=====================================
@@ -549,7 +549,7 @@ MESONCLEAN = rm -rf $(BUILD_DIR)/meson-private
MESONBUILD = meson compile -C $(BUILD_DIR) $(MESON_BUILD) && meson install -C $(BUILD_DIR)
# shared Qt config
-ifeq ($(call system_tool_version, qmake6 -query QT_VERSION 2>/dev/null, cat),$(QTBASE_VERSION))
+ifeq ($(call system_tool_majmin, qmake6 -query QT_VERSION 2>/dev/null),$(QTBASE_VERSION_MAJOR))
ifdef HAVE_CROSS_COMPILE
QT_LIBEXECS := $(shell qmake6 -query QT_HOST_LIBEXECS)
@@ -559,9 +559,9 @@ QT_LIBEXECS := $(shell qmake6 -query QT_INSTALL_LIBEXECS):$(shell qmake6 -query
QT_BINS := $(shell qmake6 -query QT_INSTALL_BINS):$(shell qmake6 -query QT_HOST_BINS)
endif
-ifeq ($(call system_tool_version, PATH="${QT_LIBEXECS}" moc --version, cat),$(QTBASE_VERSION))
-ifeq ($(call system_tool_version, PATH="${QT_BINS}" qsb --version, cat),$(QTBASE_VERSION))
-ifeq ($(call system_tool_version, PATH="${QT_LIBEXECS}" qmlcachegen --version, cat),$(QTBASE_VERSION))
+ifeq ($(call system_tool_majmin, PATH="${QT_LIBEXECS}" moc --version),$(QTBASE_VERSION_MAJOR))
+ifeq ($(call system_tool_majmin, PATH="${QT_BINS}" qsb --version),$(QTBASE_VERSION_MAJOR))
+ifeq ($(call system_tool_majmin, PATH="${QT_LIBEXECS}" qmlcachegen --version),$(QTBASE_VERSION_MAJOR))
QT_USES_SYSTEM_TOOLS = 1
endif
endif
@@ -581,6 +581,10 @@ endif
QT_HOST_PATH := -DQT_HOST_PATH=$(QT_HOST_PREFIX) -DQT_HOST_PATH_CMAKE_DIR=$(QT_HOST_LIBS)/cmake
endif
QT_CMAKE_CONFIG := -DCMAKE_TOOLCHAIN_FILE=$(PREFIX)/lib/cmake/Qt6/qt.toolchain.cmake $(QT_HOST_PATH)
+ifdef QT_USES_SYSTEM_TOOLS
+# We checked the versions match, assume we know what we're going
+QT_CMAKE_CONFIG += -DQT_NO_PACKAGE_VERSION_CHECK=TRUE
+endif
ifdef GPL
REQUIRE_GPL =
=====================================
contrib/src/qt/rules.mak
=====================================
@@ -114,6 +114,11 @@ QTBASE_NATIVE_CONFIG := $(QTBASE_COMMON_CONFIG) -DQT_BUILD_TESTS=FALSE \
-DFEATURE_texthtmlparser=OFF -DFEATURE_cssparser=OFF -DFEATURE_textodfwriter=OFF -DFEATURE_textmarkdownreader=OFF \
-DFEATURE_textmarkdownwriter=OFF -DINPUT_libb2=no -DFEATURE_harfbuzz=OFF -DFEATURE_freetype=OFF -DINPUT_opengl=no
+ifdef QT_USES_SYSTEM_TOOLS
+# We checked the versions match, assume we know what we're going
+QTBASE_CONFIG += -DQT_NO_PACKAGE_VERSION_CHECK=TRUE
+endif
+
.qt-tools: BUILD_DIR=$</vlc_native
.qt-tools: qt
$(CMAKECLEAN)
=====================================
contrib/src/qtdeclarative/0001-QtQml-do-not-care-about-patch-version-when-checking-.patch
=====================================
@@ -0,0 +1,27 @@
+From 4d163818668fb71745bea44c6c3e01a4a9b3f3e4 Mon Sep 17 00:00:00 2001
+From: Fatih Uzunoglu <fuzun54 at outlook.com>
+Date: Wed, 5 Mar 2025 19:29:58 +0200
+Subject: [PATCH] QtQml: do not care about patch version when checking QML
+ cache
+
+This allows using `qmlcachegen` that has different patch version.
+---
+ src/qml/common/qv4compileddata.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/qml/common/qv4compileddata.cpp b/src/qml/common/qv4compileddata.cpp
+index 9dee91f713..0ea3e2912b 100644
+--- a/src/qml/common/qv4compileddata.cpp
++++ b/src/qml/common/qv4compileddata.cpp
+@@ -49,7 +49,7 @@ bool Unit::verifyHeader(QDateTime expectedSourceTimeStamp, QString *errorString)
+ return false;
+ }
+
+- if (qtVersion != quint32(QT_VERSION)) {
++ if ((qtVersion >> 8) != (quint32(QT_VERSION) >> 8)) {
+ *errorString = QString::fromUtf8("Qt version mismatch. Found %1 expected %2")
+ .arg(qtVersion, 0, 16).arg(QT_VERSION, 0, 16);
+ return false;
+--
+2.48.1
+
=====================================
contrib/src/qtdeclarative/rules.mak
=====================================
@@ -36,6 +36,7 @@ qtdeclarative: qtdeclarative-everywhere-src-$(QTDECLARATIVE_VERSION).tar.xz .sum
$(UNPACK)
$(APPLY) $(SRC)/qtdeclarative/0001-Add-missing-disconnect-and-null-check-in-QQuickPopup.patch
$(APPLY) $(SRC)/qtdeclarative/0001-Add-missing-null-pointer-check-in-QQuickPopup.patch
+ $(APPLY) $(SRC)/qtdeclarative/0001-QtQml-do-not-care-about-patch-version-when-checking-.patch
# disable unused CLI tools: qml, qmleasing, qmldom, qmlformat, qmltc
sed -i.orig -e 's,add_subdirectory(qml),#add_subdirectory(qml),' $(UNPACK_DIR)/tools/CMakeLists.txt
sed -i.orig -e 's,add_subdirectory(qmleasing),#add_subdirectory(qmleasing),' $(UNPACK_DIR)/tools/CMakeLists.txt
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/c30713a3dd851a8e6cacf642b843353f33a9308b...59da34a2ac04beea40fd9f2ab790d82cd1019eeb
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/c30713a3dd851a8e6cacf642b843353f33a9308b...59da34a2ac04beea40fd9f2ab790d82cd1019eeb
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list