From patchwork Fri Apr 22 14:20:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: fabrice.fontaine@orange.com X-Patchwork-Id: 613677 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 3qryTM4Dcnz9t40 for ; Sat, 23 Apr 2016 00:20:55 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 315CD96535; Fri, 22 Apr 2016 14:20:54 +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 JysbsttURYGd; Fri, 22 Apr 2016 14:20:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id D511496527; Fri, 22 Apr 2016 14:20:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 689BF1C1ED0 for ; Fri, 22 Apr 2016 14:20:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 63A5B30AF8 for ; Fri, 22 Apr 2016 14:20:50 +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 q6QV7jx2x60J for ; Fri, 22 Apr 2016 14:20:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relais-inet.francetelecom.com (relais-ias92.francetelecom.com [193.251.215.92]) by silver.osuosl.org (Postfix) with ESMTPS id B02F4267EE for ; Fri, 22 Apr 2016 14:20:48 +0000 (UTC) Received: from omfedm07.si.francetelecom.fr (unknown [xx.xx.xx.3]) by omfedm09.si.francetelecom.fr (ESMTP service) with ESMTP id 7E1B92DC3EC for ; Fri, 22 Apr 2016 16:20:46 +0200 (CEST) Received: from Exchangemail-eme2.itn.ftgroup (unknown [10.114.31.13]) by omfedm07.si.francetelecom.fr (ESMTP service) with ESMTP id 5CDB14C06D for ; Fri, 22 Apr 2016 16:20:46 +0200 (CEST) Received: from r-x-uffo8396.rd.francetelecom.fr (10.168.234.5) by OPEXCLILM6D.corporate.adroot.infra.ftgroup (10.114.31.13) with Microsoft SMTP Server id 14.3.279.2; Fri, 22 Apr 2016 16:20:44 +0200 From: To: Date: Fri, 22 Apr 2016 16:20:42 +0200 X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.168.234.5] Message-ID: <18817_1461334846_571A333E_18817_3477_2_e09544cf-8249-4083-9f10-e131ddeb87e0@OPEXCLILM6D.corporate.adroot.infra.ftgroup> X-PMX-Version: 6.2.1.2478543, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2016.4.22.133315 Cc: Fabrice Fontaine Subject: [Buildroot] [PATCH 1/1] openzwave: new package 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" Free software library that interfaces with selected Z-Wave PC controllers, allowing anyone to create applications that manipulate and respond to devices on a Z-Wave network, without requiring in-depth knowledge of the Z-Wave protocol Signed-off-by: Fabrice Fontaine --- package/0001-fix-wcsdup.patch | 11 +++++++++++ package/Config.in | 1 + package/openzwave/Config.in | 18 ++++++++++++++++++ package/openzwave/openzwave.mk | 43 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+) create mode 100644 package/0001-fix-wcsdup.patch create mode 100644 package/openzwave/Config.in create mode 100644 package/openzwave/openzwave.mk diff --git a/package/0001-fix-wcsdup.patch b/package/0001-fix-wcsdup.patch new file mode 100644 index 0000000..f0807df --- /dev/null +++ b/package/0001-fix-wcsdup.patch @@ -0,0 +1,11 @@ +diff -Naurp openzwave-v1.4/cpp/hidapi/linux/hid.c openzwave-v1.4-wcsdup/cpp/hidapi/linux/hid.c +--- openzwave-v1.4/cpp/hidapi/linux/hid.c 2016-04-22 15:17:56.753232758 +0200 ++++ openzwave-v1.4-wcsdup/cpp/hidapi/linux/hid.c 2016-04-22 15:18:11.161482711 +0200 +@@ -21,6 +21,7 @@ + http://github.com/signal11/hidapi . + ********************************************************/ + ++#define _GNU_SOURCE + /* C */ + #include + #include diff --git a/package/Config.in b/package/Config.in index 5103621..cf697ab 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1171,6 +1171,7 @@ menu "Networking" source "package/omniorb/Config.in" source "package/openldap/Config.in" source "package/openpgm/Config.in" + source "package/openzwave/Config.in" source "package/ortp/Config.in" source "package/qdecoder/Config.in" source "package/qpid-proton/Config.in" diff --git a/package/openzwave/Config.in b/package/openzwave/Config.in new file mode 100644 index 0000000..d959ae6 --- /dev/null +++ b/package/openzwave/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_OPENZWAVE + bool "openzwave" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_USE_WCHAR + help + Free software library that interfaces with selected Z-Wave PC + controllers, allowing anyone to create applications that manipulate + and respond to devices on a Z-Wave network, without requiring + in-depth knowledge of the Z-Wave protocol + + http://www.openzwave.net + +comment "openzwave needs udev and a toolchain w/ C++, threads, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_PACKAGE_HAS_UDEV || !BR2_USE_WCHAR + diff --git a/package/openzwave/openzwave.mk b/package/openzwave/openzwave.mk new file mode 100644 index 0000000..e6a4bd6 --- /dev/null +++ b/package/openzwave/openzwave.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# openzwave +# +################################################################################ + +OPENZWAVE_VERSION = v1.4 +OPENZWAVE_SITE = $(call github,OpenZWave,open-zwave,$(OPENZWAVE_VERSION)) + +# The OpenZWave Library is distributed under the LGPL Version 3 license. +# The Example Programs and some support files are distributed under +# different licenses. +OPENZWAVE_LICENSE = LGPLv3+, GPLv3 (examples), Apache-2.0 (sh2ju.sh) +OPENZWAVE_LICENSE_FILES = license/license.txt license/lgpl.txt \ + license/gpl.txt license/Apache-License-2.0.txt + +OPENZWAVE_DEPENDENCIES = host-pkgconf udev +OPENZWAVE_INSTALL_STAGING = YES + +define OPENZWAVE_BUILD_CMDS + $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) +endef + +# Set pkgconfigdir to /usr/lib/pkgconfig to install libopenzwave.pc in the +# correct directory otherwise openzwave will call +# "pkg-config --variable pc_path pkg-config" which returns an incorrect value +define OPENZWAVE_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) \ + PREFIX=/usr DESTDIR=$(STAGING_DIR) \ + pkgconfigdir=/usr/lib/pkgconfig \ + install +endef + +# Apply the same trick on pkgconfigdir even if libopenzwave.pc is not useful in +# release directory +define OPENZWAVE_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) \ + PREFIX=/usr DESTDIR=$(TARGET_DIR) \ + pkgconfigdir=/usr/lib/pkgconfig \ + install +endef + +$(eval $(generic-package))