diff --git a/bundle-lang.patch b/bundle-lang.patch new file mode 100644 index 0000000..52b979a --- /dev/null +++ b/bundle-lang.patch @@ -0,0 +1,34 @@ +From 8c4c416228acf30862792b4a0da24d865988ea0f Mon Sep 17 00:00:00 2001 +From: Wolfgang Bauer +Date: Thu, 13 Jul 2017 16:53:08 +0200 +Subject: [PATCH] Also search in /usr/share/locale-bundle/ for translations + +openSUSE's bundle-lang packages install the translations in +/usr/share/locale-bundle/ to not conflict with the standard -lang +packages. + +So look there too if a translation was not found in /usr/share/locale/. +--- + modules/ECMQmLoader.cpp.in | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/modules/ECMQmLoader.cpp.in b/modules/ECMQmLoader.cpp.in +index 12a2d14..81fb6fb 100644 +--- a/modules/ECMQmLoader.cpp.in ++++ b/modules/ECMQmLoader.cpp.in +@@ -43,7 +43,11 @@ namespace { + QString subPath = QStringLiteral("locale/") + localeDirName + QStringLiteral("/LC_MESSAGES/@QM_LOADER_CATALOG_NAME@.qm"); + QString fullPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, subPath); + if (fullPath.isEmpty()) { +- return false; ++ subPath = QStringLiteral("locale-bundle/") + localeDirName + QStringLiteral("/LC_MESSAGES/@QM_LOADER_CATALOG_NAME@.qm"); ++ fullPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, subPath); ++ if (fullPath.isEmpty()) { ++ return false; ++ } + } + QTranslator *translator = new QTranslator(QCoreApplication::instance()); + if (!translator->load(fullPath)) { +-- +2.12.3 + diff --git a/extra-cmake-modules.changes b/extra-cmake-modules.changes index 28b2dc3..3072a5e 100644 --- a/extra-cmake-modules.changes +++ b/extra-cmake-modules.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 13 14:22:07 UTC 2017 - wbauer@tmo.at + +- Add bundle-lang patch to find .qm translations in + /usr/share/locale-bundle/ (boo#1027925, boo#1048030) + ------------------------------------------------------------------- Wed Jul 12 07:13:58 CEST 2017 - lbeltrame@kde.org diff --git a/extra-cmake-modules.spec b/extra-cmake-modules.spec index 1d054b8..088f685 100644 --- a/extra-cmake-modules.spec +++ b/extra-cmake-modules.spec @@ -25,6 +25,8 @@ Url: https://projects.kde.org/projects/kdesupport/extra-cmake-modules Version: 5.36.0 Release: 0 Source: http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz +# PATCH-FIX-OPENSUSE +Patch0: bundle-lang.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: cmake >= 3.0 BuildRequires: gcc-c++ @@ -58,6 +60,7 @@ This package provides documentation for extra-cmake-modules %prep %setup -q +%patch0 -p1 %build %cmake_kf5 -d build