On Sun, December 17, 2023 21:28, Klemens Nanni wrote: > On Sun, Dec 17, 2023 at 08:54:14PM +0300, Kirill Bychkov wrote: >> > Some lines move around without changing. >> >> I've moved them back to reduce diff. > > Thanks. > >> > Two unconditional SHARED_LIBS seems off; you can use LIBNAME_L, either in >> > FLAVOR blocks for unique versions or outside if qt6 can start at 2.1. >> > >> > LIBNAME_L could be ${LIBNAME:L} instead of duplicating the string. >> >> Fixed, thanks. >> >> > You could also reuse QT to pull common lines out of the FLAVOR blocks. >> > >> It will make things complicated. > > Sure, your call. > >> Attached diff with fixes and REVISION bump. > > I did not expect LIBNAME:L in SUBST_VARS/PLIST to work, but it does... > LIBNAME_L = ${LIBNAME:L} keeps PLIST untouched; either way, expanded > there's no actual difference, so REVISION bump wasn't needed.
Me too. But I was thinking that you propose to remove extra var and tried :L directly. > > Makefile already has a bunch of spaces between = and tabs as-is, > but your diff introduces more. That's my code styling. Probably stupid... IIRC there were spaces around = in Makefile.template long time ago. If this really bothers I can change my style and drop space between tab and =. But I suggest to split adding flavor and space-tab fix into separate commits. > > Here's your diff with spaces cleaned up in new lines (to avoid churn) > and LIBNAME_L handling as per above -- that's what I meant. Your diff looks better, thanks! > > MODCLANG_COMPILER_LINKS=Yes is already the default. Oops... This was an experiment. > > Either way works, just to be clear what I mean. > OK kn > > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/security/qtkeychain/Makefile,v > diff -u -p -r1.20 Makefile > --- Makefile 28 Sep 2023 17:24:15 -0000 1.20 > +++ Makefile 17 Dec 2023 18:25:59 -0000 > @@ -4,7 +4,8 @@ GH_ACCOUNT = frankosterfeld > GH_PROJECT = qtkeychain > GH_TAGNAME = 0.14.1 > > -SHARED_LIBS += qt5keychain 2.1 # 0.4 > +SHARED_LIBS += qt5keychain 2.1 > +SHARED_LIBS += qt6keychain 0.0 > > CATEGORIES = security > > @@ -13,20 +14,38 @@ MAINTAINER = Kirill Bychkov <kirby@open > # BSD-like > PERMIT_PACKAGE = Yes > > -WANTLIB += Qt5Core Qt5DBus gio-2.0 glib-2.0 gobject-2.0 intl m secret-1 > +WANTLIB += gio-2.0 glib-2.0 gobject-2.0 intl m secret-1 > WANTLIB += ${COMPILER_LIBCXX} > > -MODULES = devel/cmake \ > - x11/qt5 > +MODULES = devel/cmake > + > LIB_DEPENDS += x11/gnome/libsecret > > CONFIGURE_ARGS += > -DECM_MKSPECS_INSTALL_DIR="${PREFIX}/lib/${QT}/mkspecs/modules" > > -LIBNAME = Qt5Keychain > -LIBNAME_L = qt5keychain > -QT = qt5 > - > SUBST_VARS += LIBNAME LIBNAME_L QT > + > +FLAVORS = qt6 > +FLAVOR ?= > + > +.if ${FLAVOR:Mqt6} > +CONFIGURE_ARGS += -DBUILD_WITH_QT6=ON > +FULLPKGNAME = qtkeychain-qt6-${GH_TAGNAME} > +MODULES += lang/clang x11/qt6 > +MODCLANG_LANGS += c++ > +WANTLIB += Qt6Core Qt6DBus > +BUILD_DEPENDS += x11/qt6/qttools > +LIB_DEPENDS += ${MODCLANG_LIB_DEPENDS} > +LIBNAME = Qt6Keychain > +QT = qt6 > +.else > +MODULES += x11/qt5 > +WANTLIB += Qt5Core Qt5DBus > +LIBNAME = Qt5Keychain > +QT = qt5 > +.endif > + > +LIBNAME_L = ${LIBNAME:L} > > NO_TEST = Yes > >