microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.23k stars 6.4k forks source link

[qt] split out Qt Linguist as a feature of qt-tools #20244

Closed wrobelda closed 1 month ago

wrobelda commented 3 years ago

Is your feature request related to a problem? Please describe. Almost all KDE ports depend on Qt Linguist for their internationalization purposes. However, Qt Linguist is included in qt-tools bundle, which is a heavy dependency. Qt6 port already split out some of the tools as separate features, but Qt Linguist is not one of them.

This was previously discussed with @Neumann-A, so I opened this issue to track progress.

Proposed solution Split out Qt Linguist as a separate feature, so that the KDE ports can explicitly depend on it and it only.

Neumann-A commented 3 years ago

Linguist depends on Assistant for some reason so you wont get a lot of improvement unless upstream changes that. (See Qt 6.2 pr)

dg0yt commented 3 years ago

Doesn't KDE use gettext? Or do you refer to Qt Linguist as one possible frontend for editing KDE translation files?

wrobelda commented 3 years ago

@dg0yt implicitly by using ki18n framework, but some of the frameworks use Qt translation instead.

wrobelda commented 3 years ago

I was told that the dependency is due to:

"qt5_create_translation() which depends on lupdate. That is a tool which your distro may package with linguist, but there is no actual dependency on the linguist application."

Linguist depends on Assistant for some reason so you wont get a lot of improvement unless upstream changes that.

So, in light of above, would it be possible to have the lupdate and lrelease singled out, or maybe even included with qt5-base?

For the reference: https://doc.qt.io/qt-5/linguist-manager.html

dg0yt commented 3 years ago

In my current superbuild (not vcpkg), the linguist solution is app.:

"${CMAKE_COMMAND}" -E make_directory src/linguist
"${CMAKE_COMMAND}" -E chdir src/linguist "@qmake@" "${SOURCE_DIR}/src/linguist"
"$(MAKE)" -C src/linguist
"$(MAKE)" -C src/linguist install INSTALL_ROOT=${DESTDIR}
wrobelda commented 3 years ago

@dg0yt right, but we actually depend on lupdate (and possibly lrelease) only

JackBoosY commented 3 years ago

Marked this issue as port-feature temporary.

wrobelda commented 2 years ago

@dg0yt right, but we actually depend on lupdate (and possibly lrelease) only

Correcting myself here: the fact we depend on those binaries only is in fact irrelevant, we look them up with:

 find_package(Qt5LinguistTools CONFIG REQUIRED)

    if(TARGET Qt5::lconvert)
        set(lconvert_executable Qt5::lconvert)
    else()

, so still depend on Qt5LinguistTools.

XapaJIaMnu commented 2 years ago

Is QT Linguist part of the qttools port? It's not detected for me from a 3rd party cmake project:

-- Could NOT find Qt6LinguistTools (missing: Qt6LinguistTools_DIR)

A bit reminiscent of: https://github.com/microsoft/vcpkg/issues/2834 At any rate, i'd also be interested in a qt linguist only package.

Neumann-A commented 2 years ago

Is QT Linguist part of the qttools port?

Yes it is

It's not detected for me from a 3rd party cmake project:

probably doing something wrong or somebody is manipulating CMAKE_PREFIX_PATH

[cmake] -- The following REQUIRED packages have been found:
<snip>
[cmake]  * Qt6LinguistTools

At any rate, i'd also be interested in a qt linguist only package.

That will not happen unless upstream changes qttools and extracts that as a standalone module.

XapaJIaMnu commented 2 years ago

@Neumann-A thanks for the explanation. I used github workflow with vcpkg 50fd3d995. My package built successfully when using qt5-base and qt5-tools as opposed to when using the qt6 counterparts where some of the QT components could not be found. I will try to experiment outside of a VM when I get the chance and file issues if necessary.

github-actions[bot] commented 1 month ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 180 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.