libiio: Bump to version 0.9
authorPaul Cercueil <paul.cercueil@analog.com>
Mon, 6 Feb 2017 14:55:42 +0000 (15:55 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 6 Feb 2017 18:51:01 +0000 (19:51 +0100)
This new version introduces a lot of bug fixes and some new API
functions.

Additionally, the IIO Daemon is now able to share the local IIO devices
through USB (using FunctionFS).

[Peter: usbd option needs 3.18+ headers, reorder options for menuconfig]
Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/libiio/0001-lock.c-Don-t-include-pthread.h-if-NO_THREADS-is-defi.patch [deleted file]
package/libiio/0001-utilities.c-Add-a-check-for-newlocale-function.patch [new file with mode: 0644]
package/libiio/0002-CMake-Link-with-librt-if-found.patch [deleted file]
package/libiio/Config.in
package/libiio/libiio.hash
package/libiio/libiio.mk

diff --git a/package/libiio/0001-lock.c-Don-t-include-pthread.h-if-NO_THREADS-is-defi.patch b/package/libiio/0001-lock.c-Don-t-include-pthread.h-if-NO_THREADS-is-defi.patch
deleted file mode 100644 (file)
index fd029cc..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-From d052d263600549979a6219a59e85af80eeafc6d2 Mon Sep 17 00:00:00 2001
-From: Paul Cercueil <paul.cercueil@analog.com>
-Date: Tue, 5 Jul 2016 12:12:41 +0200
-Subject: [PATCH] lock.c: Don't include <pthread.h> if NO_THREADS is defined
-
-Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
----
- lock.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lock.c b/lock.c
-index 39248ab..00eb9d9 100644
---- a/lock.c
-+++ b/lock.c
-@@ -18,7 +18,7 @@
- #ifdef _WIN32
- #include <windows.h>
--#else
-+#elif !defined(NO_THREADS)
- #include <pthread.h>
- #endif
--- 
-2.8.1
-
diff --git a/package/libiio/0001-utilities.c-Add-a-check-for-newlocale-function.patch b/package/libiio/0001-utilities.c-Add-a-check-for-newlocale-function.patch
new file mode 100644 (file)
index 0000000..cea22cb
--- /dev/null
@@ -0,0 +1,55 @@
+From 913c2cc740d60450e91e066cf38f5654936a6015 Mon Sep 17 00:00:00 2001
+From: Paul Cercueil <paul.cercueil@analog.com>
+Date: Mon, 6 Feb 2017 14:04:47 +0100
+Subject: [PATCH] utilities.c: Add a check for newlocale() function
+
+uClibc might define __UCLIBC_HAS_LOCALE__, without actually providing
+the locale_t type or the setlocale() function.
+
+Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
+---
+ CMakeLists.txt       | 1 +
+ iio-config.h.cmakein | 1 +
+ utilities.c          | 2 +-
+ 3 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cb3a48f..b24eff3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -66,6 +66,7 @@ endif()
+ include(CheckSymbolExists)
+ check_symbol_exists(strdup "string.h" HAS_STRDUP)
+ check_symbol_exists(strerror_r "string.h" HAS_STRERROR_R)
++check_symbol_exists(newlocale "locale.h" HAS_NEWLOCALE)
+ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+       option(WITH_IIOD "Build the IIO Daemon" ON)
+diff --git a/iio-config.h.cmakein b/iio-config.h.cmakein
+index 1b8608e..6700326 100644
+--- a/iio-config.h.cmakein
++++ b/iio-config.h.cmakein
+@@ -21,6 +21,7 @@
+ #cmakedefine HAS_PIPE2
+ #cmakedefine HAS_STRDUP
+ #cmakedefine HAS_STRERROR_R
++#cmakedefine HAS_NEWLOCALE
+ #cmakedefine HAS_PTHREAD_SETNAME_NP
+ #cmakedefine HAVE_IPV6
+ #cmakedefine HAVE_AVAHI
+diff --git a/utilities.c b/utilities.c
+index 88b8257..21dbd10 100644
+--- a/utilities.c
++++ b/utilities.c
+@@ -34,7 +34,7 @@
+ #endif
+ #ifdef LOCALE_SUPPORT
+-#if defined(__MINGW32__)
++#if defined(__MINGW32__) || (!defined(_WIN32) && !defined(HAS_NEWLOCALE))
+ static int read_double_locale(const char *str, double *val)
+ {
+       char *end, *old_locale;
+-- 
+2.11.0
+
diff --git a/package/libiio/0002-CMake-Link-with-librt-if-found.patch b/package/libiio/0002-CMake-Link-with-librt-if-found.patch
deleted file mode 100644 (file)
index 2c45016..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-From 1bc450179a0819970261e6a29071756d09b71c5f Mon Sep 17 00:00:00 2001
-From: Paul Cercueil <paul.cercueil@analog.com>
-Date: Fri, 19 Aug 2016 09:00:58 +0200
-Subject: [PATCH] CMake: Link with librt if found
-
-This is required for older versions of glibc.
-
-Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
----
- CMakeLists.txt | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 2a339fe..3dd3520 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -113,6 +113,10 @@ add_definitions(-DLIBIIO_VERSION_GIT="${LIBIIO_VERSION_GIT}")
- if(WITH_LOCAL_BACKEND)
-       add_definitions(-DLOCAL_BACKEND=1)
-       set(LIBIIO_CFILES ${LIBIIO_CFILES} local.c)
-+
-+      # Link with librt if present
-+      find_library(LIBRT_LIBRARIES rt)
-+      set(LIBS_TO_LINK ${LIBS_TO_LINK} ${LIBRT_LIBRARIES})
- endif()
- find_library(LIBUSB_LIBRARIES usb-1.0)
--- 
-2.8.1
-
index 2e7a76d8c86eb2ee80b972a76dbb912b72343ad0..6f6af1685249e573b84c7cd72921b31fc1eaab13 100644 (file)
@@ -24,7 +24,7 @@ config BR2_PACKAGE_LIBIIO_XML_BACKEND
 
 config BR2_PACKAGE_LIBIIO_NETWORK_BACKEND
        bool "Network backend"
-       depends on BR2_PACKAGE_LIBIIO_XML_BACKEND
+       select BR2_PACKAGE_LIBIIO_XML_BACKEND
        default y
        help
          Enable the network backend of the library.
@@ -32,7 +32,7 @@ config BR2_PACKAGE_LIBIIO_NETWORK_BACKEND
 config BR2_PACKAGE_LIBIIO_USB_BACKEND
        bool "USB backend"
        depends on BR2_TOOLCHAIN_HAS_THREADS # from libusb
-       depends on BR2_PACKAGE_LIBIIO_XML_BACKEND
+       select BR2_PACKAGE_LIBIIO_XML_BACKEND
        select BR2_PACKAGE_LIBUSB
        default y
        help
@@ -43,7 +43,7 @@ comment "The USB backend needs a toolchain w/ threads"
 
 config BR2_PACKAGE_LIBIIO_SERIAL_BACKEND
        bool "Serial backend"
-       depends on BR2_PACKAGE_LIBIIO_XML_BACKEND
+       select BR2_PACKAGE_LIBIIO_XML_BACKEND
        select BR2_PACKAGE_LIBSERIALPORT
        default y
        help
@@ -58,6 +58,20 @@ config BR2_PACKAGE_LIBIIO_IIOD
        help
          Install the IIO Daemon.
 
+config BR2_PACKAGE_LIBIIO_IIOD_USBD
+       bool "USB support in the IIO Daemon (FunctionFS)"
+       depends on BR2_PACKAGE_LIBIIO_IIOD
+       depends on BR2_PACKAGE_LIBAIO_ARCH_SUPPORTS
+       depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 # usb_functionfs_descs_head_v2
+       select BR2_PACKAGE_LIBAIO
+       help
+         Add support for USB through FunctionFS with IIOD.
+
+comment "USB support in the IIO Daemon requires libaio, headers >= 3.18"
+       depends on BR2_PACKAGE_LIBIIO_IIOD
+       depends on !BR2_PACKAGE_LIBAIO_ARCH_SUPPORTS || \
+                  !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
+
 comment "IIO Daemon needs a toolchain w/ threads"
        depends on !BR2_TOOLCHAIN_HAS_THREADS
        depends on !BR2_bfin
index f15182aa752eb7100a6b203746d340ca55c9ad6d..e5387861aa028d7639c5cb54b386a689e2f6a97f 100644 (file)
@@ -1,2 +1,2 @@
-# From https://github.com/analogdevicesinc/libiio/archive/v0.7/
-sha256 c2b02f1cb51870db52368fdaa8087dc2a4ec43f2bc3c3514d8214952f14c3f39        libiio-0.7.tar.gz
+# From https://github.com/analogdevicesinc/libiio/archive/v0.9/
+sha256 b6184876d192fbfd51e3a0a29736fa1be2dbaf07370cf861797076f40a85f823        libiio-0.9.tar.gz
index e8fb6b2f2526d32b7291bbb594e443437d0a6796..897761099906567c938ae9aad12b12f2f2819c64 100644 (file)
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBIIO_VERSION = 0.7
+LIBIIO_VERSION = 0.9
 LIBIIO_SITE = $(call github,analogdevicesinc,libiio,v$(LIBIIO_VERSION))
 LIBIIO_INSTALL_STAGING = YES
 LIBIIO_LICENSE = LGPLv2.1+
@@ -13,6 +13,8 @@ LIBIIO_LICENSE_FILES = COPYING.txt
 LIBIIO_CONF_OPTS = -DENABLE_IPV6=ON \
        -DWITH_LOCAL_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),ON,OFF) \
        -DWITH_NETWORK_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),ON,OFF) \
+       -DWITH_MATLAB_BINDINGS_API=OFF \
+       -DINSTALL_UDEV_RULE=$(if $(BR2_PACKAGE_HAS_UDEV),ON,OFF) \
        -DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) \
        -DWITH_DOC=OFF
 
@@ -44,6 +46,13 @@ else
 LIBIIO_CONF_OPTS += -DWITH_IIOD=OFF
 endif
 
+ifeq ($(BR2_PACKAGE_LIBIIO_IIOD_USBD),y)
+LIBIIO_DEPENDENCIES += libaio
+LIBIIO_CONF_OPTS += -DWITH_IIOD_USBD=ON
+else
+LIBIIO_CONF_OPTS += -DWITH_IIOD_USBD=OFF
+endif
+
 # Avahi support in libiio requires avahi-client, which needs avahi-daemon
 ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON),yy)
 LIBIIO_DEPENDENCIES += avahi