From 7276289795d8b75afea9d4c67cd0b9c8f0e2cdd5 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 12 Sep 2019 19:02:17 -0700 Subject: [PATCH] liblo: disable tests and enable IPv6 Speeds up compilation. Also fixed compilation without deprecated POSIX APIs. Signed-off-by: Rosen Penev --- libs/liblo/Makefile | 9 ++++++++- libs/liblo/patches/010-index.patch | 15 +++++++++++++++ libs/liblo/patches/020-usleep.patch | 20 ++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 libs/liblo/patches/010-index.patch create mode 100644 libs/liblo/patches/020-usleep.patch diff --git a/libs/liblo/Makefile b/libs/liblo/Makefile index 27b4f658a0..6eb4e2ee09 100644 --- a/libs/liblo/Makefile +++ b/libs/liblo/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=liblo PKG_VERSION:=0.30 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/liblo @@ -45,6 +45,13 @@ $(call Package/liblo/Default) DEPENDS:= +liblo endef +CONFIGURE_ARGS += \ + $(if $(CONFIG_IPV6),--enable,--disable)-ipv6 \ + --enable-threads \ + --disable-examples \ + --disable-network-tests \ + --disable-tests + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/lo $(1)/usr/include/ diff --git a/libs/liblo/patches/010-index.patch b/libs/liblo/patches/010-index.patch new file mode 100644 index 0000000000..22dc4330f1 --- /dev/null +++ b/libs/liblo/patches/010-index.patch @@ -0,0 +1,15 @@ +--- a/src/server.c ++++ b/src/server.c +@@ -2006,11 +2006,8 @@ static void dispatch_method(lo_server s, const char *path, + + tmp = (char*) malloc(strlen(it->path + len) + 1); + strcpy(tmp, it->path + len); +-#if defined(WIN32) || defined(_MSC_VER) + sec = strchr(tmp, '/'); +-#else +- sec = index(tmp, '/'); +-#endif ++ + if (sec) + *sec = '\0'; + slend = sl; diff --git a/libs/liblo/patches/020-usleep.patch b/libs/liblo/patches/020-usleep.patch new file mode 100644 index 0000000000..b0bf17f744 --- /dev/null +++ b/libs/liblo/patches/020-usleep.patch @@ -0,0 +1,20 @@ +--- a/src/tools/oscsendfile.c ++++ b/src/tools/oscsendfile.c +@@ -354,7 +354,7 @@ int send_file(lo_address target, double speed) { + lo_timetag_now(&tt_now); + double wait_time = timetag_diff(*tt_last, tt_now); + if (wait_time > 0.) { +- usleep(wait_time * 1000000); ++ sleep(wait_time); + } + if (b) { + ret = lo_send_bundle(target, b); +@@ -376,7 +376,7 @@ int send_file(lo_address target, double speed) { + lo_timetag_now(&tt_now); + double wait_time = timetag_diff(*tt_last, tt_now); + if (wait_time > 0.) { +- usleep(wait_time * 1000000); ++ sleep(wait_time); + } + lo_send_bundle(target, b); + }