From patchwork Tue Mar 24 12:40:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 453809 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 9B4AE1400D5 for ; Tue, 24 Mar 2015 23:41:48 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D57C9319EE; Tue, 24 Mar 2015 12:41:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AZrmLtQa7gxE; Tue, 24 Mar 2015 12:41:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0259E314F4; Tue, 24 Mar 2015 12:41:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D38381C21E0 for ; Tue, 24 Mar 2015 12:41:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id ACB8A91A38 for ; Tue, 24 Mar 2015 12:41:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K0GFVLvU+snX for ; Tue, 24 Mar 2015 12:41:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0087.outbound.protection.outlook.com [65.55.169.87]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0949E91A34 for ; Tue, 24 Mar 2015 12:41:41 +0000 (UTC) Received: from CO2PR03CA0051.namprd03.prod.outlook.com (10.141.194.178) by BLUPR03MB360.namprd03.prod.outlook.com (10.141.75.155) with Microsoft SMTP Server (TLS) id 15.1.125.14; Tue, 24 Mar 2015 12:41:37 +0000 Received: from BN1AFFO11FD016.protection.gbl (2a01:111:f400:7c10::104) by CO2PR03CA0051.outlook.office365.com (2a01:111:e400:1414::50) with Microsoft SMTP Server (TLS) id 15.1.99.9 via Frontend Transport; Tue, 24 Mar 2015 12:41:36 +0000 Received: from nwd2mta1.analog.com (137.71.25.55) by BN1AFFO11FD016.mail.protection.outlook.com (10.58.52.76) with Microsoft SMTP Server (TLS) id 15.1.125.13 via Frontend Transport; Tue, 24 Mar 2015 12:41:35 +0000 Received: from NWD2HUBCAS7.ad.analog.com (nwd2hubcas7.ad.analog.com [10.64.72.140]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id t2OCevxQ020456 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Tue, 24 Mar 2015 05:41:00 -0700 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS7.ad.analog.com (10.64.72.140) with Microsoft SMTP Server id 14.3.210.2; Tue, 24 Mar 2015 08:40:38 -0400 Received: from carl.analog.com ([10.44.2.111]) by zeus.spd.analog.com (8.14.6/8.14.6) with ESMTP id t2OCebt4022493; Tue, 24 Mar 2015 08:40:37 -0400 From: Paul Cercueil To: Date: Tue, 24 Mar 2015 13:40:19 +0100 Message-ID: <1427200819-15713-1-git-send-email-paul.cercueil@analog.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-EOPAttributedMessage: 0 Received-SPF: Pass (protection.outlook.com: domain of analog.com designates 137.71.25.55 as permitted sender) receiver=protection.outlook.com; client-ip=137.71.25.55; helo=nwd2mta1.analog.com; Authentication-Results: spf=pass (sender IP is 137.71.25.55) smtp.mailfrom=Paul.Cercueil@analog.com; busybox.net; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:137.71.25.55; CTRY:US; IPV:NLI; EFV:NLI; BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(438002)(199003)(189002)(106466001)(2351001)(229853001)(450100001)(53416004)(50226001)(92566002)(110136001)(33646002)(87936001)(19580395003)(6806004)(50466002)(62966003)(77096005)(77156002)(50986999)(48376002)(46102003)(86362001)(19580405001)(47776003)(36756003)(575784001)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB360; H:nwd2mta1.analog.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB360; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5002010)(5005006); SRVR:BLUPR03MB360; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB360; X-Forefront-PRVS: 0525BB0ADF X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2015 12:41:35.6076 (UTC) X-MS-Exchange-CrossTenant-Id: eaa689b4-8f87-40e0-9c6f-7228de4d754a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=eaa689b4-8f87-40e0-9c6f-7228de4d754a; Ip=[137.71.25.55]; Helo=[nwd2mta1.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB360 Cc: Paul Cercueil Subject: [Buildroot] [PATCH] libiio: Bump version to 0.5 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The package now offers the possibility to install Python and/or C# bindings if the Python and Mono packages are detected. Signed-off-by: Paul Cercueil --- ...UILD_SHARED_LIBS-drive-the-type-of-librar.patch | 29 --------------- ...l2-detection-try-first-the-CMake-module-f.patch | 42 ++++++++++++++++++++++ ...l2-detection-try-first-the-CMake-module-f.patch | 42 ---------------------- package/libiio/Config.in | 12 +++++++ package/libiio/libiio.mk | 32 +++++++++++++++-- 5 files changed, 83 insertions(+), 74 deletions(-) delete mode 100644 package/libiio/0001-cmake-let-BUILD_SHARED_LIBS-drive-the-type-of-librar.patch create mode 100644 package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch delete mode 100644 package/libiio/0002-cmake-libxml2-detection-try-first-the-CMake-module-f.patch diff --git a/package/libiio/0001-cmake-let-BUILD_SHARED_LIBS-drive-the-type-of-librar.patch b/package/libiio/0001-cmake-let-BUILD_SHARED_LIBS-drive-the-type-of-librar.patch deleted file mode 100644 index 9ee0299..0000000 --- a/package/libiio/0001-cmake-let-BUILD_SHARED_LIBS-drive-the-type-of-librar.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 4d036f3708f1f427bf91c5925394d39ef76ad96a Mon Sep 17 00:00:00 2001 -From: Samuel Martin -Date: Sat, 27 Dec 2014 16:36:50 +0100 -Subject: [PATCH] cmake: let BUILD_SHARED_LIBS drive the type of library built - -Do not force the type of library because some architectures (such as -BlackFin from AnalogDevice) do not support shared object. - -Signed-off-by: Samuel Martin ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cd82a96..393fee3 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -115,7 +115,7 @@ install(FILES ${LIBIIO_PC} DESTINATION "${INSTALL_PKGCONFIG_DIR}") - #set(SETUP_PY ${CMAKE_CURRENT_SOURCE_DIR}/bindings/python/setup.py) - #configure_file(python/setup.py.in ${SETUP_PY} @ONLY) - --add_library(iio SHARED ${LIBIIO_CFILES} ${LIBIIO_HEADERS}) -+add_library(iio ${LIBIIO_CFILES} ${LIBIIO_HEADERS}) - set_target_properties(iio PROPERTIES VERSION ${VERSION} SOVERSION ${LIBIIO_VERSION_MAJOR}) - target_link_libraries(iio LINK_PRIVATE ${LIBS_TO_LINK}) - --- -2.2.1 - diff --git a/package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch b/package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch new file mode 100644 index 0000000..9f44169 --- /dev/null +++ b/package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch @@ -0,0 +1,42 @@ +From 4f849e1d2287206cfb7ff0fdeca96c22383b0d53 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Mon, 29 Dec 2014 19:05:13 +0100 +Subject: [PATCH] cmake: libxml2 detection: try first the CMake module from + libxml2 + +Libxml2 >=2.9.2 provides its own CMake module, so check for it before +falling back on the CMake's module FindLibXml2.cmake. + +Signed-off-by: Samuel Martin +--- + CMakeLists.txt | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 393fee3..b4f1d26 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,7 +38,19 @@ endif() + find_library(AVAHI_CLIENT_LIBRARIES avahi-client) + find_library(AVAHI_COMMON_LIBRARIES avahi-common) + find_library(PTHREAD_LIBRARIES pthread) +-include(FindLibXml2) ++ ++# Since libxml2-2.9.2, libxml2 provides its own LibXml2-config.cmake, with all ++# variables correctly set. ++# So, try first to find the CMake module provided by libxml2 package, then fallback ++# on the CMake's FindLibXml2.cmake module (which can lack some definition, especially ++# in static build case). ++find_package(LibXml2 QUIET NO_MODULE) ++if(DEFINED LIBXML2_VERSION_STRING) ++ set(LIBXML2_FOUND ON) ++ set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS}) ++else() ++ include(FindLibXml2) ++endif() + + set(LIBIIO_CFILES channel.c device.c context.c buffer.c utilities.c) + set(LIBIIO_HEADERS iio.h) +-- +2.2.1 + diff --git a/package/libiio/0002-cmake-libxml2-detection-try-first-the-CMake-module-f.patch b/package/libiio/0002-cmake-libxml2-detection-try-first-the-CMake-module-f.patch deleted file mode 100644 index 9f44169..0000000 --- a/package/libiio/0002-cmake-libxml2-detection-try-first-the-CMake-module-f.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 4f849e1d2287206cfb7ff0fdeca96c22383b0d53 Mon Sep 17 00:00:00 2001 -From: Samuel Martin -Date: Mon, 29 Dec 2014 19:05:13 +0100 -Subject: [PATCH] cmake: libxml2 detection: try first the CMake module from - libxml2 - -Libxml2 >=2.9.2 provides its own CMake module, so check for it before -falling back on the CMake's module FindLibXml2.cmake. - -Signed-off-by: Samuel Martin ---- - CMakeLists.txt | 14 +++++++++++++- - 1 file changed, 13 insertions(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 393fee3..b4f1d26 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -38,7 +38,19 @@ endif() - find_library(AVAHI_CLIENT_LIBRARIES avahi-client) - find_library(AVAHI_COMMON_LIBRARIES avahi-common) - find_library(PTHREAD_LIBRARIES pthread) --include(FindLibXml2) -+ -+# Since libxml2-2.9.2, libxml2 provides its own LibXml2-config.cmake, with all -+# variables correctly set. -+# So, try first to find the CMake module provided by libxml2 package, then fallback -+# on the CMake's FindLibXml2.cmake module (which can lack some definition, especially -+# in static build case). -+find_package(LibXml2 QUIET NO_MODULE) -+if(DEFINED LIBXML2_VERSION_STRING) -+ set(LIBXML2_FOUND ON) -+ set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS}) -+else() -+ include(FindLibXml2) -+endif() - - set(LIBIIO_CFILES channel.c device.c context.c buffer.c utilities.c) - set(LIBIIO_HEADERS iio.h) --- -2.2.1 - diff --git a/package/libiio/Config.in b/package/libiio/Config.in index 680d5dc..21496ed 100644 --- a/package/libiio/Config.in +++ b/package/libiio/Config.in @@ -40,4 +40,16 @@ config BR2_PACKAGE_LIBIIO_TESTS help Install the test programs (iio_info, iio_genxml, iio_readdev). +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 + help + Install the Python bindings. + endif diff --git a/package/libiio/libiio.mk b/package/libiio/libiio.mk index 7082e89..3b6d290 100644 --- a/package/libiio/libiio.mk +++ b/package/libiio/libiio.mk @@ -4,15 +4,16 @@ # ################################################################################ -LIBIIO_VERSION = v0.3 -LIBIIO_SITE = $(call github,analogdevicesinc,libiio,$(LIBIIO_VERSION)) +LIBIIO_VERSION = 0.5 +LIBIIO_SITE = $(call github,analogdevicesinc,libiio,v$(LIBIIO_VERSION)) LIBIIO_INSTALL_STAGING = YES LIBIIO_LICENSE = LGPLv2.1+ LIBIIO_LICENSE_FILES = COPYING LIBIIO_CONF_OPTS = -DENABLE_IPV6=$(if $(BR2_INET_IPV6),ON,OFF) \ -DWITH_LOCAL_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),ON,OFF) \ - -DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) + -DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) \ + -DWITH_DOC=OFF ifeq ($(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),y) LIBIIO_DEPENDENCIES += libxml2 @@ -33,6 +34,31 @@ ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON),yy) LIBIIO_DEPENDENCIES += avahi endif +ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON),y) +LIBIIO_DEPENDENCIES += python +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)/usr/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)/usr/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 \