Same approach as in net/libtorrent-rasterbar. No symbol/PLIST/package change.
With FLAVOR='yubikey browser', `make build' compiles 198 less files. `make test' does so and runs tests as usual. keepassxc is built in four different FLAVOR combinations, so overall saving is a little more compared to libtorrent-rasterbar. Feedback? Objection? OK? Index: Makefile =================================================================== RCS file: /cvs/ports/security/keepassxc/Makefile,v retrieving revision 1.49 diff -u -p -r1.49 Makefile --- Makefile 2 Jan 2023 20:04:33 -0000 1.49 +++ Makefile 9 Jan 2023 21:15:16 -0000 @@ -56,6 +56,11 @@ TEST_IS_INTERACTIVE = X11 FLAVORS = browser yubikey FLAVOR ?= +# everything (executables, modules, docs) except tests +ALL_TARGET = keepassxc keepassxc-cli \ + keepassxc-autotype-xcb \ + docs manpages + .if ${FLAVOR:Myubikey} WANTLIB += pcsclite usb-1.0 LIB_DEPENDS += devel/libusb1 \ @@ -68,6 +73,8 @@ CONFIGURE_ARGS += -DWITH_XC_YUBIKEY=ON ONLY_FOR_ARCHS = amd64 i386 aarch64 CONFIGURE_ARGS += -DWITH_XC_BROWSER=ON \ -DWITH_XC_NETWORKING=ON +# helper executable +ALL_TARGET += keepassxc-proxy .endif FIX_CRLF_FILES = src/keeshare/ShareExport.cpp @@ -85,5 +92,12 @@ post-patch: gui/MainWindow.cpp \ browser/BrowserSettingsWidget.cpp \ browser/NativeMessageInstaller.cpp + +do-build: + @${MODCMAKE_BUILD_TARGET} -t ${ALL_TARGET} + +# build whatever is left (ca. 200 GUI test files) +pre-test: + @${MODCMAKE_BUILD_TARGET} .include <bsd.port.mk>