Note: this patch needs package muon (samurai is used as in-built tool).
The muon package can be found in https://git.ironbug.org/void-linux-pckgs/

For using muon simply replace "build_style=meson" to "build_style=muon" in target package template.

diff --git a/common/build-style/muon.sh b/common/build-style/muon.sh
new file mode 100644
index 0000000000..56f2b4e066
--- /dev/null
+++ b/common/build-style/muon.sh
@@ -0,0 +1,152 @@
+#
+# This helper is for templates using muon.
+#
+do_patch() {
+	: ${muon_crossfile:=xbps_muon.cross}
+
+	if [ "$CROSS_BUILD" ]; then
+		_MESON_TARGET_ENDIAN=little
+		# drop the -musl suffix to the target cpu, meson doesn't recognize it
+
+		# todo: this needs check for muon
+		_MESON_TARGET_CPU=${XBPS_TARGET_MACHINE/-musl/}
+		case "$XBPS_TARGET_MACHINE" in
+			mips|mips-musl|mipshf-musl)
+				_MESON_TARGET_ENDIAN=big
+				_MESON_CPU_FAMILY=mips
+				;;
+			armv*)
+				_MESON_CPU_FAMILY=arm
+				;;
+			i686*)
+				_MESON_CPU_FAMILY=x86
+				;;
+			ppc64le*)
+				_MESON_CPU_FAMILY=ppc64
+				;;
+			ppc64*)
+				_MESON_TARGET_ENDIAN=big
+				_MESON_CPU_FAMILY=ppc64
+				;;
+			ppcle*)
+				_MESON_CPU_FAMILY=ppc
+				;;
+			ppc*)
+				_MESON_TARGET_ENDIAN=big
+				_MESON_CPU_FAMILY=ppc
+				;;
+			*)
+				# if we reached here that means that the cpu and cpu_family
+				# are the same like 'x86_64' and 'aarch64'
+				_MESON_CPU_FAMILY=${_MESON_TARGET_CPU}
+				;;
+		esac
+
+		# Record cross-compiling information in cross file.
+		# CFLAGS and LDFLAGS must be set as c_args and c_link_args.
+		cat > ${muon_crossfile} <<EOF
+[binaries]
+c = '${CC}'
+cpp = '${CXX}'
+ar = '${XBPS_CROSS_TRIPLET}-gcc-ar'
+nm = '${NM}'
+ld = '${LD}'
+strip = '${STRIP}'
+readelf = '${READELF}'
+objcopy = '${OBJCOPY}'
+pkgconfig = '${PKG_CONFIG}'
+rust = ['rustc', '--target', '${RUST_TARGET}' ,'--sysroot', '${XBPS_CROSS_BASE}/usr']
+g-ir-scanner = '${XBPS_CROSS_BASE}/usr/bin/g-ir-scanner'
+g-ir-compiler = '${XBPS_CROSS_BASE}/usr/bin/g-ir-compiler'
+g-ir-generate = '${XBPS_CROSS_BASE}/usr/bin/g-ir-generate'
+llvm-config = '/usr/bin/llvm-config'
+cups-config = '${XBPS_CROSS_BASE}/usr/bin/cups-config'
+
+[properties]
+needs_exe_wrapper = true
+
+[built-in options]
+c_args = ['$(echo ${CFLAGS} | sed -r "s/\s+/','/g")']
+c_link_args = ['$(echo ${LDFLAGS} | sed -r "s/\s+/','/g")']
+
+cpp_args = ['$(echo ${CXXFLAGS} | sed -r "s/\s+/','/g")']
+cpp_link_args = ['$(echo ${LDFLAGS} | sed -r "s/\s+/','/g")']
+
+[host_machine]
+system = 'linux'
+cpu_family = '${_MESON_CPU_FAMILY}'
+cpu = '${_MESON_TARGET_CPU}'
+endian = '${_MESON_TARGET_ENDIAN}'
+EOF
+		if [[ $build_helper = *"qemu"* ]]; then
+			sed -e "/\[binaries\]/ a exe_wrapper = '/usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static'" \
+				-i ${muon_crossfile}
+		fi
+
+		unset _MESON_CPU_FAMILY _MESON_TARGET_CPU _MESON_TARGET_ENDIAN
+	fi
+}
+
+do_configure() {
+	: ${muon_cmd:=muon}
+	: ${muon_builddir:=build}
+	: ${muon_crossfile:=xbps_muon.cross}
+
+	if [ "$CROSS_BUILD" ]; then
+		configure_args+=" --cross-file=${muon_crossfile}"
+	fi
+
+	# binutils ar needs a plugin when LTO is used on static libraries, so we
+	# have to use the gcc-ar wrapper that calls the correct plugin.
+	# As seen in https://github.com/mesonbuild/meson/issues/1646 (and its
+	# solution, https://github.com/mesonbuild/meson/pull/1649), meson fixed
+	# issues with static libraries + LTO by defaulting to gcc-ar themselves.
+	# We also force gcc-ar usage in the crossfile above.
+
+	# todo: this needs check for muon
+	export AR="gcc-ar"
+
+	${muon_cmd} setup \
+		-D prefix=/usr \
+		-D libdir=/usr/lib${XBPS_TARGET_WORDSIZE} \
+		-D libexecdir=/usr/libexec \
+		-D bindir=/usr/bin \
+		-D sbindir=/usr/bin \
+		-D includedir=/usr/include \
+		-D datadir=/usr/share \
+		-D mandir=/usr/share/man \
+		-D infodir=/usr/share/info \
+		-D localedir=/usr/share/locale \
+		-D sysconfdir=/etc \
+		-D localstatedir=/var \
+		-D sharedstatedir=/var/lib \
+		-D buildtype=plain \
+		-D b_lto=true -D b_ndebug=true \
+		-D b_staticpic=true \
+		${configure_args} ${muon_builddir}
+#		-D auto-features=auto \
+#		-D wrap-mode=nodownload \
+}
+
+do_build() {
+	: ${make_cmd:= muon samu}
+	: ${muon_builddir:=build}
+
+	${make_cmd} -C ${muon_builddir} ${makejobs} ${make_build_args}
+}
+
+do_check() {
+	: ${make_cmd:=muon}
+	: ${muon_builddir:=build}
+
+	cd ${muon_builddir}
+	DESTDIR=${DESTDIR} ${make_cmd} test
+}
+
+do_install() {
+	: ${make_cmd:=muon}
+	: ${muon_builddir:=build}
+
+	cd ${muon_builddir}
+	DESTDIR=${DESTDIR} ${make_cmd} install
+}
diff --git a/common/environment/build-style/muon.sh b/common/environment/build-style/muon.sh
new file mode 100644
index 0000000000..95bb60824e
--- /dev/null
+++ b/common/environment/build-style/muon.sh
@@ -0,0 +1 @@
+hostmakedepends+=" muon"
