From 97689327ca52b39cb9baeff1997b6f79975024f8 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Wed, 17 Mar 2021 09:54:47 +0100 Subject: [PATCH 1/3] meson: update to 0.57.1 v0.57 is the first version that requires at least python 3.6. Since commit 7379f8bd on the main repository we can now rely on this prerequisite. Switch to AUTORELEASE while at it. Signed-off-by: Andre Heider --- devel/meson/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devel/meson/Makefile b/devel/meson/Makefile index b90f511af..9142b1f87 100644 --- a/devel/meson/Makefile +++ b/devel/meson/Makefile @@ -1,11 +1,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=meson -PKG_VERSION:=0.56.2 -PKG_RELEASE:=1 +PKG_VERSION:=0.57.1 +PKG_RELEASE:=$(AUTORELEASE) PYPI_NAME:=meson -PKG_HASH:=3cb8bdb91383f7f8da642f916e4c44066a29262caa499341e2880f010edb87f4 +PKG_HASH:=72e1c782ba9bda204f4a1ed57f98d027d7b6eb9414c723eebbd6ec7f1955c8a6 PKG_MAINTAINER:=Andre Heider PKG_LICENSE:=Apache-2.0 From a7865a4af4d6ec75b2d5e9922b1f3971337487aa Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Tue, 9 Feb 2021 07:37:48 +0100 Subject: [PATCH 2/3] meson: fix host cpu setting CONFIG_TARGET_SUBTARGET is bogus for this, it can contain values such as 'nand' or 'tiny', use the real cpu type instead. Fixes #14662. Signed-off-by: Andre Heider --- devel/meson/meson.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/devel/meson/meson.mk b/devel/meson/meson.mk index b855e267d..ac74bd5bf 100644 --- a/devel/meson/meson.mk +++ b/devel/meson/meson.mk @@ -52,6 +52,13 @@ else MESON_ARCH:=$(CONFIG_ARCH) endif +# this is undefined for just x64_64 +ifeq ($(origin CPU_TYPE),undefined) +MESON_CPU:="generic" +else +MESON_CPU:="$(CPU_TYPE)$(if $(CPU_SUBTYPE),+$(CPU_SUBTYPE))" +endif + define Meson $(2) $(STAGING_DIR_HOST)/bin/$(PYTHON) $(MESON_DIR)/meson.py $(1) endef @@ -81,7 +88,7 @@ define Meson/CreateCrossFile -e "s|@CXXFLAGS@|$(foreach FLAG,$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \ -e "s|@LDFLAGS@|$(foreach FLAG,$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS),'$(FLAG)',)|" \ -e "s|@ARCH@|$(MESON_ARCH)|" \ - -e "s|@CPU@|$(CONFIG_TARGET_SUBTARGET)|" \ + -e "s|@CPU@|$(MESON_CPU))|" \ -e "s|@ENDIAN@|$(if $(CONFIG_BIG_ENDIAN),big,little)|" \ < $(MESON_DIR)/openwrt-cross.txt.in \ > $(1) From f1c40e3840f6f51b3cf6a74331bd128eeb8b3961 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Tue, 9 Mar 2021 10:12:38 +0100 Subject: [PATCH 3/3] meson: reconfigure on incremental builds When toggling a package specific config knob, we need to pass --reconfigure to the meson setup command if an earlier build already exists. Fixes #15032. Signed-off-by: Andre Heider --- devel/meson/meson.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devel/meson/meson.mk b/devel/meson/meson.mk index ac74bd5bf..6ae9c8da2 100644 --- a/devel/meson/meson.mk +++ b/devel/meson/meson.mk @@ -97,6 +97,7 @@ endef define Host/Configure/Meson $(call Meson/CreateNativeFile,$(HOST_BUILD_DIR)/openwrt-native.txt) $(call Meson, \ + setup $(if $(wildcard $(MESON_HOST_BUILD_DIR)/meson-*),--reconfigure,) \ --native-file $(HOST_BUILD_DIR)/openwrt-native.txt \ $(MESON_HOST_ARGS) \ $(MESON_HOST_BUILD_DIR) \ @@ -120,6 +121,7 @@ define Build/Configure/Meson $(call Meson/CreateNativeFile,$(PKG_BUILD_DIR)/openwrt-native.txt) $(call Meson/CreateCrossFile,$(PKG_BUILD_DIR)/openwrt-cross.txt) $(call Meson, \ + setup $(if $(wildcard $(MESON_BUILD_DIR)/meson-*),--reconfigure,) \ --buildtype plain \ --native-file $(PKG_BUILD_DIR)/openwrt-native.txt \ --cross-file $(PKG_BUILD_DIR)/openwrt-cross.txt \