liblo: disable tests and enable IPv6
authorRosen Penev <rosenp@gmail.com>
Fri, 13 Sep 2019 02:02:17 +0000 (19:02 -0700)
committerRosen Penev <rosenp@gmail.com>
Fri, 13 Sep 2019 02:45:19 +0000 (19:45 -0700)
Speeds up compilation.

Also fixed compilation without deprecated POSIX APIs.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/liblo/Makefile
libs/liblo/patches/010-index.patch [new file with mode: 0644]
libs/liblo/patches/020-usleep.patch [new file with mode: 0644]

index 27b4f658a0ffab237882c2e042e42c9fe075f276..6eb4e2ee09e2c632b841a80915a7e6c5417f7998 100644 (file)
@@ -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 (file)
index 0000000..22dc433
--- /dev/null
@@ -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 (file)
index 0000000..b0bf17f
--- /dev/null
@@ -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);
+     }