aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey V. Lobanov <sergey@lobanov.in>2022-01-13 02:51:30 +0300
committerRosen Penev <rosenp@gmail.com>2022-01-18 18:10:18 -0800
commit30f4e26d1688b745d165eb0c604325dd42da9f04 (patch)
tree9c460408ee78ed4b0bf57554e67915d0c3c308a3
parent0e6a33a3a444058430c6fe3435fbb70eae464eb4 (diff)
perl-device-serialport: fix build on macos
./configure script detects macos specific system headers (IOKit/serial/ioss.h and sys/ttycom.h) that are not available during compile time. There is no way to pass ac_cv_* vars to ./configure script due to perl wrappers To fix this issue, fake(empty) headers provided during compile time if build host is MacOS Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
-rw-r--r--lang/perl-device-serialport/Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/lang/perl-device-serialport/Makefile b/lang/perl-device-serialport/Makefile
index 505d356cd..346732ca2 100644
--- a/lang/perl-device-serialport/Makefile
+++ b/lang/perl-device-serialport/Makefile
@@ -41,7 +41,20 @@ define Build/Configure
$(call perlmod/Configure,,)
endef
+MOD_CFLAGS_PERL += $(if $(CONFIG_HOST_OS_MACOS),-I$(PKG_BUILD_DIR)/macos_compat,)
+
define Build/Compile
+
+ifeq ($(CONFIG_HOST_OS_MACOS),y)
+ #Zeroize macos specific system headers found by ./configure
+ mkdir -p $(PKG_BUILD_DIR)/macos_compat
+ mkdir -p $(PKG_BUILD_DIR)/macos_compat/sys
+ mkdir -p $(PKG_BUILD_DIR)/macos_compat/IOKit
+ mkdir -p $(PKG_BUILD_DIR)/macos_compat/IOKit/serial
+ echo '' > $(PKG_BUILD_DIR)/macos_compat/sys/ttycom.h
+ echo '' > $(PKG_BUILD_DIR)/macos_compat/IOKit/serial/ioss.h
+endif
+
$(call perlmod/Compile,,)
endef