Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914489 - dev-util/cmake-3.27.5[qt5] builds against qt6
Summary: dev-util/cmake-3.27.5[qt5] builds against qt6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-21 12:49 UTC by Eugene Shalygin
Modified: 2024-01-04 00:08 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Shalygin 2023-09-21 12:49:29 UTC
If Qt6 is installed, cmake prefers that.

Proposed change:

--- /var/db/repos/gentoo/dev-util/cmake/cmake-3.27.5.ebuild 2023-09-15 09:18:03.385925903 +0200
+++ cmake-3.27.6.ebuild 2023-09-21 14:43:48.919430804 +0200
@@ -60,7 +60,8 @@
 
 LICENSE="BSD"
 SLOT="0"
-IUSE="${CMAKE_DOCS_USEFLAG} dap emacs ncurses qt5 test"
+IUSE="${CMAKE_DOCS_USEFLAG} dap emacs ncurses qt5 qt6 test"
+REQUIRED_USE="?? ( qt5 qt6 )"
 RESTRICT="!test? ( test )"
 
 RDEPEND="
@@ -80,6 +81,9 @@
        dev-qt/qtgui:5
        dev-qt/qtwidgets:5
    )
+   qt6? (
+       dev-qt/qtbase:6[widgets]
+   )
 "
 DEPEND="${RDEPEND}"
 BDEPEND+="
@@ -205,7 +209,8 @@
        -DBUILD_CursesDialog="$(usex ncurses)"
        -DBUILD_TESTING=$(usex test)
    )
-   use qt5 && mycmakeargs+=( -DBUILD_QtDialog=ON )
+   use qt5 && mycmakeargs+=( -DBUILD_QtDialog=ON -DCMake_QT_MAJOR_VERSION=5 )
+   use qt6 && mycmakeargs+=( -DBUILD_QtDialog=ON -DCMake_QT_MAJOR_VERSION=6 )
 
    cmake_src_configure
 }


Reproducible: Always
Comment 1 Eugene Shalygin 2023-09-22 10:02:02 UTC
3.27.6 is affected as well
Comment 2 Larry the Git Cow gentoo-dev 2023-09-22 18:35:56 UTC
The bug has been closed via the following commit(s):

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

commit 1d61e152357e6c2ce6dcd45335a5b6c86000584e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-22 18:32:31 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-22 18:35:15 +0000

    dev-util/cmake: fix Qt 6 automagic; migrate to USE=gui
    
    * Migrate to USE=gui per QA policy (PG0802, https://projects.gentoo.org/qa/policy-guide/use-flags.html#pg0802)
      which has the nice consequence of helping to avoid circular dependencies (iirc,
      been a while since I've seen it, although it's obvious for Qt 6)
      for users who are just trying to prefer Qt 5/6 over GTK or whatever in make.conf.
    
    * Just require Qt 6 for USE=gui instead of allowing Qt 5 too given Qt 5 is
      on the way out and we have to start shifting preference at some point. Pretty
      low risk for CMake given the GUI for it isn't that well-used anyway AFAIK.
    
    Closes: https://bugs.gentoo.org/914489
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/cmake/cmake-3.27.6-r1.ebuild        | 291 +++++++++++++++++++++++++++
 dev-util/cmake/cmake-9999.ebuild             |  17 +-
 profiles/arch/hppa/package.use.mask          |   4 +
 profiles/arch/ia64/package.use.mask          |   4 +
 profiles/arch/loong/package.use.mask         |   4 +
 profiles/arch/powerpc/ppc32/package.use.mask |   4 +
 profiles/arch/powerpc/ppc64/package.use.mask |   4 +
 profiles/arch/riscv/package.use.mask         |   4 +
 profiles/arch/s390/package.use.mask          |   4 +
 profiles/arch/sparc/package.use.mask         |   4 +
 10 files changed, 331 insertions(+), 9 deletions(-)
Comment 3 Eugene Shalygin 2023-09-22 21:44:39 UTC
Can we, please, begin to shift preferences after Plasma 6 is out? The application displays a lot of texts, and that is exactly its purpose. Reading texts rendered by Qt6 in the current Plasma 5 environment is accompanied by eye strain.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-22 22:19:36 UTC
(In reply to Eugene Shalygin from comment #3)
(replying in inverted order)

> The application displays a lot of texts, and that is exactly its purpose.

Sure, I've not disputed that. I guess your point is that the following part is unavoidable:

> Reading texts rendered by Qt6 in the current Plasma 5 environment is
> accompanied by eye strain.
> Can we, please, begin to shift preferences after Plasma 6 is out?

Sure, I didn't realise there was any difference in rendering / that it was jarring between Plasma and CMake.

I don't use the GUI for CMake so I'm happy to defer, even if I wish we could default to Qt 6 for it. But be prepared for other things to do it as time goes on anyway.
Comment 5 Larry the Git Cow gentoo-dev 2023-09-22 22:25:16 UTC
The bug has been referenced in the following commit(s):

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

commit bec4e679facdb731b90fa17aa0ecb30898d46fab
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-09-22 22:21:34 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-09-22 22:25:06 +0000

    dev-util/cmake: default to Qt 5 for now with USE=gui
    
    Unfortunate, but I don't use the CMake GUI and the user has a reasonable
    request here. Still make Qt 6 available w/ USE=qt6 though.
    
    Revisit when Plasma 6 is out to avoid the referenced jarring issue wrt
    text rendering.
    
    Bug: https://bugs.gentoo.org/914489
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/cmake/cmake-3.27.6-r1.ebuild | 13 +++++++++----
 dev-util/cmake/cmake-9999.ebuild      | 13 +++++++++----
 2 files changed, 18 insertions(+), 8 deletions(-)
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-09-22 22:29:33 UTC
I hope that helps, thanks for raising the problem.
Comment 7 Eugene Shalygin 2023-09-23 06:59:27 UTC
Thank you!
Comment 8 Larry the Git Cow gentoo-dev 2024-01-04 00:07:26 UTC
The bug has been referenced in the following commit(s):

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

commit c0a1599636745daebba550af40465302eb0c93d9
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-03 23:57:42 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-03 23:57:42 +0000

    profiles/targets/desktop: add dev-util/cmake[-qt6]
    
    I forgot to update this when switching CMake's GUI USE logic back (for now) until
    more packages support Qt 6 (bug #914489).
    
    Pointed out by josef64 on IRC.
    
    Bug: https://bugs.gentoo.org/914489
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/targets/desktop/package.use | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-04 00:08:33 UTC
... or, I suppose I didn't really need to do that, given USE=qt6 never meant "pick me as a GUI" (we have USE=gui now), but whatever.