Re: git: 40ccce5d1a85 - main - comms/mbelib: Fix building with CMake 4
- In reply to: Robert Clausecker : "Re: git: 40ccce5d1a85 - main - comms/mbelib: Fix building with CMake 4"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 30 Sep 2026 08:46:40 UTC
On Mon, Sep 28, 2026 at 08:14:27PM +0000, Robert Clausecker wrote:
> 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:
> > > ...
> > > +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?
That would be semantically wrong and confusing, source code modifications
should happen during the patch phase, not configure (modulo special cases
when it might be required).
> 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.
You can do something like "make clean extract do-patch makepatch" instead.
./danfe