From: Klemens Nanni Subject: Re: DIST_TUPLE: fix mv(1) for codeberg To: Thomas Frohwein , ports@openbsd.org Date: Tue, 06 Jan 2026 14:36:50 +0000 06.01.2026 07:44, Thomas Frohwein пишет: > Hi, > > It looks like amongst the different code forges/sources for DIST_TUPLE, > codeberg is a special case in that it extracts just to ${_project} > instead of something like ${_project}-${_id}. The current ports that > use codeberg all only use it with '.' at the end of DIST_TUPLE, so > without a mv(1). While working on updating games/godot, godotsteam is > now hosted on codeberg, too. When pulling this in with > > DIST_TUPLE += codeberg godotsteam godotsteam v3.20 godotsteam > > the MODDIST-TUPLE_post-extract fails because DIST_TUPLE gets the > directory wrong by including the ${_id}. > > The diff below fixes this . It doesn't address the WRKDIST at this > point for the other ports that already use DIST_TUPLE for codeberg and > that all set WRKDIST manually. Fixing that will be a bit more > involved... > > I tested the change with dist-tuple.test [1] which confirms that none > of the DIST_TUPLE-derived variables in existing ports change in the > existing ports tree. > > ok? Reads OK to me. > > [1] https://github.com/rfht/dist-tuple.test > > Index: dist-tuple.port.mk > =================================================================== > RCS file: /cvs/ports/infrastructure/mk/dist-tuple.port.mk,v > diff -u -p -r1.19 dist-tuple.port.mk > --- dist-tuple.port.mk 28 Dec 2025 17:58:25 -0000 1.19 > +++ dist-tuple.port.mk 6 Jan 2026 04:26:42 -0000 > @@ -42,7 +42,12 @@ EXTRACT_SUFX.${_template} ?= ${TEMPLATE > TEMPLATE_HOMEPAGE.${_template} ?= ${TEMPLATE_HOMEPAGE} > HOMEPAGE ?= ${TEMPLATE_HOMEPAGE.${_template}:${_subst}} > > -. if "${_targetdir}" != "." > +. if "${_targetdir}" != "." && "${_template}" == "codeberg" > +MODDIST-TUPLE_post-extract += \ > + t=${WRKDIST}/${_targetdir}; [[ -d $$t ]] && rmdir $$t \ > + || mkdir -p `dirname $$t` ; \ > + mv ${WRKDIR}/${_project:T} $$t; > +. elif "${_targetdir}" != "." > MODDIST-TUPLE_post-extract += \ > t=${WRKDIST}/${_targetdir}; [[ -d $$t ]] && rmdir $$t \ > || mkdir -p `dirname $$t` ; \ >