CVS commit: pkgsrc/devel/meson

"Thomas Klausner" <[email protected]>
Newsgroups gmane.os.netbsd.devel.pkgsrc.cvs
Message-ID <[email protected]>
Module Name:	pkgsrc
Committed By:	wiz
Date:		Mon Jul 27 12:27:28 UTC 2026

Modified Files:
	pkgsrc/devel/meson: build.mk

Log Message:
meson: pass CFLAGS, CPPFLAGS, CXXFLAGS, and LDFLAGS in the recommended way


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 pkgsrc/devel/meson/build.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(unnamed) (text/x-diff, 1.1 KB)
Modified files:

Index: pkgsrc/devel/meson/build.mk
diff -u pkgsrc/devel/meson/build.mk:1.33 pkgsrc/devel/meson/build.mk:1.34
--- pkgsrc/devel/meson/build.mk:1.33	Thu May 14 08:16:05 2026
+++ pkgsrc/devel/meson/build.mk	Mon Jul 27 12:27:28 2026
@@ -1,4 +1,4 @@
-# $NetBSD: build.mk,v 1.33 2026/05/14 08:16:05 wiz Exp $
+# $NetBSD: build.mk,v 1.34 2026/07/27 12:27:28 wiz Exp $
 
 MESON_REQD?=	0
 .for version in ${MESON_REQD}
@@ -33,6 +33,19 @@ MAKE_ENV+=	CMAKE=${TOOLS_PATH.false}
 
 MESON_NATIVE_FILE=	${WRKDIR}/.meson_native
 MESON_NATIVE_ARGS+=	--native-file ${MESON_NATIVE_FILE:Q}
+
+# pass CFLAGS/LDFLAGS/CXXFLAGS the recommended way
+# https://mesonbuild.com/Reference-tables.html#language-arguments-parameter-names
+.for lang in ${USE_LANGUAGES}
+.if ${lang} == "c"
+MESON_ARGS+=		-Dc_args=${CFLAGS:Q}\ ${CPPFLAGS:Q}
+MESON_ARGS+=		-Dc_link_args=${LDFLAGS:Q}
+.elif ${lang} == "c++"
+MESON_ARGS+=		-Dcpp_args=${CXXFLAGS:Q}\ ${CPPFLAGS:Q}
+MESON_ARGS+=		-Dcpp_link_args=${LDFLAGS:Q}
+.endif
+.endfor
+
 meson-configure: ${MESON_NATIVE_FILE}
 ${MESON_NATIVE_FILE}:
 	@${STEP_MSG} Creating meson native file
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.