From fb23e4f00434e714eed88ebf81f9da522f0bd4d4 Mon Sep 17 00:00:00 2001 From: "Sergey V. Lobanov" Date: Tue, 1 Feb 2022 20:29:13 +0300 Subject: [PATCH] yate: fix build on macos yate configure script uses `uname -s` to determine OS and changes build logic regarding to build host OS. OpenWrt is always Linux so it should be built as for Linux. This patch uses fakeuname tool to pass `uname -s` checks as Linux on macos build host. Signed-off-by: Sergey V. Lobanov --- net/yate/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/net/yate/Makefile b/net/yate/Makefile index 78c2c32..ef64265 100644 --- a/net/yate/Makefile +++ b/net/yate/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=yate PKG_VERSION:=6.4.0-1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://yate.null.ro/tarballs/yate6/ @@ -25,6 +25,8 @@ PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=0 PKG_INSTALL:=1 +PKG_BUILD_DEPENDS:=HOST_OS_MACOS:fakeuname/host + # Yate currently does not compile with FORTIFY_SOURCE enabled PKG_FORTIFY_SOURCE:=0 @@ -45,6 +47,9 @@ PKG_CONFIG_DEPENDS:= \ include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk +ifeq ($(CONFIG_HOST_OS_MACOS),y) + include $(TOPDIR)/feeds/packages/utils/fakeuname/fakeuname.mk +endif TAR_OPTIONS+= --strip-components 1 TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) @@ -91,6 +96,9 @@ endef # Otherwise yate ignores CPPFLAGS TARGET_CFLAGS += $(TARGET_CPPFLAGS) +CONFIGURE_VARS+= \ + $(if $(CONFIG_HOST_OS_MACOS),PATH=$(FAKEUNAME_PATH):$(TARGET_PATH_PKG)) + CONFIGURE_ARGS+= \ --disable-sctp \ --disable-tdmcard \ -- 2.30.2