Patch is rather small, introduces two new variables:

UNLINKED: keyword(s) why not linked, to add to the port
BUILD_UNLINKED: simple way to override, as a configuration variable

with this, you could for instance link the wayland ports, annotate
them with UNLINKED = wayland.

Then they *will* participate in meta information for sqlports and friends
but be marked as
IGNORE = Not built because wayland


When someone wants to batch test those ports, all they need to do is
set BUILD_UNLINKED += wayland



Index: bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
diff -u -p -r1.1630 bsd.port.mk
--- bsd.port.mk 26 Oct 2023 19:26:56 -0000      1.1630
+++ bsd.port.mk 9 Nov 2023 09:43:08 -0000
@@ -70,6 +70,9 @@ _MAKEFILE_INC_DONE ?= Yes
 ECHO_MSG ?=                            :
 .endif
 
+UNLINKED ?=
+BUILD_UNLINKED ?=
+
 # include guard so that other parts don't include this twice
 _BSD_PORT_MK = Done
 
@@ -797,6 +800,17 @@ _NONDEFAULT_LD ?= No
 .if ${_NONDEFAULT_LD:L} == "yes"
 .  if !exists(${_LD_PROGRAM})
 IGNORE = "requires ${_LD_PROGRAM}"
+.  endif
+.endif
+_f =
+.if !empty(UNLINKED)
+.  for _e in ${BUILD_UNLINKED}
+.    if !empty(UNLINKED:M${_e})
+_f = build
+.    endif
+.  endfor
+.  if empty(_f)
+IGNORE += "Not built because ${UNLINKED}"
 .  endif
 .endif
 

Reply via email to