This commit is contained in:
TriForceX
2019-09-25 20:51:37 -03:00
commit 6203ff3e7c
11215 changed files with 428258 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
From 5090603d01779bb1717fb0c50953330e8770550f Mon Sep 17 00:00:00 2001
From: Pierre-Jean Texier <pjtexier@koncepto.io>
Date: Sun, 23 Jun 2019 14:11:37 +0200
Subject: [PATCH] fix install of binaries with a static only library
Define CMAKE_INSTALL_RPATH only if ENABLE_SHARED is set otherwise the
following issue occured:
CMake Error at iiod/cmake_install.cmake:45 (file):
file RPATH_CHANGE could not write new RPATH:
/usr/lib
to the file:
/home/pjtexier/<path>/usr/sbin/iiod
No valid ELF RPATH or RUNPATH entry exists in the file; File does not have
a valid ELF identification.
Call Stack (most recent call first):
cmake_install.cmake:50 (include)
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
[Upstream status: https://github.com/analogdevicesinc/libiio/pull/283]
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d9b7ea1..634e553 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,7 @@ endif()
set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/${PROJECT_NAME}${LIBIIO_VERSION_MAJOR}-doc)")
include(GNUInstallDirs)
-if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+if(ENABLE_SHARED AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
endif()
--
2.7.4

96
package/libiio/Config.in Normal file
View File

@@ -0,0 +1,96 @@
config BR2_PACKAGE_LIBIIO
bool "libiio"
select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND if !BR2_PACKAGE_LIBIIO_XML_BACKEND
help
Libiio is a library to ease the development of software
interfacing Linux Industrial I/O (IIO) devices.
http://wiki.analog.com/resources/tools-software/linux-software/libiio
if BR2_PACKAGE_LIBIIO
config BR2_PACKAGE_LIBIIO_LOCAL_BACKEND
bool "Local backend"
default y
help
Enable the local backend of the library.
config BR2_PACKAGE_LIBIIO_XML_BACKEND
bool "XML backend"
default y
select BR2_PACKAGE_LIBXML2
help
Enable the XML backend of the library.
config BR2_PACKAGE_LIBIIO_NETWORK_BACKEND
bool "Network backend"
default y
select BR2_PACKAGE_LIBIIO_XML_BACKEND
help
Enable the network backend of the library.
config BR2_PACKAGE_LIBIIO_USB_BACKEND
bool "USB backend"
default y
depends on BR2_TOOLCHAIN_HAS_THREADS # from libusb
select BR2_PACKAGE_LIBIIO_XML_BACKEND
select BR2_PACKAGE_LIBUSB
help
Enable the USB backend of the library.
comment "The USB backend needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS
config BR2_PACKAGE_LIBIIO_SERIAL_BACKEND
bool "Serial backend"
default y
select BR2_PACKAGE_LIBIIO_XML_BACKEND
select BR2_PACKAGE_LIBSERIALPORT
help
Enable the serial backend of the library.
config BR2_PACKAGE_LIBIIO_IIOD
bool "IIO Daemon"
default y
depends on BR2_TOOLCHAIN_HAS_THREADS
select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND
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_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 headers >= 3.18"
depends on BR2_PACKAGE_LIBIIO_IIOD
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
comment "IIO Daemon needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS
config BR2_PACKAGE_LIBIIO_TESTS
bool "Install test programs"
depends on BR2_TOOLCHAIN_HAS_THREADS
help
Install the test programs (iio_info, iio_genxml, iio_readdev).
comment "IIO test programs need a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS
config BR2_PACKAGE_LIBIIO_BINDINGS_CSHARP
bool "Install C# bindings"
depends on BR2_PACKAGE_MONO
help
Install the C# bindings.
config BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON
bool "Install Python bindings"
depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
help
Install the Python bindings.
endif

30
package/libiio/S99iiod Normal file
View File

@@ -0,0 +1,30 @@
#!/bin/sh
# Server-side demuxing by default
IIOD_OPTS=-D
[ -r /etc/default/iiod ] && . /etc/default/iiod
case "$1" in
start)
echo "Starting IIO Server Daemon"
start-stop-daemon -S -b -q -m -p /var/run/iiod.pid -x /usr/sbin/iiod -- $IIOD_OPTS
exit $?
;;
stop)
echo "Stopping IIO Server Daemon"
start-stop-daemon -K -q -p /var/run/iiod.pid 2>/dev/null
exit $?
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 bc2c5299974b65cfe9aa4a06d8c74d7651594e026bce416db48a2c5aa7ba2554 libiio-0.18.tar.gz
sha256 102900208eef27b766380135906d431dba87edaa7ec6aa72e6ebd3dd67f3a97b COPYING.txt

98
package/libiio/libiio.mk Normal file
View File

@@ -0,0 +1,98 @@
################################################################################
#
# libiio
#
################################################################################
LIBIIO_VERSION = 0.18
LIBIIO_SITE = $(call github,analogdevicesinc,libiio,v$(LIBIIO_VERSION))
LIBIIO_INSTALL_STAGING = YES
LIBIIO_LICENSE = LGPL-2.1+
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 \
-DMATLAB_BINDINGS=OFF \
-DINSTALL_UDEV_RULE=$(if $(BR2_PACKAGE_HAS_UDEV),ON,OFF) \
-DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) \
-DWITH_DOC=OFF
ifeq ($(BR2_PACKAGE_LIBIIO_XML_BACKEND),y)
LIBIIO_DEPENDENCIES += libxml2
LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=ON
else
LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=OFF
endif
ifeq ($(BR2_PACKAGE_LIBIIO_USB_BACKEND),y)
LIBIIO_DEPENDENCIES += libusb
LIBIIO_CONF_OPTS += -DWITH_USB_BACKEND=ON
else
LIBIIO_CONF_OPTS += -DWITH_USB_BACKEND=OFF
endif
ifeq ($(BR2_PACKAGE_LIBIIO_SERIAL_BACKEND),y)
LIBIIO_DEPENDENCIES += libserialport
LIBIIO_CONF_OPTS += -DWITH_SERIAL_BACKEND=ON
else
LIBIIO_CONF_OPTS += -DWITH_SERIAL_BACKEND=OFF
endif
ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
LIBIIO_DEPENDENCIES += host-flex host-bison
LIBIIO_CONF_OPTS += -DWITH_IIOD=ON
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 and dbus
ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy)
LIBIIO_DEPENDENCIES += avahi
endif
ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON),y)
ifeq ($(BR2_PACKAGE_PYTHON),y)
LIBIIO_DEPENDENCIES += python
else ifeq ($(BR2_PACKAGE_PYTHON3),y)
LIBIIO_DEPENDENCIES += python3
endif
LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=ON
else
LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=OFF
endif
ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_CSHARP),y)
define LIBIIO_INSTALL_CSHARP_BINDINGS_TO_TARGET
rm $(TARGET_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll.mdb
$(HOST_DIR)/bin/gacutil -root $(TARGET_DIR)/usr/lib -i \
$(TARGET_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll
endef
define LIBIIO_INSTALL_CSHARP_BINDINGS_TO_STAGING
$(HOST_DIR)/bin/gacutil -root $(STAGING_DIR)/usr/lib -i \
$(STAGING_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll
endef
LIBIIO_POST_INSTALL_TARGET_HOOKS += LIBIIO_INSTALL_CSHARP_BINDINGS_TO_TARGET
LIBIIO_POST_INSTALL_STAGING_HOOKS += LIBIIO_INSTALL_CSHARP_BINDINGS_TO_STAGING
LIBIIO_DEPENDENCIES += mono
LIBIIO_CONF_OPTS += -DCSHARP_BINDINGS=ON
else
LIBIIO_CONF_OPTS += -DCSHARP_BINDINGS=OFF
endif
ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
define LIBIIO_INSTALL_INIT_SYSV
$(INSTALL) -D -m 0755 package/libiio/S99iiod \
$(TARGET_DIR)/etc/init.d/S99iiod
endef
endif
$(eval $(cmake-package))