Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922636 - net-irc/kvirc-5.2.0 (and 9999) automagically selects Qt6 if installed
Summary: net-irc/kvirc-5.2.0 (and 9999) automagically selects Qt6 if installed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Alexey
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-01-21 17:20 UTC by David Korth
Modified: 2024-01-22 05:53 UTC (History)
3 users (show)

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


Attachments
net-irc/kvirc-9999 build.log (net-irc:kvirc-9999:20240121-195234.log,182.00 KB, text/plain)
2024-01-21 19:56 UTC, David Korth
Details
Actual net-irc/kvirc-9999 build.log (net-irc:kvirc-9999:20240121-195047.log.gz,156.57 KB, application/gzip)
2024-01-21 19:58 UTC, David Korth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Korth 2024-01-21 17:20:56 UTC
KVIrc 5.2.0 supports both Qt5 and Qt6. If Qt6 is installed, it will automatically select Qt6, regardless of if Qt5 is also installed or not.

Either the "qt5" or "qt6" (or both?) USE flags should be added in order to allow proper selection of the Qt version.

Note that CMakeLists.txt will need to be updated to allow for Qt version selection, since it currently has this:

# first check if Qt6 or Qt5 has to be used
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)

This needs to be changed to check for a variable, e.g. USE_QT6 and USE_QT5, and the ebuild needs to specify which one to use.

Reproducible: Always

Steps to Reproduce:
1. USE="qt5 -qt6"
2. emerge qtbase qttools qt5compat
3. emerge =net-irc/kvirc
Actual Results:  
kvirc is built using Qt6.

Expected Results:  
kvirc should be built using Qt5.
Comment 1 Alexey 2024-01-21 17:55:10 UTC
I've specifically added -DQT_VERSION_MAJOR=5 to the ebuild to avoid this issue :( I tested it with Qt6 installed, and Qt5 was chosen correctly.

Can you show build.log?

P.S. My plan is to add the qt6 USE-flag when KDE 6 is out, because net-irc/kvirc[kde] depends on it, and I don't want to add REQUIRED_USE to force users to choose between Qt6 and KDE support
Comment 2 David Korth 2024-01-21 19:56:32 UTC
Created attachment 882802 [details]
net-irc/kvirc-9999 build.log

build.log for net-irc/kvirc-9999 is attached.

The CMake output shows Qt6_FOUND was set to FALSE because Qt6WebEngineWidgets wasn't found. (I don't have Qt6WebEngine installed.) It then continues to fail to find KF6, but then keeps going and still uses Qt6 regardless.
Comment 3 David Korth 2024-01-21 19:58:52 UTC
Created attachment 882803 [details]
Actual net-irc/kvirc-9999 build.log

It seems the build.log I just uploaded only contained a fragment of the end of the log. This one is the full log.
Comment 4 Alexey 2024-01-21 21:14:25 UTC
I fixed it at https://github.com/kvirc/KVIrc/commit/a301aa4998c4f0040d093cd2950b7b2f4ec4dcdc

Please try 9999 again.

5.2.0 should be fixed when my PR is merged.
Comment 5 David Korth 2024-01-22 05:15:00 UTC
Compiled net-irc/kvirc-9999 with that change and it now correctly builds with Qt5.
Comment 6 Larry the Git Cow gentoo-dev 2024-01-22 05:53:38 UTC
The bug has been closed via the following commit(s):

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

commit 26830db60d1c1f3b4579af6dd5f9c4cfe5c4dc73
Author:     Alexey Sokolov <alexey+gentoo@asokolov.org>
AuthorDate: 2024-01-21 21:12:14 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-22 05:52:46 +0000

    net-irc/kvirc: fix forcing of qt5
    
    Closes: https://bugs.gentoo.org/922636
    Signed-off-by: Alexey Sokolov <alexey+gentoo@asokolov.org>
    Closes: https://github.com/gentoo/gentoo/pull/34947
    Signed-off-by: Sam James <sam@gentoo.org>

 net-irc/kvirc/files/kvirc-5.2.0-qtver.patch        | 25 ++++++++++++++++++++++
 .../{kvirc-5.2.0.ebuild => kvirc-5.2.0-r1.ebuild}  |  4 ++++
 2 files changed, 29 insertions(+)