x11-toolkits/qt5-gui turning dbus into an option

Tobias C. Berner tcberner at freebsd.org
Mon Oct 4 14:37:05 BST 2021


Moin moin

Thank you for the idea.

The patch looks slightly wrong -- in the option handling at the
bottom, you should include bsd.port.options.mk  [1].
But, even better, use DBUS_VARS=QT_CONIFG+=dbus QT_DEFINES+=DBUS in
the normal options block.

Personally, I'm really not a fan of this option, as it might lead to
people having broken software, as DBus is the de facto IPC for nearly
every modern desktop application.

Please open a bug on https://bugs.freebsd.org/bugzilla/ with the
updated patch attached or a review on https://reviews.freebsd.org/ --
it likely also requires plist masking with %%DBUS%%, and a test run
with the options off for qt5-gui consumers.

mfg Tobias

[1] https://docs.freebsd.org/en/books/porters-handbook/makefiles/#makefile-options


On Sat, 2 Oct 2021 at 19:38, Sid <sid at bsdmail.com> wrote:
>
> Dear KDE at FreeBSD.org,
>
> Here's a Makefile diff to allow Dbus to be turned into an option for the FreeBSD port of x11-toolkits/qt5-gui. There's a lot of interest in the FreeBSD forums for turning dbus off, and making it into an option will be suitable for more people.
>
> QT was first added as an option, and set to default.
> "USE_QT =" dbus was turned into an optional dependency through "DBUS_USE= QT=dbus"
> "LIB_DEPENDS=" "libdbus-1.so:devel/dbus" was turned into an option through "DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus"
> These first two are shorthand for using those dependencies and libraries, when the respective option is set. Their use is in the Ports Handbook.
>
> The remaining two dbus parts use an if/then statement added towards the end of the Makefile
>
> Thank you very much.
>
>
>
> --- Makefile.orig 2021-10-01 07:16:46.714179000 +0000
> +++ Makefile 2021-10-01 22:44:22.847818000 +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,12 +56,14 @@
> 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
>
> # Build and install QtPlatformSupport and default QPA plugins (XCB,
> # minimal and offscreen). QtGui won't work without (one of) them, but
> @@ -113,3 +114,8 @@
> .endfor
>
> .include <bsd.port.mk>
> +
> +.if ${PORT_OPTIONS:MDBUS}
> +QT_CONFIG+= dbus
> +QT_DEFINES+= DBUS
> +.endif


More information about the kde-freebsd mailing list