From patchwork Wed Mar 25 08:54:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 454312 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id E6C35140077 for ; Wed, 25 Mar 2015 20:11:03 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 21C9E843A4; Wed, 25 Mar 2015 09:11:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hn3y0VkM0sKu; Wed, 25 Mar 2015 09:10:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id BF7EC95283; Wed, 25 Mar 2015 09:10:59 +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 A11711C21C1 for ; Wed, 25 Mar 2015 09:10:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 99C83917C3 for ; Wed, 25 Mar 2015 09:10:58 +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 QgN6YLywW6N5 for ; Wed, 25 Mar 2015 09:10:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0075.outbound.protection.outlook.com [65.55.169.75]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7D99D91783 for ; Wed, 25 Mar 2015 09:10:57 +0000 (UTC) Received: from BN3PR0301CA0036.namprd03.prod.outlook.com (25.160.180.174) by BL2PR03MB354.namprd03.prod.outlook.com (10.141.89.22) with Microsoft SMTP Server (TLS) id 15.1.125.14; Wed, 25 Mar 2015 08:55:45 +0000 Received: from BL2FFO11FD008.protection.gbl (2a01:111:f400:7c09::163) by BN3PR0301CA0036.outlook.office365.com (2a01:111:e400:4000::46) with Microsoft SMTP Server (TLS) id 15.1.125.19 via Frontend Transport; Wed, 25 Mar 2015 08:55:45 +0000 Received: from nwd2mta2.analog.com ([137.71.25.57]) by BL2FFO11FD008.mail.protection.outlook.com ([10.173.161.4]) with Microsoft SMTP Server (TLS) id 15.1.130.10 via Frontend Transport; Wed, 25 Mar 2015 08:55:44 +0000 Received: from NWD2HUBCAS7.ad.analog.com (nwd2hubcas7.ad.analog.com [10.64.72.140]) by nwd2mta2.analog.com (8.13.8/8.13.8) with ESMTP id t2PC9rfQ008482 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Wed, 25 Mar 2015 08:09:53 -0400 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; Wed, 25 Mar 2015 04:54:52 -0400 Received: from carl.analog.com ([10.44.2.111]) by zeus.spd.analog.com (8.14.6/8.14.6) with ESMTP id t2P8sp89025985; Wed, 25 Mar 2015 04:54:51 -0400 From: Paul Cercueil To: Date: Wed, 25 Mar 2015 09:54:49 +0100 Message-ID: <1427273689-20475-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.57 as permitted sender) receiver=protection.outlook.com; client-ip=137.71.25.57; helo=nwd2mta2.analog.com; Authentication-Results: spf=pass (sender IP is 137.71.25.57) smtp.mailfrom=Paul.Cercueil@analog.com; busybox.net; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:137.71.25.57; CTRY:US; IPV:NLI; EFV:NLI; BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(438002)(199003)(189002)(229853001)(450100001)(92566002)(19580395003)(48376002)(50226001)(2351001)(77156002)(106466001)(19580405001)(62966003)(46102003)(36756003)(77096005)(110136001)(50466002)(50986999)(33646002)(53416004)(47776003)(87936001)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2PR03MB354; H:nwd2mta2.analog.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB354; 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:BL2PR03MB354; BCL:0; PCL:0; RULEID:; SRVR:BL2PR03MB354; X-Forefront-PRVS: 052670E5A4 X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2015 08:55:44.6728 (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.57]; Helo=[nwd2mta2.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB354 Cc: Paul Cercueil Subject: [Buildroot] [PATCH v2] 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. v2: Patch generated with 'git format-patch -M' and fix indentation in libiio.mk Signed-off-by: Paul Cercueil --- ...UILD_SHARED_LIBS-drive-the-type-of-librar.patch | 29 -------------------- ...2-detection-try-first-the-CMake-module-f.patch} | 0 package/libiio/Config.in | 12 ++++++++ package/libiio/libiio.mk | 32 ++++++++++++++++++++-- 4 files changed, 41 insertions(+), 32 deletions(-) delete mode 100644 package/libiio/0001-cmake-let-BUILD_SHARED_LIBS-drive-the-type-of-librar.patch rename package/libiio/{0002-cmake-libxml2-detection-try-first-the-CMake-module-f.patch => 0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch} (100%) 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/0002-cmake-libxml2-detection-try-first-the-CMake-module-f.patch b/package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch similarity index 100% rename from package/libiio/0002-cmake-libxml2-detection-try-first-the-CMake-module-f.patch rename to package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch 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..802cc03 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 \