Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 802828 - x11-misc/qt5ct-1.2-r1 "USE=-dbus" build fails if dev-qt/qtdbus not installed
Summary: x11-misc/qt5ct-1.2-r1 "USE=-dbus" build fails if dev-qt/qtdbus not installed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Michał Górny
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-07-19 04:25 UTC by Matthew Ogilvie
Modified: 2021-10-20 09:40 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,3.39 KB, text/plain)
2021-07-19 04:26 UTC, Matthew Ogilvie
Details
emerge.info (emerge.info,6.61 KB, text/plain)
2021-07-19 04:27 UTC, Matthew Ogilvie
Details
Apply new patch and pass DISABLE_DBUS to build (qt5ct-1.2-r1.ebuild.patch,433 bytes, patch)
2021-08-28 13:35 UTC, Nuno Silva
Details | Diff
Add DISABLE_DBUS to the cmake-based build system (qt5ct-1.2-cmake-dbus.patch,1.75 KB, patch)
2021-08-28 13:54 UTC, Nuno Silva
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Ogilvie 2021-07-19 04:25:03 UTC
Steps:

1. Explicitly turn off USE=-dbus in make.conf or similar, and make sure
dev-qt/qtdbus is not installed.

2. emerge -pqv '=x11-misc/qt5ct-1.2-r1::gentoo'
> [ebuild  N    ] x11-misc/qt5ct-1.2-r1  USE="-dbus"
(But originally noticed on an upgrade of another machine that
already had 1.1 installed.)

3. emerge -av x11-misc/qt5ct

With USE=-dbus, cmake fails to build qt5ct with the message:

[snip]
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> CMake Error at /usr/lib64/cmake/Qt5/Qt5Config.cmake:28 (find_package):
>  Could not find a package configuration file provided by "Qt5DBus" with any
>  of the following names:
>
>     Qt5DBusConfig.cmake
>     qt5dbus-config.cmake
[snip]

Presumably it would "work" if I manually installed qtdbus first (or turned
on USE=dbus), but I haven't actually tried either.

Reproducible: Always




A few related things I noticed:

1. The only explicit check for the dbus USE flag in the ebuild is for some
conditional dependencies.  Nothing obvious adjusts the upstream build
system from the dbus USE flag.
2. The upstream README mentions a way to disable dbus, but in the qmake
section, not the cmake section.  The CMakeLists.txt file doesn't have any
sign of it being configurable, and I don't know enough about cmake to guess
how to fix it.
3. The previous ebuild (1.1) apparently used qmake instead of cmake,
and the USE flag worked fine:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e40ca3370eebf41003bdf52c044bb964ff611cf
4. The 1.2 upstream source code has some "#ifdef DBUS_TRAY"
preprocessor tests, presumably hooked into qmake above (not cmake).
Comment 1 Matthew Ogilvie 2021-07-19 04:26:20 UTC
Created attachment 724927 [details]
build.log
Comment 2 Matthew Ogilvie 2021-07-19 04:27:43 UTC
Created attachment 724930 [details]
emerge.info
Comment 3 Nuno Silva 2021-08-25 09:56:10 UTC
Is it possible to change the in-tree ebuilds to use qmake and make until this is fixed upstream?
Comment 4 Nuno Silva 2021-08-28 13:35:02 UTC
Created attachment 736441 [details, diff]
Apply new patch and pass DISABLE_DBUS to build

Pass DISABLE_DBUS to the build system (and also apply the patch which adds that option to the cmake-based build system).
Comment 5 Nuno Silva 2021-08-28 13:54:47 UTC
Created attachment 736444 [details, diff]
Add DISABLE_DBUS to the cmake-based build system

Patch to add a DISABLE_DBUS option to the cmake-based build system, modelled after [1] (but named DISABLE_DBUS for consistency with the existing qmake option in qt5ct).

[1] https://github.com/rodlie/draco/commit/864e7695e5c04ce082b5c3c19e7bcc467c1edf79

The documentation string for the new option was copied from the qt5ct README; the enabled/disabled messages were copied from src/qt5ct-qtplugin/qt5ct-qtplugin.pro.
Comment 6 Larry the Git Cow gentoo-dev 2021-10-20 09:40:40 UTC
The bug has been closed via the following commit(s):

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

commit 89f94d5d9910d1e81618490d39303549ed0f4d43
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2021-10-20 07:18:21 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2021-10-20 09:39:42 +0000

    x11-misc/qt5ct: Remove leftover USE=dbus
    
    Closes: https://bugs.gentoo.org/802828
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 x11-misc/qt5ct/metadata.xml     | 3 ---
 x11-misc/qt5ct/qt5ct-1.3.ebuild | 8 ++------
 x11-misc/qt5ct/qt5ct-1.5.ebuild | 8 ++------
 3 files changed, 4 insertions(+), 15 deletions(-)