Re: git: 40ccce5d1a85 - main - comms/mbelib: Fix building with CMake 4

From: Robert Clausecker <fuz_at_freebsd.org>
Date: Mon, 28 Sep 2026 20:14:27 UTC
Hi Mat,

On Mon, Sep 28, 2026 at 07:17:20PM +0200, Mathieu Arnold wrote:
> On Mon, Sep 28, 2026 at 06:43:13AM +0000, Gleb Popov wrote:
> > The branch main has been updated by arrowd:
> > 
> > URL: https://cgit.FreeBSD.org/ports/commit/?id=40ccce5d1a8540eef2e6a25f0f844fd23db0e755
> > 
> > commit 40ccce5d1a8540eef2e6a25f0f844fd23db0e755
> > Author:     takefu <takefu@airport.fm>
> > AuthorDate: 2026-09-28 06:31:38 +0000
> > Commit:     Gleb Popov <arrowd@FreeBSD.org>
> > CommitDate: 2026-09-28 06:31:38 +0000
> > 
> >     comms/mbelib: Fix building with CMake 4
> >     
> >     PR:             298639
> > ---
> >  comms/mbelib/Makefile | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/comms/mbelib/Makefile b/comms/mbelib/Makefile
> > index ce6ca4244291..5174aeef693a 100644
> > --- a/comms/mbelib/Makefile
> > +++ b/comms/mbelib/Makefile
> > @@ -1,6 +1,7 @@
> >  PORTNAME=	mbelib
> >  DISTVERSIONPREFIX=	v
> >  DISTVERSION=	1.3.0
> > +PORTREVISION=	1
> >  CATEGORIES=	comms hamradio
> >  
> >  MAINTAINER=	takefu@airport.fm
> > @@ -25,4 +26,7 @@ CMAKE_ON=	DISABLE_TEST
> >  PLIST_FILES=	include/mbelib.h lib/libmbe.a lib/libmbe.so.1.0 \
> >  		lib/libmbe.so.1 lib/libmbe.so
> >  
> > +do-patch:
> > +	${REINPLACE_CMD} 's|VERSION 2.6|VERSION 3.10|' ${WRKSRC}/CMakeLists.txt
> > +
> 
> do-patch should never be overwritten, if you want to run sed to patch
> files, do so in post-patch.

Could we please advise that people do this in pre-configure instead of post-patch?
This way, if a file is both patched with a patch file and REINPLACE_CMD (e.g. by
adding a %%FOO%% token in a patch and then adding in the dynamic content later),
it remains easy to do "make patch; ... edit some file ...; make makepatch" without
the work of REINPLACE_CMD destroying what you just patched.

> Also, running sed to patch files is only allowed when you replace the
> content with something "variable" like ${PREFIX}.
> 
> This change should be a patch file, please fix.
> 
> Regards,
> 
> -- 
> Mathieu Arnold

Yours,
Robert Clausecker

-- 
()  ascii ribbon campaign - for an encoding-agnostic world
/\  - against html email  - against proprietary attachments