Accepting request 1226201 from games:tools
OBS-URL: https://build.opensuse.org/request/show/1226201 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tiled?expand=0&rev=42
This commit is contained in:
commit
2e0aa05298
96
fix_compile_against_qt_6_8.patch
Normal file
96
fix_compile_against_qt_6_8.patch
Normal file
@ -0,0 +1,96 @@
|
||||
From 37013721af5b22caafa6a32285d01d57ee608823 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= <bjorn@lindeijer.nl>
|
||||
Date: Thu, 10 Oct 2024 21:54:26 +0200
|
||||
Subject: [PATCH] Fixed compile against Qt 6.8 (#4077)
|
||||
|
||||
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.
|
||||
---
|
||||
qbs/imports/TiledPlugin.qbs | 2 +-
|
||||
qbs/imports/TiledQtGuiApplication.qbs | 2 +-
|
||||
src/libtiled/libtiled.qbs | 2 +-
|
||||
src/libtiledquick/libtiledquick.qbs | 2 +-
|
||||
src/tiled/libtilededitor.qbs | 2 +-
|
||||
src/tiledquickplugin/tiledquickplugin.qbs | 2 +-
|
||||
6 files changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/qbs/imports/TiledPlugin.qbs b/qbs/imports/TiledPlugin.qbs
|
||||
index 84521b3185..4f0642ca6e 100644
|
||||
--- 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"
|
||||
diff --git a/qbs/imports/TiledQtGuiApplication.qbs b/qbs/imports/TiledQtGuiApplication.qbs
|
||||
index 5cfa630465..fcdd5ea5f0 100644
|
||||
--- 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",
|
||||
diff --git a/src/libtiled/libtiled.qbs b/src/libtiled/libtiled.qbs
|
||||
index 6dda343a71..21e0357e24 100644
|
||||
--- 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",
|
||||
]
|
||||
diff --git a/src/libtiledquick/libtiledquick.qbs b/src/libtiledquick/libtiledquick.qbs
|
||||
index 7c868d251f..055665e25d 100644
|
||||
--- 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"
|
||||
]
|
||||
diff --git a/src/tiled/libtilededitor.qbs b/src/tiled/libtilededitor.qbs
|
||||
index 9e576776b4..b31c299cf1 100644
|
||||
--- 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",
|
||||
diff --git a/src/tiledquickplugin/tiledquickplugin.qbs b/src/tiledquickplugin/tiledquickplugin.qbs
|
||||
index 63a64a5507..729a732bb0 100644
|
||||
--- 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",
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 13 22:46:23 UTC 2024 - Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@fastmail.net>
|
||||
|
||||
- Don't harcode the g++ version
|
||||
- Add fix_compile_against_qt_6_8.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 28 05:29:20 UTC 2024 - Michael Vetter <mvetter@suse.com>
|
||||
|
||||
|
@ -23,6 +23,8 @@ Summary: A tilemap editor
|
||||
License: GPL-2.0-or-later
|
||||
URL: https://www.mapeditor.org
|
||||
Source: https://github.com/mapeditor/tiled/archive/refs/tags/v%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM gh/mapeditor/tiled#4077
|
||||
Patch1: fix_compile_against_qt_6_8.patch
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
@ -60,13 +62,13 @@ This package contains tmxviewer, a simple application to view Tiled maps
|
||||
and tmxrasterizer which is also a command line tool.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -p1
|
||||
# Remove copy of zlib
|
||||
rm -rf src/zlib
|
||||
|
||||
%build
|
||||
# see gh/mapeditor/tiled#3613 why no --detect
|
||||
qbs setup-toolchains --type gcc %{_bindir}/g++-13 gcc
|
||||
qbs setup-toolchains --type gcc %{_bindir}/g++ gcc
|
||||
qbs setup-qt %{_bindir}/qmake6 defprof
|
||||
qbs config defaultProfile defprof
|
||||
qbs qbs.installPrefix:"%{_prefix}" projects.Tiled.useRPaths:false projects.Tiled.libDir:%{_lib}
|
||||
|
Loading…
x
Reference in New Issue
Block a user