Hello community,
here is the log from the commit of package solarus-quest-editor for
openSUSE:Factory checked in at 2019-08-15 12:28:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/solarus-quest-editor (Old)
and /work/SRC/openSUSE:Factory/.solarus-quest-editor.new.9556 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "solarus-quest-editor"
Thu Aug 15 12:28:31 2019 rev:6 rq:723258 version:1.6.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/solarus-quest-editor/solarus-quest-editor.changes
2019-08-13 13:22:17.481402170 +0200
+++
/work/SRC/openSUSE:Factory/.solarus-quest-editor.new.9556/solarus-quest-editor.changes
2019-08-15 12:28:37.554535472 +0200
@@ -1,0 +2,10 @@
+Mon Aug 12 08:13:44 UTC 2019 - [email protected]
+
+- Install translations:
+ * Add solarus-quest-editor-v1.6.1-install-translations.patch
+ which allows installation of translation files with CMake.
+ * Add lang subpackage.
+- Split assets into a noarch subpackage.
+- Drop obsolete build dependency on update-desktop-files.
+
+-------------------------------------------------------------------
New:
----
solarus-quest-editor-v1.6.1-install-translations.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ solarus-quest-editor.spec ++++++
--- /var/tmp/diff_new_pack.EgxVga/_old 2019-08-15 12:28:40.342532886 +0200
+++ /var/tmp/diff_new_pack.EgxVga/_new 2019-08-15 12:28:40.386532846 +0200
@@ -24,6 +24,8 @@
Group: Productivity/Graphics/Other
URL: https://www.solarus-games.org/
Source:
https://gitlab.com/solarus-games/solarus-quest-editor/-/archive/v%{version}/%{name}-v%{version}.tar.bz2
+# PATCH-FEATURE-UPSTREAM
https://gitlab.com/solarus-games/solarus-quest-editor/merge_requests/402
+Patch0: %{name}-v1.6.1-install-translations.patch
BuildRequires: cmake >= 2.8.11
BuildRequires: fdupes
BuildRequires: gcc-c++
@@ -31,7 +33,6 @@
BuildRequires: hicolor-icon-theme
BuildRequires: physfs-devel
BuildRequires: solarus-devel >= 1.6.0
-BuildRequires: update-desktop-files
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
@@ -44,13 +45,25 @@
BuildRequires: pkgconfig(openal)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(vorbis)
+Requires: %{name}-assets = %{version}
%description
Solarus Quest Editor is a graphical user interface to create and
modify quests for the Solarus engine.
+%package assets
+Summary: Assets for the Solarus Quest Editor
+Group: Productivity/Graphics/Other
+BuildArch: noarch
+
+%description assets
+This package contains assets for the Solarus Quest Editor.
+
+%lang_package
+
%prep
%setup -q -n %{name}-v%{version}
+%patch0 -p1
%build
%cmake
@@ -59,12 +72,13 @@
%install
%cmake_install
%fdupes %{buildroot}%{_prefix}
+%find_lang solarus_editor --with-qt
%files
%license license.txt license_gpl.txt
%doc readme.md changelog.txt
-%{_bindir}/solarus-quest-editor
-%{_datadir}/solarus-quest-editor
+%{_bindir}/%{name}
+%dir %{_datadir}/%{name}
%dir %{_datadir}/icons/hicolor/20x20
%dir %{_datadir}/icons/hicolor/20x20/apps
%dir %{_datadir}/icons/hicolor/40x40
@@ -73,4 +87,10 @@
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
+%files assets
+%{_datadir}/%{name}/assets
+
+%files lang -f solarus_editor.lang
+%dir %{_datadir}/%{name}/translations
+
%changelog
++++++ solarus-quest-editor-v1.6.1-install-translations.patch ++++++
>From e0898a84ca755ad0e68905198a19023750140d67 Mon Sep 17 00:00:00 2001
From: Antoine Belvire <[email protected]>
Date: Sun, 11 Aug 2019 16:02:51 +0200
Subject: [PATCH] Add install target for translations
This adds a CMake install target for qm files and allows the application to
load them from installation path.
---
cmake/AddInstallTargets.cmake | 3 +++
src/main.cpp | 6 +++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/cmake/AddInstallTargets.cmake b/cmake/AddInstallTargets.cmake
index eaa54e17..3dee926e 100644
--- a/cmake/AddInstallTargets.cmake
+++ b/cmake/AddInstallTargets.cmake
@@ -5,3 +5,6 @@ install(TARGETS solarus-quest-editor
install(DIRECTORY "${CMAKE_SOURCE_DIR}/assets/"
DESTINATION "${SOLARUS_INSTALL_DATADIR}/assets"
)
+install(FILES ${solarus_quest_editor_TRANSLATIONS_QM}
+ DESTINATION "${SOLARUS_INSTALL_DATADIR}/translations"
+)
diff --git a/src/main.cpp b/src/main.cpp
index 45b7e922..66a09439 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -65,7 +65,11 @@ int run_editor_gui(int argc, char* argv[]) {
application.installTranslator(&qt_translator);
QTranslator translator;
- translator.load("solarus_editor_" + QLocale::system().name());
+ QString filename = "solarus_editor_" + QLocale::system().name();
+ bool translation_loaded = translator.load(filename);
+ if (!translation_loaded) {
+ translator.load(filename, SOLARUSEDITOR_DATADIR_PATH "/translations");
+ }
application.installTranslator(&translator);
MainWindow window(nullptr);
--
2.22.0