openzwave: new package
PATCH v3 1/1 openzwave: new package
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
---
Changes v2 -> v3 (after reviews of Thomas Petazzoni and Julien Boibessot):
- Remove empty line in Config.in
- Add hash file with locally computed sha256 of openzwave-v1.4.tar.gz
- Format correctly the wcsdup patch (git patch with signed-off-by description)
- Remove unneeded comments before OPENZWAVE_LICENSE
- Add TARGET_MAKE_ENV in openzwave.mk
- Use instlibdir variable to install library in /usr/lib instead of /usr/lib64
- Use sysconfdir variable to install configuration files in /etc/openzwave instead of /usr/etc/openzwave
- Remove unneeded ozw_config binary from target directory
Changes v1 -> v2:
- Fix indentation in Config.in
- Add dependency on BR2_USE_WCHAR (from patch of Joris Lijssens)
- Remove TARGET_CONFIGURE_ENV from openzwave.mk
- Use CROSS_COMPILE variable to build (from patch of Joris Lijssens)
- Add a patch to fix wcsdup implicit declaration (from review of Julien Boibessot)
package/Config.in | 1 + ...ix-warning-on-wcsdup-implicit-declaration.patch | 29 ++++++++++++ package/openzwave/Config.in | 17 +++++++ package/openzwave/openzwave.hash | 2 + package/openzwave/openzwave.mk | 52 ++++++++++++++++++++++ 5 files changed, 101 insertions(+) create mode 100644 package/openzwave/0001-Fix-warning-on-wcsdup-implicit-declaration.patch create mode 100644 package/openzwave/Config.in create mode 100644 package/openzwave/openzwave.hash create mode 100644 package/openzwave/openzwave.mk
package/Config.in +1 -0
@@ -1172,6 +1172,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"
package/openzwave/0001-Fix-warning-on-wcsdup-implicit-declaration.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 0878d933223158343af3fe13e03bcd128e8b4cbc Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Fri, 22 Apr 2016 17:06:27 +0200 +Subject: [PATCH 1/1] Fix warning on wcsdup implicit declaration + +Define __GNU_SOURCE in cpp/hidapi/linux/hid.c (like already done in +cpp/hidapi/libusb/hid.c) to fix implicit declaration of wcsdup function + +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + cpp/hidapi/linux/hid.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cpp/hidapi/linux/hid.c b/cpp/hidapi/linux/hid.c +index dbf9b9b..c3eb22b 100644 +--- a/cpp/hidapi/linux/hid.c ++++ b/cpp/hidapi/linux/hid.c +@@ -21,6 +21,8 @@ + http://github.com/signal11/hidapi . + ********************************************************/ + ++#define _GNU_SOURCE /* needed for wcsdup() before glibc 2.10 */ ++ + /* C */ + #include <stdio.h> + #include <string.h> +-- +1.9.1 +
package/openzwave/Config.in new file +17 -0
@@ -0,0 +1,17 @@ +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
package/openzwave/openzwave.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed: +sha256 ca122365f6237dc245be0129eb460e78126976b9c7bd06487795d3acfc9f2a5f openzwave-v1.4.tar.gz
package/openzwave/openzwave.mk new file +52 -0
52 lines not on this page · raw message
Signature · 15 lines
1.9.1 _________________________________________________________________________________________________________________________ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified. Thank you.
PATCH v3 1/1 openzwave: new package
Hello,
builds fine on 64bits Host with internal BR toolchain (uclibc, ARM cortex-A9, BR git).
runs also fine on i.MX6 with AEON Labs Z-Stick S2.
So:
Quoted 6 lines · fabrice.fontaine at orange.com
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 <[email protected]>
Quoted 160 lines
---
Changes v2 -> v3 (after reviews of Thomas Petazzoni and Julien Boibessot):
- Remove empty line in Config.in
- Add hash file with locally computed sha256 of openzwave-v1.4.tar.gz
- Format correctly the wcsdup patch (git patch with signed-off-by description)
- Remove unneeded comments beforeOPENZWAVE_LICENSE
- AddTARGET_MAKE_ENVin openzwave.mk
- Use instlibdir variable to install library in/usr/libinstead of/usr/lib64
- Use sysconfdir variable to install configuration files in/etc/openzwaveinstead of/usr/etc/openzwave
- Remove unneededozw_configbinary from target directoryChanges v1 -> v2:
- Fix indentation in Config.in
- Add dependency onBR2_USE_WCHAR(from patch of Joris Lijssens)
- RemoveTARGET_CONFIGURE_ENVfrom openzwave.mk
- UseCROSS_COMPILEvariable to build (from patch of Joris Lijssens)
- Add a patch to fix wcsdup implicit declaration (from review of Julien Boibessot)package/Config.in | 1 + ...ix-warning-on-wcsdup-implicit-declaration.patch | 29 ++++++++++++ package/openzwave/Config.in | 17 +++++++ package/openzwave/openzwave.hash | 2 + package/openzwave/openzwave.mk | 52 ++++++++++++++++++++++ 5 files changed, 101 insertions(+) create mode 100644 package/openzwave/0001-Fix-warning-on-wcsdup-implicit-declaration.patch create mode 100644 package/openzwave/Config.in create mode 100644 package/openzwave/openzwave.hash create mode 100644 package/openzwave/openzwave.mkpackage/Config.in +1
-0@@ -1172,6 +1172,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"package/openzwave/0001-Fix-warning-on-wcsdup-implicit-declaration.patch new file +29
-0@@ -0,0 +1,29 @@ +From 0878d933223158343af3fe13e03bcd128e8b4cbc Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <[email protected]> +Date: Fri, 22 Apr 2016 17:06:27 +0200 +Subject: [PATCH 1/1] Fix warning on wcsdup implicit declaration + +Define __GNU_SOURCE in cpp/hidapi/linux/hid.c (like already done in +cpp/hidapi/libusb/hid.c) to fix implicit declaration of wcsdup function + +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + cpp/hidapi/linux/hid.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cpp/hidapi/linux/hid.c b/cpp/hidapi/linux/hid.c +index dbf9b9b..c3eb22b 100644 +--- a/cpp/hidapi/linux/hid.c ++++ b/cpp/hidapi/linux/hid.c +@@ -21,6 +21,8 @@ + http://github.com/signal11/hidapi . + ********************************************************/ + ++#define _GNU_SOURCE /* needed for wcsdup() before glibc 2.10 */ ++ + /* C */ + #include <stdio.h> + #include <string.h> +-- +1.9.1 +package/openzwave/Config.in new file +17
-0@@ -0,0 +1,17 @@ +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_WCHARpackage/openzwave/openzwave.hash new file +2
-0@@ -0,0 +1,2 @@ +# Locally computed: +sha256 ca122365f6237dc245be0129eb460e78126976b9c7bd06487795d3acfc9f2a5f openzwave-v1.4.tar.gzpackage/openzwave/openzwave.mk new file +42
-0@@ -0,0 +1,52 @@ +################################################################################ +# +# openzwave +# +################################################################################ + +OPENZWAVE_VERSION = v1.4 +OPENZWAVE_SITE = $(call github,OpenZWave,open-zwave,$(OPENZWAVE_VERSION)) +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 + $(TARGET_MAKE_ENV) $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) +endef + +# Set instlibdir to install libopenzwave.so* in the correct directory +# otherwise openzwave will check that /lib64 exists (on the host) to +# know if the library should be installed in $(PREFIX)/lib or $(PREFIX)/lib64. +# Set pkgconfigdir to /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. +# Set sysconfdir to /etc/openzwave to install openzwave configuration files in +# the correct directory otherwise openzwave will install configuration files in +# $(PREFIX)/etc/openzwave. +define OPENZWAVE_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + PREFIX=/usr DESTDIR=$(STAGING_DIR) \ + instlibdir=/usr/lib \ + pkgconfigdir=/usr/lib/pkgconfig \ + sysconfdir=/etc/openzwave \ + install +endef + +# Apply the same tricks (even if the trick on pkgconfigdir is not needed as +# libopenzwave.pc is not useful in target directory). +# Delete unneeded ozw_config binary from target directory as this is an utility +# application used to get the openzwave build configuration. +define OPENZWAVE_INSTALL_TARGET_CMDS
package/openzwave/openzwave.mk line 52
Quoted 10 lines
package/openzwave/openzwave.mk new file +10
-0+ $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + PREFIX=/usr DESTDIR=$(TARGET_DIR) \ + instlibdir=/usr/lib \ + pkgconfigdir=/usr/lib/pkgconfig \ + sysconfdir=/etc/openzwave \ + install + rm -f $(TARGET_DIR)/usr/bin/ozw_config +endef + +$(eval $(generic-package))
Regards,
Julien
PATCH v3 1/1 openzwave: new package
In reply to fabrice.fontaine at orange.comQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
<[email protected]> writes:
Hi,
Sorry for the slow response. The commit looks good, but when I tried doing a test build with it applied to the next branch I got:
Building Msg.o
Building Notification.o
Creating vers.cpp
Making ozw_config file
Building vers.o/home/peko/source/buildroot/output-zwave/build/openzwave-v1.4/cpp/src/vers.cpp:4:30: error: ?rc1? was not declared in this scope
uint16_t ozw_vers_revision = rc1;
^/home/peko/source/buildroot/output-zwave/build/openzwave-v1.4/cpp/build/support.mk:113: recipe for target '/home/peko/source/buildroot/output-zwave/build/openzwave-v1.4/.lib/vers.o' failed make[3]
vers.cpp contains:
#include "Defs.h"uint16_t ozw_vers_major = 1;uint16_t ozw_vers_minor = 4;uint16_t ozw_vers_revision = rc1;
char ozw_version_string[] = "2016.05-rc1-96-gb28564b";
Which sounds like it is getting the git version info of the Buildroot repo, which is obviously wrong.
Care to take a look?
Signature · 1 line
Bye, Peter Korsgaard