All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/5] package/pkg-meson: share Meson setup options
@ 2026-10-05 22:38 James Hilliard
  2026-10-05 22:38 ` [Buildroot] [PATCH 2/5] package/pkg-meson: share cross-file generation James Hilliard
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: James Hilliard @ 2026-10-05 22:38 UTC (permalink / raw)
  To: buildroot
  Cc: Eric Le Bihan, Xukai Wang, Julien Olivain, Gwenhael Goavec-Merou,
	Guillaume William Brs, James Hilliard, Woodrow Douglass,
	Jagan Teki, Thomas Petazzoni, Romain Naour, Fabrice Fontaine

Move the host and target setup options into reusable variables so the
Python infrastructure can use the same defaults for meson-python.

Use -Dbuildtype instead of --buildtype to match the spelling used by
meson-python. Meson rejects both spellings in the same invocation.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/pkg-meson.mk | 43 +++++++++++++++++++++++++------------------
 1 file changed, 25 insertions(+), 18 deletions(-)

diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
index f2efbae2eb..5f7eed9edf 100644
--- a/package/pkg-meson.mk
+++ b/package/pkg-meson.mk
@@ -90,6 +90,29 @@ else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
 PKG_MESON_DEFAULT_LIBRARY=both
 endif
 
+# Meson setup options shared with the meson-python backend.
+PKG_MESON_TARGET_OPTS = \
+	--prefix=/usr \
+	--libdir=lib \
+	--default-library=$(PKG_MESON_DEFAULT_LIBRARY) \
+	-Dbuildtype=$(if $(BR2_ENABLE_RUNTIME_DEBUG),debug,release) \
+	--cross-file=$($(PKG)_SRCDIR)/buildroot-build/cross-compilation.conf \
+	-Db_pie=false \
+	-Db_staticpic=$(if $(BR2_m68k_cf),false,true) \
+	-Dstrip=false \
+	-Dbuild.pkg_config_path=$(HOST_DIR)/lib/pkgconfig \
+	-Dbuild.cmake_prefix_path=$(HOST_DIR)/lib/cmake
+
+PKG_MESON_HOST_OPTS = \
+	--prefix=$(HOST_DIR) \
+	--libdir=lib \
+	--sysconfdir=$(HOST_DIR)/etc \
+	--localstatedir=$(HOST_DIR)/var \
+	--default-library=shared \
+	-Dbuildtype=release \
+	--wrap-mode=nodownload \
+	-Dstrip=true
+
 # Generates sed patterns for patching the cross-compilation.conf template,
 # since Flags might contain commas the arguments are passed indirectly by
 # variable name (stripped to deal with whitespaces).
@@ -158,16 +181,7 @@ define $(2)_CONFIGURE_CMDS
 	CXX_FOR_BUILD="$$(HOSTCXX)" \
 	$$($$(PKG)_CONF_ENV) \
 	$$(MESON) setup \
-		--prefix=/usr \
-		--libdir=lib \
-		--default-library=$(PKG_MESON_DEFAULT_LIBRARY) \
-		--buildtype=$(if $(BR2_ENABLE_RUNTIME_DEBUG),debug,release) \
-		--cross-file=$$($$(PKG)_SRCDIR)/buildroot-build/cross-compilation.conf \
-		-Db_pie=false \
-		-Db_staticpic=$(if $(BR2_m68k_cf),false,true) \
-		-Dstrip=false \
-		-Dbuild.pkg_config_path=$$(HOST_DIR)/lib/pkgconfig \
-		-Dbuild.cmake_prefix_path=$$(HOST_DIR)/lib/cmake \
+		$$(PKG_MESON_TARGET_OPTS) \
 		$$($$(PKG)_CONF_OPTS) \
 		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/buildroot-build
 endef
@@ -179,14 +193,7 @@ define $(2)_CONFIGURE_CMDS
 	mkdir -p $$($$(PKG)_SRCDIR)/buildroot-build
 	$$(HOST_CONFIGURE_OPTS) \
 	$$($$(PKG)_CONF_ENV) $$(MESON) setup \
-		--prefix=$$(HOST_DIR) \
-		--libdir=lib \
-		--sysconfdir=$$(HOST_DIR)/etc \
-		--localstatedir=$$(HOST_DIR)/var \
-		--default-library=shared \
-		--buildtype=release \
-		--wrap-mode=nodownload \
-		-Dstrip=true \
+		$$(PKG_MESON_HOST_OPTS) \
 		$$($$(PKG)_CONF_OPTS) \
 		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/buildroot-build
 endef
-- 
2.53.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-05 22:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-05 22:38 [Buildroot] [PATCH 1/5] package/pkg-meson: share Meson setup options James Hilliard
2026-10-05 22:38 ` [Buildroot] [PATCH 2/5] package/pkg-meson: share cross-file generation James Hilliard
2026-10-05 22:38 ` [Buildroot] [PATCH 3/5] package/pkg-python: add meson setup type James Hilliard
2026-10-05 22:38 ` [Buildroot] [PATCH 4/5] package/python-numpy: bump to version 2.5.3 James Hilliard
2026-10-05 22:38 ` [Buildroot] [PATCH 5/5] package/python-scipy: bump to version 1.18.1 James Hilliard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.