Hi, This is an attempt at fixing what didn't work with the first go at setting WRKDIST for DIST_TUPLE [1] (see [2]). Basically sets a new internal variable _DT_WRKDIST in dist-tuple.port.mk which is picked up in bsd.port.mk only if no GH_* or DISTNAME are set.
I tested this with games/fheroes2 (straightforward DIST_TUPLE port) and archivers/snappy (mix of GH_* and DIST_TUPLE) without issues. Another set of eyes on this would be great; potentially also wider testing and checking if it helps with ports like tg_owt that have been waiting for a DIST_TUPLE handling of WRKDIST (see commit comment [3]). [1] https://marc.info/?l=openbsd-ports-cvs&m=169584616831183&w=2 [2] https://marc.info/?l=openbsd-ports-cvs&m=169588080613965&w=2 [3] https://marc.info/?l=openbsd-ports-cvs&m=169902481810921&w=2 Index: bsd.port.mk =================================================================== RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v retrieving revision 1.1636 diff -u -p -r1.1636 bsd.port.mk --- bsd.port.mk 11 Nov 2023 11:53:38 -0000 1.1636 +++ bsd.port.mk 28 Dec 2023 23:36:39 -0000 @@ -894,10 +894,12 @@ _WRKDIRS += ${WRKOBJDIR_MFS}/${_WRKDIR_S WRKDIST ?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME:C/^[vV]([0-9])/\1/} .elif !empty(GH_COMMIT) WRKDIST ?= ${WRKDIR}/${GH_PROJECT}-${GH_COMMIT} -.elif !defined(DISTNAME) -WRKDIST ?= ${WRKDIR} -.else +.elif defined(DISTNAME) WRKDIST ?= ${WRKDIR}/${DISTNAME} +.elif !empty(_DT_WRKDIST) +WRKDIST ?= ${_DT_WRKDIST} +.else +WRKDIST ?= ${WRKDIR} .endif WRKSRC ?= ${WRKDIST} Index: dist-tuple.port.mk =================================================================== RCS file: /cvs/ports/infrastructure/mk/dist-tuple.port.mk,v retrieving revision 1.15 diff -u -p -r1.15 dist-tuple.port.mk --- dist-tuple.port.mk 6 Nov 2023 07:02:08 -0000 1.15 +++ dist-tuple.port.mk 28 Dec 2023 23:36:39 -0000 @@ -29,9 +29,9 @@ _subdir = # set DISTNAME if not done by the port and add refs/tags/ subdir DISTNAME ?= ${_project}-${_id:C/^(v|V|ver|[Rr]el|[Rr]elease)[-._]?([0-9])/\2/} _subdir = refs/tags/ -#WRKDIST ?= ${WRKDIR}/${_project}-${_id:C/^(v|V|ver|[Rr]el|[Rr]elease)[-._]?([0-9])/\2/} +_DT_WRKDIST ?= ${WRKDIR}/${_project}-${_id:C/^(v|V|ver|[Rr]el|[Rr]elease)[-._]?([0-9])/\2/} . else -#WRKDIST ?= ${WRKDIR}/${_project}-${_id} +_DT_WRKDIST ?= ${WRKDIR}/${_project}-${_id} . endif . for _subst in S,<account>,${_account},g:S,<project>,${_project},g:S,<id>,${_id},g:S,<subdir>,${_subdir},g:S,<site>,${SITES.${_template}},g