diff --git a/tiled-fix-64bit-plugin-finding.patch b/tiled-fix-64bit-plugin-finding.patch new file mode 100644 index 0000000..6aca892 --- /dev/null +++ b/tiled-fix-64bit-plugin-finding.patch @@ -0,0 +1,50 @@ +From a404606925c0f0edbc9cee5e04f48d9a7d490d6b Mon Sep 17 00:00:00 2001 +From: Erik Schilling +Date: Sat, 15 Mar 2014 13:32:57 +0100 +Subject: [PATCH] Added a USE_FHS_PLUGIN_PATH switch + +Setting this variable during the qmake run will make tiled +correctly picking up the install dir of plugins if the +lib path differs from "../lib" (generally the case for 64 bit releases). +--- + src/tiled/pluginmanager.cpp | 5 +++++ + tiled.pri | 5 +++++ + 2 files changed, 10 insertions(+) + +diff --git a/src/tiled/pluginmanager.cpp b/src/tiled/pluginmanager.cpp +index 7755d42..078fa84 100644 +--- a/src/tiled/pluginmanager.cpp ++++ b/src/tiled/pluginmanager.cpp +@@ -62,11 +62,16 @@ void PluginManager::loadPlugins() + mPlugins.append(Plugin(QLatin1String(""), instance)); + + // Determine the plugin path based on the application location ++#ifndef TILED_PLUGIN_DIR + QString pluginPath = QCoreApplication::applicationDirPath(); ++#endif ++ + #ifdef Q_OS_WIN32 + pluginPath += QLatin1String("/plugins/tiled"); + #elif defined(Q_OS_MAC) + pluginPath += QLatin1String("/../PlugIns"); ++#elif defined(TILED_PLUGIN_DIR) ++ QString pluginPath = QLatin1String(TILED_PLUGIN_DIR); + #else + pluginPath += QLatin1String("/../lib/tiled/plugins"); + #endif +diff --git a/tiled.pri b/tiled.pri +index 66a6a42..1ec9c8c 100644 +--- a/tiled.pri ++++ b/tiled.pri +@@ -10,3 +10,8 @@ macx { + } + + CONFIG += depend_includepath ++ ++ ++!isEmpty(USE_FHS_PLUGIN_PATH) { ++ DEFINES += TILED_PLUGIN_DIR=\\\"$${LIBDIR}/tiled/plugins/\\\" ++} +-- +1.8.5.3 + diff --git a/tiled.spec b/tiled.spec index 419db15..a255ebb 100644 --- a/tiled.spec +++ b/tiled.spec @@ -1,11 +1,13 @@ Name: tiled Version: 0.9.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Tiled Map Editor # tiled itself is GPLv2+, libtiled and tmxviewer are BSD License: GPLv2+ and BSD URL: http://www.mapeditor.org Source0: http://sourceforge.net/projects/%{name}/files/%{name}-qt/%{version}/%{name}-qt-%{version}.tar.gz +# See: https://github.com/bjorn/tiled/issues/269 +Patch0: %{name}-fix-64bit-plugin-finding.patch BuildRequires: qt4-devel BuildRequires: desktop-file-utils @@ -19,13 +21,66 @@ in C++, using the Qt application framework. This package contains the tiled application and tmxviewer, a simple application to view Tiled maps. +%define pluginwarning Warning: This plugin does not offer full compatibility with Tileds features. + +%package plugin-tmw +Summary: The Mana World plugin for tiled +License: GPLv2+ +URL: http://www.mapeditor.org +Requires: %{name} = %{version}-%{release} +%description plugin-tmw +A plugin for tiled which allows to export maps as eAthena collision files. + +%{pluginwarning} + +%package plugin-droidcraft +Summary: Droidcraft plugin for tiled +License: GPLv2+ +URL: http://www.mapeditor.org +Requires: %{name} = %{version}-%{release} +%description plugin-droidcraft +A plugin for tiled which allows to save maps as .dat droidcraft maps. + +%{pluginwarning} + +%package plugin-flare +Summary: Flare plugin for tiled +License: GPLv2+ +URL: http://www.mapeditor.org +Requires: %{name} = %{version}-%{release} +%description plugin-flare +A plugin for tiled which allows to save maps as .txt flare maps. + +%{pluginwarning} + +%package plugin-replica-island +Summary: Replica Island plugin for tiled +License: GPLv2+ +URL: http://www.mapeditor.org +Requires: %{name} = %{version}-%{release} +%description plugin-replica-island +A plugin for tiled which allows to save maps as .bin Replica Island maps. + +%{pluginwarning} + +%package plugin-t-engine4 +Summary: T-Engine4 plugin for tiled +License: GPLv2+ +URL: http://www.mapeditor.org +Requires: %{name} = %{version}-%{release} +%description plugin-t-engine4 +A plugin for tiled which allows to export maps as .lua T-Engine4 maps. + +%{pluginwarning} + %prep %setup -q -n %{name}-qt-%{version} +%patch0 -p1 # Remove copy of zlib rm -rf src/zlib %build -qmake-qt4 -r PREFIX=%{_prefix} LIBDIR=%{_libdir} RPATH=no +qmake-qt4 -r PREFIX=%{_prefix} LIBDIR=%{_libdir} RPATH=no USE_FHS_PLUGIN_PATH=yes make %{?_smp_mflags} %install @@ -71,13 +126,39 @@ fi %dir %{_datadir}/%{name}/ %dir %{_datadir}/%{name}/translations %{_libdir}/lib%{name}.so.* -%{_libdir}/%{name} + +%dir %{_libdir}/%{name}/ +%dir %{_libdir}/%{name}/plugins/ + +# Core plugins +%{_libdir}/%{name}/plugins/libjson.so +%{_libdir}/%{name}/plugins/liblua.so + %{_mandir}/man1/automappingconverter.1* %{_mandir}/man1/%{name}.1* %{_mandir}/man1/tmxrasterizer.1* %{_mandir}/man1/tmxviewer.1* +%files plugin-tmw +%{_libdir}/%{name}/plugins/libtmw.so + +%files plugin-droidcraft +%{_libdir}/%{name}/plugins/libdroidcraft.so + +%files plugin-flare +%{_libdir}/%{name}/plugins/libflare.so + +%files plugin-replica-island +%{_libdir}/%{name}/plugins/libreplicaisland.so + +%files plugin-t-engine4 +%{_libdir}/%{name}/plugins/libtengine.so + %changelog +* Sat Mar 15 2014 Erik Schilling - 0.9.1-2 +- Fixed detection of plugins on 64bit +- Splitted plugins into subpackages + * Sat Jul 27 2013 Erik Schilling 0.9.1-1 - New upstream release 0.9.1