summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2024-12-03 14:32:49 -0500
committerIonen Wolkens <ionen@gentoo.org>2024-12-03 14:40:31 -0500
commitf11a6ebb2d114439a74bad155ee780d4523b33ed (patch)
tree41fa1fb236c3d539e28c4b837a5177968481ad6d /dev-games/tiled
parentsci-astronomy/kstars: Add media-libs/opencv USEdep defaults, allow qt5 (diff)
downloadgentoo-f11a6ebb2d114439a74bad155ee780d4523b33ed.tar.gz
gentoo-f11a6ebb2d114439a74bad155ee780d4523b33ed.tar.bz2
gentoo-f11a6ebb2d114439a74bad155ee780d4523b33ed.zip
dev-games/tiled: backport build fix for qt6.8
Meant to try building to see if qbs-2.5.0 was working right, but I ran into a >=qt6.8 build failure instead. Pretty safe fix which just flatten a macro in .qbs files, so doing straight to stable which will likely be needed when we stable 6.8.1 in ~20 days. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-games/tiled')
-rw-r--r--dev-games/tiled/files/tiled-1.11.0-qt680.patch77
-rw-r--r--dev-games/tiled/tiled-1.11.0.ebuild4
2 files changed, 81 insertions, 0 deletions
diff --git a/dev-games/tiled/files/tiled-1.11.0-qt680.patch b/dev-games/tiled/files/tiled-1.11.0-qt680.patch
new file mode 100644
index 000000000000..f6edef42655a
--- /dev/null
+++ b/dev-games/tiled/files/tiled-1.11.0-qt680.patch
@@ -0,0 +1,77 @@
+https://github.com/mapeditor/tiled/pull/4077
+
+From 5a771722aa31c7ce1611ada3fa5b636166e3e3e1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= <bjorn@lindeijer.nl>
+Date: Thu, 10 Oct 2024 12:22:36 +0200
+Subject: [PATCH] Fixed compile against Qt 6.8
+
+Using the QT_VERSION_CHECK macro as value for the
+QT_DISABLE_DEPRECATED_BEFORE define is causing issues since Qt 6.8, for
+example when QByteArray is included without first explicitly including
+QtGlobal.
+--- a/qbs/imports/TiledPlugin.qbs
++++ b/qbs/imports/TiledPlugin.qbs
+@@ -23,7 +23,7 @@ DynamicLibrary {
+ return ["$ORIGIN/../.."];
+ }
+ cpp.defines: [
+- "QT_DISABLE_DEPRECATED_BEFORE=QT_VERSION_CHECK(5,15,0)",
++ "QT_DISABLE_DEPRECATED_BEFORE=0x050F00",
+ "QT_NO_DEPRECATED_WARNINGS",
+ "QT_NO_FOREACH",
+ "QT_NO_URL_CAST_FROM_STRING"
+--- a/qbs/imports/TiledQtGuiApplication.qbs
++++ b/qbs/imports/TiledQtGuiApplication.qbs
+@@ -16,7 +16,7 @@ QtGuiApplication {
+ return flags;
+ }
+ cpp.defines: [
+- "QT_DISABLE_DEPRECATED_BEFORE=QT_VERSION_CHECK(5,15,0)",
++ "QT_DISABLE_DEPRECATED_BEFORE=0x050F00",
+ "QT_NO_DEPRECATED_WARNINGS",
+ "QT_NO_CAST_FROM_ASCII",
+ "QT_NO_CAST_TO_ASCII",
+--- a/src/libtiled/libtiled.qbs
++++ b/src/libtiled/libtiled.qbs
+@@ -30,7 +30,7 @@ DynamicLibrary {
+ "QT_NO_CAST_FROM_ASCII",
+ "QT_NO_CAST_TO_ASCII",
+ "QT_NO_URL_CAST_FROM_STRING",
+- "QT_DISABLE_DEPRECATED_BEFORE=QT_VERSION_CHECK(5,15,0)",
++ "QT_DISABLE_DEPRECATED_BEFORE=0x050F00",
+ "QT_NO_DEPRECATED_WARNINGS",
+ "_USE_MATH_DEFINES",
+ ]
+--- a/src/libtiledquick/libtiledquick.qbs
++++ b/src/libtiledquick/libtiledquick.qbs
+@@ -21,7 +21,7 @@ DynamicLibrary {
+ "QT_NO_CAST_FROM_ASCII",
+ "QT_NO_CAST_TO_ASCII",
+ "QT_NO_URL_CAST_FROM_STRING",
+- "QT_DISABLE_DEPRECATED_BEFORE=QT_VERSION_CHECK(5,15,0)",
++ "QT_DISABLE_DEPRECATED_BEFORE=0x050F00",
+ "QT_NO_DEPRECATED_WARNINGS",
+ "QT_NO_FOREACH"
+ ]
+--- a/src/tiled/libtilededitor.qbs
++++ b/src/tiled/libtilededitor.qbs
+@@ -39,7 +39,7 @@ DynamicLibrary {
+ var defs = [
+ "TILED_EDITOR_LIBRARY",
+ "TILED_VERSION=" + project.version,
+- "QT_DISABLE_DEPRECATED_BEFORE=QT_VERSION_CHECK(5,15,0)",
++ "QT_DISABLE_DEPRECATED_BEFORE=0x050F00",
+ "QT_NO_DEPRECATED_WARNINGS",
+ "QT_NO_CAST_FROM_ASCII",
+ "QT_NO_CAST_TO_ASCII",
+--- a/src/tiledquickplugin/tiledquickplugin.qbs
++++ b/src/tiledquickplugin/tiledquickplugin.qbs
+@@ -19,7 +19,7 @@ DynamicLibrary {
+ return flags;
+ }
+ cpp.defines: [
+- "QT_DISABLE_DEPRECATED_BEFORE=QT_VERSION_CHECK(5,15,0)",
++ "QT_DISABLE_DEPRECATED_BEFORE=0x050F00",
+ "QT_NO_DEPRECATED_WARNINGS",
+ "QT_NO_CAST_FROM_ASCII",
+ "QT_NO_CAST_TO_ASCII",
diff --git a/dev-games/tiled/tiled-1.11.0.ebuild b/dev-games/tiled/tiled-1.11.0.ebuild
index 66a5a4df0232..9269ae16e168 100644
--- a/dev-games/tiled/tiled-1.11.0.ebuild
+++ b/dev-games/tiled/tiled-1.11.0.ebuild
@@ -33,6 +33,10 @@ BDEPEND="
QBS_PRODUCTS="tiled,csv,json"
+PATCHES=(
+ "${FILESDIR}"/${P}-qt680.patch
+)
+
pkg_setup() {
if use python; then
python-single-r1_pkg_setup