Subject: CVS commit: pkgsrc/devel/meson
From: Taylor R Campbell
Date: 2025-01-25 10:49:47
Message id: 20250125094947.B4D97FBE0@cvs.NetBSD.org

Log Message:
devel/meson/build.mk: New MESON_CROSS_BINARY_KEY.${bin}.

This controls the output of the [binaries] section of the meson
configuration, and defers expansion of the path.  This way, for
example, we can get:

[binaries]
/usr/pkg/bin/wayland-scanner = '/home/user/pkg/bin/wayland-scanner'

derived from PREFIX=/usr/pkg and TOOLBASE=/home/user/pkg, by setting:

MESON_CROSS_BINARIES+=			wayland-scanner
MESON_CROSS_BINARY_KEY.wayland-scanner=	${PREFIX}/bin/wayland-scanner
MESON_CROSS_BINARY.wayland-scanner=	${TOOLBASE}/bin/wayland-scanner

It's a bit of a kludge and generally we shouldn't have to do this --
usually meson builds use plain file names, not full absolute paths
under PREFIX, but in some cases it is necessary.

We can't just do this by writing:

MESON_CROSS_BINARIES+=	${PREFIX}/bin/wayland-scanner
MESON_CROSS_BINARY.${PREFIX}/bin/wayland-scanner=	...

because PREFIX isn't set by the time it has to be expanded (unless we
put it all the way at the end of the Makefile after bsd.pkg.mk, which
would be a worse kludge).

Files:
RevisionActionfile
1.30modifypkgsrc/devel/meson/build.mk