Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: go.port.mk vs ${DISTDIR}/go_modules
To:
Theo Buehler <tb@theobuehler.org>
Cc:
ports@openbsd.org
Date:
Wed, 12 Aug 2026 10:35:40 +0100

Download raw body.

Thread
Seems a reasonable fix. OK


On 2026/08/12 11:23, Theo Buehler wrote:
> On Tue, Aug 11, 2026 at 09:41:47AM +0200, Theo Buehler wrote:
> > As found by thfr, der-ascii fails to build if there is no
> > ${DISTDIR}/go_modules on the build machine.
> > 
> > ===>  Configuring for der-ascii-0.8.0v0
> > /bin/sh: cd: /usr/ports/distfiles/go_modules - No such file or directory
> > 
> > I think go.port.mk should not assume this dir exists. One way to work
> > around this is the below, but perhaps there are better ideas.
> > 
> > I have only lightly tested this and will of course run it through a bulk.
> 
> As expected, all go ports built without issue.
> 
> Index: go.port.mk
> ===================================================================
> RCS file: /cvs/ports/lang/go/go.port.mk,v
> diff -u -p -r1.101 go.port.mk
> --- go.port.mk	19 Jul 2026 10:06:32 -0000	1.101
> +++ go.port.mk	11 Aug 2026 07:31:12 -0000
> @@ -129,11 +129,14 @@ WRKSRC ?=		${MODGO_WORKSPACE}/src/${ALL_
>  MODGO_SETUP_WORKSPACE =	mkdir -p ${WRKSRC:H}; mv ${MODGO_SUBDIR} ${WRKSRC};
>  .else
>  WRKSRC ?=		${WRKDIR}/${MODGO_MODNAME}@${MODGO_VERSION}
> -MODGO_SETUP_WORKSPACE =	ln -sf ${WRKSRC} ${WRKDIR}/${MODGO_MODNAME}; \
> +MODGO_SETUP_WORKSPACE =	ln -sf ${WRKSRC} ${WRKDIR}/${MODGO_MODNAME}
> +. if !empty(_MODGO_SETUP)
> +MODGO_SETUP_WORKSPACE += ; \
>  	cd ${DISTDIR}/${MODGO_DIST_SUBDIR}; \
>  	for m in ${_MODGO_SETUP}; do \
>  	    ${INSTALL} -D $$m ${WRKDIR}/${MODGO_DIST_SUBDIR}/$$m; \
>  	done
> +. endif
>  .endif
>  
>  INSTALL_STRIP =
>