Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 905698 - dev-qt/linguist-tools-5.15.9: regression in Qt's CMake translation API (blocks media-gfx/opentoonz-1.6.0)
Summary: dev-qt/linguist-tools-5.15.9: regression in Qt's CMake translation API (block...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard: fixed in 5.15.10
Keywords: PATCH, UPSTREAM
Depends on:
Blocks: 905213
  Show dependency tree
 
Reported: 2023-05-04 11:58 UTC by mehw
Modified: 2023-06-13 11:42 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-qt/linguist-tools-5.15.9: fix regression in Qt's CMake translation API (linguist-tools-5.15.9-fix-translation-API-regression.patch,1.36 KB, patch)
2023-05-04 11:58 UTC, mehw
Details | Diff
dev-qt/linguist-tools-5.15.9: fix regression in Qt's CMake translation API (linguist-tools-5.15.9-fix-translation-API-regression.patch,3.36 KB, patch)
2023-05-19 15:06 UTC, mehw
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mehw 2023-05-04 11:58:09 UTC
Created attachment 861122 [details, diff]
dev-qt/linguist-tools-5.15.9: fix regression in Qt's CMake translation API

Hello,
I'm posting this as a reference to the bug described in the subject.

The attached patch allows media-gfx/opentoonz-1.6.0 to compile and run after dev-qt/linguist-tools-5.15.9 is re-compiled.

Currently, I don't know if the patch provided could also break/fix other packages.

Bug reported here:
qt5_create_translation breaks projects with multiple same-named ts files
https://bugreports.qt.io/browse/QTBUG-113152

Backport of upstream patch:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270868#c4
https://people.freebsd.org/~tcberner/patches/0001-Qt-Update-Qt5-to-5.15.9.patch.v2

diff -Nuar a/src/linguist/Qt5LinguistToolsMacros.cmake b/src/linguist/Qt5LinguistToolsMacros.cmake
--- a/src/linguist/Qt5LinguistToolsMacros.cmake	2023-05-04 00:46:05.642493619 +0000
+++ b/src/linguist/Qt5LinguistToolsMacros.cmake	2023-05-04 00:46:47.654701946 +0000
@@ -96,6 +96,13 @@
           file(WRITE ${_ts_lst_file} "${_lst_file_srcs}")
         endif()
         set(stamp_file "${stamp_file_dir}/${_ts_name}.stamp")
+        file(RELATIVE_PATH _ts_relative_path ${CMAKE_CURRENT_SOURCE_DIR} ${_ts_file})
+        string(REPLACE "../" "__/" _ts_relative_path "${_ts_relative_path}")
+        set(stamp_file "${stamp_file_dir}/${_ts_relative_path}.stamp")
+        get_filename_component(full_stamp_file_dir "${stamp_file}" DIRECTORY)
+        if(NOT EXISTS "${full_stamp_file_dir}")
+            file(MAKE_DIRECTORY "${full_stamp_file_dir}")
+        endif()
         add_custom_command(OUTPUT ${stamp_file}
             COMMAND ${Qt5_LUPDATE_EXECUTABLE}
             ARGS ${_lupdate_options} "@${_ts_lst_file}" -ts ${_ts_file}
Comment 1 Andreas Sturmlechner gentoo-dev 2023-05-14 09:09:29 UTC
The codereview from your linked QTBUG has matured a lot:

https://codereview.qt-project.org/gitweb?p=qt/qttools.git;a=commitdiff;h=af5f42cb1e6224ed5c0861069a7e3ee19d133347
Comment 2 mehw 2023-05-19 15:06:43 UTC
Created attachment 862009 [details, diff]
dev-qt/linguist-tools-5.15.9: fix regression in Qt's CMake translation API

Thanks, patch updated.

Compiling dev-libs/qtkeychain-0.13.2 and qtkeychain-0.14.0 failed with the old patch:

ninja: error: '.lupdate/qtkeychain_de.ts.stamp', needed by 'qtkeychain_de.qm', missing and no known rule to make it

I compiled successfully the following with the new patch:

app-admin/keepassxc-2.7.4
app-admin/testdisk-7.1-r2
app-emulation/q4wine-1.3.13
app-misc/ckb-0.5.0-r1
app-office/scribus-1.5.8-r5
dev-db/sqlitestudio-3.4.4
dev-libs/qtkeychain-0.13.2
dev-qt/qt-creator-8.0.2
dev-util/cutter-2.2.0-r1
kde-frameworks/kwindowsystem-5.104.0
kde-frameworks/sonnet-5.104.0
kde-frameworks/syntax-highlighting-5.104.0
media-gfx/flameshot-12.1.0-r2
media-gfx/gmic-3.2.0
media-gfx/opentoonz-1.6.0
media-sound/lmms-1.2.2
media-sound/musescore-3.6.2-r1
media-sound/qjackctl-0.9.10
media-sound/qsynth-0.9.10
media-video/avidemux-2.8.1
net-analyzer/wireshark-4.0.5
net-im/qtox-1.17.6-r1
net-voip/mumble-1.4.287-r1
x11-libs/snorenotify-0.7.0-r1
x11-misc/qt5ct-1.7
x11-themes/kvantum-1.0.7
Comment 3 Andreas Sturmlechner gentoo-dev 2023-06-13 09:35:59 UTC
Merged (in KDE) upstream.
Comment 4 Larry the Git Cow gentoo-dev 2023-06-13 11:42:47 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=abca94b8e2717825007bd2704ce01051ee79a339

commit abca94b8e2717825007bd2704ce01051ee79a339
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2023-06-13 11:23:14 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2023-06-13 11:41:08 +0000

    dev-qt/linguist-tools: 5.15.10 version bump
    
    Closes: https://bugs.gentoo.org/905698
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-qt/linguist-tools/Manifest                     |  2 ++
 .../linguist-tools/linguist-tools-5.15.10.ebuild   | 37 ++++++++++++++++++++++
 2 files changed, 39 insertions(+)