# # This helper is for templates using meson. # do_configure() { : ${meson_cmd:=meson} : ${meson_builddir:=build} : ${meson_crossfile:=xbps_meson.cross} if [ "$CROSS_BUILD" ]; then _MESON_TARGET_ENDIAN=little # drop the -musl suffix to the target cpu, meson doesn't recognize it _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 ;; *) # 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 > ${meson_crossfile} <