Accepting request 487336 from home:favogt:branches:Base:System

Add patch to handle special case of .qm file paths correctly (boo#1027925):
  * find-lang-qt-qm.patch

OBS-URL: https://build.opensuse.org/request/show/487336
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=392
This commit is contained in:
Michael Schröder 2017-05-01 21:01:09 +00:00 committed by Git OBS Bridge
parent 7e7de860a3
commit b2c201fbd2
3 changed files with 41 additions and 1 deletions

33
find-lang-qt-qm.patch Normal file
View File

@ -0,0 +1,33 @@
Author: Fabian Vogt <fvogt@suse.com>
Subject: Handle special cases of qt translations correctly
References: boo#1027925
Some KDE frameworks write their translations to files like this:
/usr/share/locale/ca/LC_MESSAGES/libkirigami2plugin_qt.qm
Without this patch it gets detected as %lang(qt), which is obviously
incorrect. This copies two lines from the .mo handling and adjusts
them to handle _qt.qm files as well. "qt" is not an official ISO language
code, so this should not break anything in the past or hopefully the future.
Signed-off-by: Fabian Vogt <fvogt@suse.com>
---
scripts/find-lang.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- scripts/find-lang.sh.orig
+++ scripts/find-lang.sh
@@ -303,9 +303,11 @@ s:%lang(C) ::
find "$TOP_DIR" -type f -o -type l|sed '
s:'"$TOP_DIR"'::
-'"$NO_ALL_NAME$QT"'s:\(.*/'"$NAME"'_\([a-zA-Z]\{2\}\([_@].*\)\?\)\.qm$\):%lang(\2) \1:
+'"$ALL_NAME$QT"'s:\(.*/locale/\)\([^/]\+\)\(/.\+/\)\([^/]\+_qt\.qm$\):%lang(\2) \1\2\3\4:
+'"$NO_ALL_NAME$QT"'s:\(.*/locale/\)\([^/]\+\)\(/.\+/\)\('"$NAME"'_qt\.qm$\):%lang(\2) \1\2\3\4:
+'"$NO_ALL_NAME$QT"'s:^\([^%].*/'"$NAME"'_\([a-zA-Z]\{2\}\([_@].*\)\?\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:\(.*/[^/_]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
-'"$ALL_NAME$QT"'s:\(.*/[^/_]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
+'"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
'"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
s:^[^%].*::

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Apr 10 14:25:07 UTC 2017 - fvogt@suse.com
- Add patch to handle special case of .qm file paths correctly (boo#1027925):
* find-lang-qt-qm.patch
-------------------------------------------------------------------
Fri Mar 17 18:14:37 UTC 2017 - kukuk@suse.com

View File

@ -144,6 +144,7 @@ Patch99: enable-postin-scripts-error.diff
Patch100: rpm-findlang-inject-metainfo.patch
Patch101: nobfd.diff
Patch102: emptymanifest.diff
Patch103: find-lang-qt-qm.patch
Patch6464: auto-config-update-aarch64-ppc64le.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
@ -239,7 +240,7 @@ rm -f rpmdb/db.h
%patch -P 70 -P 71 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79
%patch -P 80 -P 81 -P 82 -P 83 -P 85
%patch -P 92 -P 93 -P 94 -P 96 -P 98 -P 99
%patch -P 100 -P 101 -P 102
%patch -P 100 -P 101 -P 102 -P 103
%ifarch aarch64 ppc64le
%patch6464