diff --git a/find-lang-qt-qm.patch b/find-lang-qt-qm.patch new file mode 100644 index 0000000..c413fda --- /dev/null +++ b/find-lang-qt-qm.patch @@ -0,0 +1,33 @@ +Author: Fabian Vogt +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 +--- + 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:^[^%].*:: diff --git a/rpm.changes b/rpm.changes index debbaf5..5ad1109 100644 --- a/rpm.changes +++ b/rpm.changes @@ -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 diff --git a/rpm.spec b/rpm.spec index 9c7e1bd..8447c34 100644 --- a/rpm.spec +++ b/rpm.spec @@ -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