Download raw body.
NEW: x11/adwaita-qt6: GTK styles for Qt6 applications
On 2025/07/18 13:51, Antoine Jacoutot wrote:
> On Fri, Jul 18, 2025 at 10:15:50AM +0200, Rafael Sadowski wrote:
> > On Fri Jul 18, 2025 at 03:09:48PM +0800, Chris Billington wrote:
> > > Attached is a new port x11/adwaita-qt6, providing Qt6 styles to match
> > > applications to GTK themes such as Adwaita, Adwaita-Dark and
> > > HighContrast.
> > >
> > > It is a rework of x11/adwaita-qt, building against Qt6
> > > instead of Qt5.
> > >
> > > It has been suggested on the list that x11/adwaita-qt be removed as
> > > the upstream is unmaintained. But for now it builds and works well to
> > > theme Qt5 applications for GTK users. This port adds support for Qt6
> > > applications. Hopefully the adwaita-qt port will get a stay of
> > > execution.
> > >
> > > Originally I tried unsuccessfully to make x11/adwaita-qt into a
> > > multipackage producing subpackages adwaita-qt5 and adwaita-qt6.
> > > However, since this is a lightweight port using the same source code,
> > > maybe a separate port is acceptable?
> > >
> > > Tested on amd64 with qt6ct on 7.7-Release and 7.7-Current (7.7
> > > GENERIC.MP#67 of 17 July 25)
> > >
> > > Please test and if someone could commit if OK that would be great.
> > >
> >
> > Thanks Chris, I was so free and made the qt6 FLAVOR.
>
> Isn't this a good candidate for multi package rather than FLAVOR?
Needs building twice afaict?
>
> > Chris would you like to take maintainership?
> >
> > Reviews, feedback and OKs?
> >
> > diff --git a/x11/adwaita-qt/Makefile b/x11/adwaita-qt/Makefile
> > index 4a6c0a04b1e..3e33b30d214 100644
> > --- a/x11/adwaita-qt/Makefile
> > +++ b/x11/adwaita-qt/Makefile
> > @@ -9,20 +9,40 @@ CATEGORIES = x11
> > SHARED_LIBS += adwaitaqt 0.0 # 1.2
> > SHARED_LIBS += adwaitaqtpriv 0.0 # 1.2
> >
> > -WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5DBus Qt5Gui Qt5Widgets
> > -WANTLIB += Qt5X11Extras m xcb
> > +SHARED_LIBS += adwaitaqt6 0.0 # 0.0
> > +SHARED_LIBS += adwaitaqt6priv 0.0 # 0.0
> >
> > # GPLv2 only
> > PERMIT_PACKAGE = Yes
> >
> > -MODULES = devel/cmake \
> > - x11/qt5
> > +FLAVORS = qt6
> > +FLAVOR ?=
> > +
> > +MODULES = devel/cmake
> >
> > BUILD_DEPENDS = www/sassc
> >
> > +.if ${FLAVOR:Mqt6}
> > +FULLPKGNAME= adwaita-qt6-${GH_TAGNAME}
> > +
> > +MODULES += x11/qt6
> > +
> > +WANTLIB += ${COMPILER_LIBCXX} GL Qt6Core Qt6DBus Qt6Gui Qt6Widgets
> > +WANTLIB += m
> > +
> > +CONFIGURE_ARGS = -DUSE_QT6=ON
> > +CONFIGURE_ENV = QT_DIR=${LOCALBASE}/lib/qt6/cmake/Qt6/
> > +.else
> > +WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5DBus Qt5Gui Qt5Widgets
> > +WANTLIB += Qt5X11Extras m xcb
> > +
> > +MODULES += x11/qt5
> > +
> > LIB_DEPENDS = x11/qt5/qtx11extras
> >
> > +CONFIGURE_ARGS = -DUSE_QT6=OFF
> > CONFIGURE_ENV = QT_DIR=${LOCALBASE}/lib/qt5/cmake/Qt5/
> > +.endif
> >
> >
> > .include <bsd.port.mk>
> > diff --git a/x11/adwaita-qt/pkg/PFRAG.no-qt6 b/x11/adwaita-qt/pkg/PFRAG.no-qt6
> > new file mode 100644
> > index 00000000000..09e453d943c
> > --- /dev/null
> > +++ b/x11/adwaita-qt/pkg/PFRAG.no-qt6
> > @@ -0,0 +1,15 @@
> > +include/AdwaitaQt/
> > +include/AdwaitaQt/adwaita.h
> > +include/AdwaitaQt/adwaitacolors.h
> > +include/AdwaitaQt/adwaitaqt_export.h
> > +include/AdwaitaQt/adwaitarenderer.h
> > +lib/cmake/AdwaitaQt/
> > +lib/cmake/AdwaitaQt/AdwaitaQtConfig.cmake
> > +lib/cmake/AdwaitaQt/AdwaitaQtConfigVersion.cmake
> > +lib/cmake/AdwaitaQt/AdwaitaQtTargets${MODCMAKE_BUILD_SUFFIX}
> > +lib/cmake/AdwaitaQt/AdwaitaQtTargets.cmake
> > +@lib lib/libadwaitaqt.so.${LIBadwaitaqt_VERSION}
> > +@lib lib/libadwaitaqtpriv.so.${LIBadwaitaqtpriv_VERSION}
> > +lib/pkgconfig/adwaita-qt.pc
> > +lib/qt5/plugins/styles/
> > +@so lib/qt5/plugins/styles/adwaita.so
> > diff --git a/x11/adwaita-qt/pkg/PFRAG.qt6 b/x11/adwaita-qt/pkg/PFRAG.qt6
> > new file mode 100644
> > index 00000000000..476095a030f
> > --- /dev/null
> > +++ b/x11/adwaita-qt/pkg/PFRAG.qt6
> > @@ -0,0 +1,18 @@
> > +include/AdwaitaQt6/
> > +include/AdwaitaQt6/adwaita.h
> > +include/AdwaitaQt6/adwaitacolors.h
> > +include/AdwaitaQt6/adwaitaqt_export.h
> > +include/AdwaitaQt6/adwaitarenderer.h
> > +lib/cmake/
> > +lib/cmake/AdwaitaQt6/
> > +lib/cmake/AdwaitaQt6/AdwaitaQt6Config.cmake
> > +lib/cmake/AdwaitaQt6/AdwaitaQt6ConfigVersion.cmake
> > +lib/cmake/AdwaitaQt6/AdwaitaQt6Targets${MODCMAKE_BUILD_SUFFIX}
> > +lib/cmake/AdwaitaQt6/AdwaitaQt6Targets.cmake
> > +@lib lib/libadwaitaqt6.so.${LIBadwaitaqt6_VERSION}
> > +@lib lib/libadwaitaqt6priv.so.${LIBadwaitaqt6priv_VERSION}
> > +lib/pkgconfig/adwaita-qt6.pc
> > +lib/qt6/
> > +lib/qt6/plugins/
> > +lib/qt6/plugins/styles/
> > +@so lib/qt6/plugins/styles/adwaita.so
> > diff --git a/x11/adwaita-qt/pkg/PLIST b/x11/adwaita-qt/pkg/PLIST
> > index 09e453d943c..48224473412 100644
> > --- a/x11/adwaita-qt/pkg/PLIST
> > +++ b/x11/adwaita-qt/pkg/PLIST
> > @@ -1,15 +1,2 @@
> > -include/AdwaitaQt/
> > -include/AdwaitaQt/adwaita.h
> > -include/AdwaitaQt/adwaitacolors.h
> > -include/AdwaitaQt/adwaitaqt_export.h
> > -include/AdwaitaQt/adwaitarenderer.h
> > -lib/cmake/AdwaitaQt/
> > -lib/cmake/AdwaitaQt/AdwaitaQtConfig.cmake
> > -lib/cmake/AdwaitaQt/AdwaitaQtConfigVersion.cmake
> > -lib/cmake/AdwaitaQt/AdwaitaQtTargets${MODCMAKE_BUILD_SUFFIX}
> > -lib/cmake/AdwaitaQt/AdwaitaQtTargets.cmake
> > -@lib lib/libadwaitaqt.so.${LIBadwaitaqt_VERSION}
> > -@lib lib/libadwaitaqtpriv.so.${LIBadwaitaqtpriv_VERSION}
> > -lib/pkgconfig/adwaita-qt.pc
> > -lib/qt5/plugins/styles/
> > -@so lib/qt5/plugins/styles/adwaita.so
> > +%%qt6%%
> > +!%%qt6%%
> >
>
> --
> Antoine
>
NEW: x11/adwaita-qt6: GTK styles for Qt6 applications