yate: fix build on macos 736/head
authorSergey V. Lobanov <sergey@lobanov.in>
Tue, 1 Feb 2022 17:29:13 +0000 (20:29 +0300)
committerSergey V. Lobanov <sergey@lobanov.in>
Sun, 6 Feb 2022 08:46:51 +0000 (11:46 +0300)
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 <sergey@lobanov.in>
net/yate/Makefile

index 78c2c32fff592cb515f8950264d80e1b684c2dab..ef6426587050e32f00341f963e91795bae8b4d06 100644 (file)
@@ -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 \