Bug 258953 - x11-toolkits/qt5-gui: Add DBUS option
Summary: x11-toolkits/qt5-gui: Add DBUS option
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-kde (group)
URL:
Keywords: feature, needs-qa
Depends on:
Blocks:
 
Reported: 2021-10-05 19:26 UTC by sid
Modified: 2022-02-14 09:01 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (kde)
koobs: merge-quarterly?


Attachments
Makefile.qt5-gui.diff (2.24 KB, text/plain)
2021-10-06 01:17 UTC, sid
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description sid 2021-10-05 19:26:43 UTC
Here's a proposed diff for x11-toolkits/qt5-gui to turn dbus into a make config option. It shouldn't affect regular builds. There was interest in turning dbus into an option for this port. Thank you,


--- Makefile.orig       2021-10-04 20:16:17.706647000 +0000
+++ Makefile    2021-10-04 20:23:18.678333000 +0000
@@ -14,8 +14,7 @@
                ${BUILD_DEPENDS_${ARCH}}
 BUILD_DEPENDS_armv6=   as:devel/binutils
 BUILD_DEPENDS_armv7=   as:devel/binutils
-LIB_DEPENDS=   libdbus-1.so:devel/dbus \
-               libevdev.so:devel/libevdev \
+LIB_DEPENDS=   libevdev.so:devel/libevdev \
                libfontconfig.so:x11-fonts/fontconfig \
                libfreetype.so:print/freetype2 \
                libharfbuzz.so:print/harfbuzz \
@@ -36,13 +35,13 @@
                        qmake:no_env qt-dist:5,base
 USE_GL=                        egl gl
 USE_GNOME=             glib20
-USE_QT=                        core dbus network buildtools_build qmake_build
+USE_QT=                        core network buildtools_build qmake_build
 QT_BINARIES=           yes
-QT_CONFIG=             accessibility accessibility-atspi-bridge dbus \
+QT_CONFIG=             accessibility accessibility-atspi-bridge \
                        fontconfig glib opengl png system-freetype system-jpeg \
                        system-png xcb xcb-glx xcb-render xcb-xlib xinput2 xlib \
                        xrender
-QT_DEFINES=            ACCESSIBILITY DBUS FONTCONFIG FREETYPE GLIB \
+QT_DEFINES=            ACCESSIBILITY FONTCONFIG FREETYPE GLIB \
                        IMAGEFORMAT_PNG OPENGL SHAPE XCB XKB XKBCOMMON XRENDER
 USE_XORG=              ice sm xi xrender
 HAS_CONFIGURE=         yes
@@ -57,13 +56,17 @@
 BUILD_WRKSRC=  ${WRKSRC}/src/${PORTNAME}
 INSTALL_WRKSRC=        ${BUILD_WRKSRC}
 
-OPTIONS_DEFINE=                X11
-OPTIONS_DEFAULT=       X11
+OPTIONS_DEFINE=                X11 DBUS
+OPTIONS_DEFAULT=       X11 DBUS
 OPTIONS_SUB=           yes
 
 X11_USES=      xorg
 X11_USE=       xorg=x11
 
+DBUS_LIB_DEPENDS=      libdbus-1.so:devel/dbus
+DBUS_USE=              QT=dbus
+DBUS_VARS=             QT_CONFIG+=dbus QT_DEFINES+=DBUS
+
 # Build and install QtPlatformSupport and default QPA plugins (XCB,
 # minimal and offscreen). QtGui won't work without (one of) them, but
 # they depend on QtGui itself, so they can't be added as dependencies.
@@ -113,3 +116,4 @@
 .endfor
 
 .include <bsd.port.mk>
+.include <bsd.port.options.mk>
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-10-05 23:51:53 UTC
@Reporter Could you include your proposed change as an attachment please?
Comment 2 sid 2021-10-06 01:17:09 UTC
Created attachment 228470 [details]
Makefile.qt5-gui.diff
Comment 3 Masuji 2021-11-24 18:35:37 UTC
This failed for me to build a qt5 without dbus -- it's certainly possible to do so, but you need to pass -no-dbus to the configure for it, and I think we also need to remove all the USES and other things. 

I'm still confused on how all of the QT-specific stuff works in a ports makefile, so I can't really say I can undertake it myself. Just reporting it will still pull in dbus if I apply these changes.
Comment 4 Max Brazhnikov freebsd_committer freebsd_triage 2022-01-23 21:36:22 UTC
We can't support options for everything. DBus is a key component, it's widely used and I'm sure lots of software do not expect Qt without Dbus. Turning DBus into an option would bring more maintenance burden for unclear benefit. What's your rationale for making it optional?