Browse Source

openzwave: bump to 1.6.1063

Replace all patches with Make options or sed to improve maintainability.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
lilik-openwrt-22.03
Stijn Tintel 5 years ago
parent
commit
5b2d98284b
6 changed files with 7 additions and 192 deletions
  1. +7
    -7
      utils/openzwave/Makefile
  2. +0
    -28
      utils/openzwave/patches/001-unix-fix-compilation-against-musl-libc-1127.patch
  3. +0
    -29
      utils/openzwave/patches/900_fix-build.patch
  4. +0
    -89
      utils/openzwave/patches/901_no-hidcontroller.patch
  5. +0
    -24
      utils/openzwave/patches/902_no-udev.patch
  6. +0
    -15
      utils/openzwave/patches/904-fix-lib-include-path.patch

+ 7
- 7
utils/openzwave/Makefile View File

@ -1,6 +1,6 @@
#
# Copyright (C) 2017 Hauke Mehrtens <hauke@hauke-m.de>
# Copyright (C) 2016 - 2017 Stijn Tintel <stijn@linux-ipv6.be>
# Copyright (C) 2016 - 2020 Stijn Tintel <stijn@linux-ipv6.be>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -9,13 +9,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=openzwave
PKG_REV:=164
PKG_VERSION:=1.4.$(PKG_REV)
PKG_RELEASE:=2
PKG_VERSION:=1.6.1063
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://old.openzwave.com/downloads
PKG_HASH:=4ecf39787aaf278c203764069b581dbc26094ce57cafeab4a0c1f012d2c0ac69
PKG_HASH:=8b1b674f825cd3623d2aa9c286edbb05c0ff6537d5d3ee891ae98e21d28de26b
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
@ -58,14 +57,15 @@ MAKE_FLAGS += \
LD="$(TARGET_CROSS)g++" \
LIBDIR="$(PKG_BUILD_DIR)" \
PREFIX=$(CONFIGURE_PREFIX) \
USE_HID="no" \
ar_option="q" \
instlibdir=/usr/lib \
pkgconfigdir=/usr/lib/pkgconfig \
sysconfdir=/etc/openzwave
define Build/Prepare
$(call Build/Prepare/Default)
rm $(PKG_BUILD_DIR)/cpp/src/platform/HidController.*
sed -i -e '/hidapi/d;/HidController/d' $(PKG_BUILD_DIR)/distfiles.mk
sed -i -e 's/-O3 //;s/-Werror //' $(PKG_BUILD_DIR)/cpp/build/Makefile
endef
define Package/libopenzwave/install


+ 0
- 28
utils/openzwave/patches/001-unix-fix-compilation-against-musl-libc-1127.patch View File

@ -1,28 +0,0 @@
From eab45f0959ccb1deb662c6f8c036651088e2e8d6 Mon Sep 17 00:00:00 2001
From: Stijn Tintel <stijn@linux-ipv6.be>
Date: Fri, 17 Feb 2017 05:42:25 +0100
Subject: [PATCH] unix: fix compilation against musl libc (#1127)
POSIX.1-2001 requires sys/select.h for select() and friends.
Compile-tested on glibc and musl, runtime tested on musl.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
---
cpp/src/platform/unix/SerialControllerImpl.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/cpp/src/platform/unix/SerialControllerImpl.cpp b/cpp/src/platform/unix/SerialControllerImpl.cpp
index d95f848..b52b74f 100644
--- a/cpp/src/platform/unix/SerialControllerImpl.cpp
+++ b/cpp/src/platform/unix/SerialControllerImpl.cpp
@@ -25,6 +25,7 @@
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
+#include <sys/select.h>
#include <unistd.h>
#include <pthread.h>
#include "Defs.h"
--
2.10.2

+ 0
- 29
utils/openzwave/patches/900_fix-build.patch View File

@ -1,29 +0,0 @@
--- a/cpp/build/Makefile
+++ b/cpp/build/Makefile
@@ -15,7 +15,7 @@
# what flags we will use for compiling in debug mode
DEBUG_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-inline -Wno-format -Werror -Wno-error=sequence-point -Wno-sequence-point -ggdb -DDEBUG -fPIC -DSYSCONFDIR="\"$(PREFIX)/etc/openzwave/\""
# what flags we will use for compiling in release mode
-RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Werror -Wno-format -Wno-error=sequence-point -Wno-sequence-point -O3 -DNDEBUG -fPIC -DSYSCONFDIR="\"$(PREFIX)/etc/openzwave/\""
+RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-error=sequence-point -Wno-sequence-point -DNDEBUG -fPIC -DSYSCONFDIR="\"/etc/openzwave/\""
#what flags we will use for linking in debug mode
DEBUG_LDFLAGS := -g
@@ -139,7 +139,7 @@ $(LIBDIR)/libopenzwave.a: $(patsubst %.c
$(patsubst %.cpp,$(OBJDIR)/%.o,$(indep)) \
$(OBJDIR)/vers.o
@echo "Linking Static Library"
- @$(AR) $@ $+
+ @$(AR) q $@ $+
@$(RANLIB) $@
$(LIBDIR)/$(SHARED_LIB_NAME): $(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \
@@ -161,7 +161,7 @@ $(top_builddir)/libopenzwave.pc: $(top_s
-e 's|[@]exec_prefix@|$(PREFIX)/bin|g' \
-e 's|[@]libdir@|$(instlibdir)|g' \
-e 's|[@]includedir@|$(PREFIX)/include/openzwave/|g' \
- -e 's|[@]sysconfdir@|$(PREFIX)/etc/openzwave/|g' \
+ -e 's|[@]sysconfdir@|/etc/openzwave/|g' \
-e 's|[@]gitversion@|$(GITVERSION)|g' \
-e 's|[@]docdir@|$(docdir)/|g' \
-e 's|[@]VERSION@|$(VERSION)|g' \

+ 0
- 89
utils/openzwave/patches/901_no-hidcontroller.patch View File

@ -1,89 +0,0 @@
--- a/cpp/src/Driver.cpp
+++ b/cpp/src/Driver.cpp
@@ -37,11 +37,6 @@
#include "platform/Event.h"
#include "platform/Mutex.h"
#include "platform/SerialController.h"
-#ifdef WINRT
-#include "platform/winRT/HidControllerWinRT.h"
-#else
-#include "platform/HidController.h"
-#endif
#include "platform/Thread.h"
#include "platform/Log.h"
#include "platform/TimeStamp.h"
@@ -223,14 +218,7 @@ m_nonceReportSentAttempt( 0 )
initNetworkKeys(false);
- if( ControllerInterface_Hid == _interface )
- {
- m_controller = new HidController();
- }
- else
- {
- m_controller = new SerialController();
- }
+ m_controller = new SerialController();
m_controller->SetSignalThreshold( 1 );
Options::Get()->GetOptionAsBool( "NotifyTransactions", &m_notifytransactions );
--- a/cpp/build/Makefile
+++ b/cpp/build/Makefile
@@ -66,16 +66,7 @@ CFLAGS += $(CPPFLAGS)
#where to put the temporary library
LIBDIR ?= $(top_builddir)
-INCLUDES := -I $(top_srcdir)/cpp/src -I $(top_srcdir)/cpp/tinyxml/ -I $(top_srcdir)/cpp/hidapi/hidapi/
-
-ifeq ($(UNAME),Darwin)
-SOURCES_HIDAPI =$(top_srcdir)/cpp/hidapi/mac
-else ifeq ($(UNAME),FreeBSD)
-SOURCES_HIDAPI =$(top_srcdir)/cpp/hidapi/libusb
-else
-SOURCES_HIDAPI =$(top_srcdir)/cpp/hidapi/linux
-endif
-
+INCLUDES := -I $(top_srcdir)/cpp/src -I $(top_srcdir)/cpp/tinyxml/
SOURCES := $(top_srcdir)/cpp/src $(top_srcdir)/cpp/src/command_classes $(top_srcdir)/cpp/tinyxml \
$(top_srcdir)/cpp/src/value_classes $(top_srcdir)/cpp/src/platform $(top_srcdir)/cpp/src/platform/unix $(SOURCES_HIDAPI) $(top_srcdir)/cpp/src/aes/
@@ -85,14 +76,6 @@ VPATH = $(top_srcdir)/cpp/src:$(top_srcd
tinyxml := $(notdir $(wildcard $(top_srcdir)/cpp/tinyxml/*.cpp))
-ifeq ($(UNAME),Darwin)
-hidapi := $(notdir $(wildcard $(top_srcdir)/cpp/hidapi/mac/*.c))
-else ifeq ($(UNAME),FreeBSD)
-hidapi := $(notdir $(wildcard $(top_srcdir)/cpp/hidapi/libusb/*.c))
-else
-hidapi := $(notdir $(wildcard $(top_srcdir)/cpp/hidapi/linux/*.c)) # we do not want the libusb version
-endif
-
cclasses := $(notdir $(wildcard $(top_srcdir)/cpp/src/command_classes/*.cpp))
vclasses := $(notdir $(wildcard $(top_srcdir)/cpp/src/value_classes/*.cpp))
pform := $(notdir $(wildcard $(top_srcdir)/cpp/src/platform/*.cpp)) \
@@ -111,7 +94,6 @@ printversion:
-include $(patsubst %.cpp,$(DEPDIR)/%.d,$(tinyxml))
--include $(patsubst %.c,$(DEPDIR)/%.d,$(hidapi))
-include $(patsubst %.cpp,$(DEPDIR)/%.d,$(cclasses))
-include $(patsubst %.cpp,$(DEPDIR)/%.d,$(vclasses))
-include $(patsubst %.cpp,$(DEPDIR)/%.d,$(pform))
@@ -131,7 +113,6 @@ $(top_srcdir)/cpp/src/vers.cpp:
#$(OBJDIR)/vers.o: $(top_builddir)/vers.cpp
$(LIBDIR)/libopenzwave.a: $(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \
- $(patsubst %.c,$(OBJDIR)/%.o,$(hidapi)) \
$(patsubst %.c,$(OBJDIR)/%.o,$(aes)) \
$(patsubst %.cpp,$(OBJDIR)/%.o,$(cclasses)) \
$(patsubst %.cpp,$(OBJDIR)/%.o,$(vclasses)) \
@@ -143,7 +124,6 @@ $(LIBDIR)/libopenzwave.a: $(patsubst %.c
@$(RANLIB) $@
$(LIBDIR)/$(SHARED_LIB_NAME): $(patsubst %.cpp,$(OBJDIR)/%.o,$(tinyxml)) \
- $(patsubst %.c,$(OBJDIR)/%.o,$(hidapi)) \
$(patsubst %.c,$(OBJDIR)/%.o,$(aes)) \
$(patsubst %.cpp,$(OBJDIR)/%.o,$(cclasses)) \
$(patsubst %.cpp,$(OBJDIR)/%.o,$(vclasses)) \

+ 0
- 24
utils/openzwave/patches/902_no-udev.patch View File

@ -1,24 +0,0 @@
--- a/cpp/src/platform/unix/SerialControllerImpl.cpp
+++ b/cpp/src/platform/unix/SerialControllerImpl.cpp
@@ -34,10 +34,6 @@
#include "SerialControllerImpl.h"
#include "platform/Log.h"
-#ifdef __linux__
-#include <libudev.h>
-#endif
-
using namespace OpenZWave;
//-----------------------------------------------------------------------------
--- a/cpp/build/Makefile
+++ b/cpp/build/Makefile
@@ -59,7 +59,7 @@ endif
else
LDFLAGS += -shared -Wl,-soname,libopenzwave.so.$(VERSION)
-LIBS += -ludev
+LIBS +=
endif
CFLAGS += $(CPPFLAGS)

+ 0
- 15
utils/openzwave/patches/904-fix-lib-include-path.patch View File

@ -1,15 +0,0 @@
diff --git a/cpp/build/Makefile b/cpp/build/Makefile
index 666472d..41dc58c 100644
--- a/cpp/build/Makefile
+++ b/cpp/build/Makefile
@@ -139,8 +139,8 @@ $(top_builddir)/libopenzwave.pc: $(top_srcdir)/cpp/build/libopenzwave.pc.in $(PK
@$(SED) \
-e 's|[@]prefix@|$(PREFIX)|g' \
-e 's|[@]exec_prefix@|$(PREFIX)/bin|g' \
- -e 's|[@]libdir@|$(instlibdir)|g' \
- -e 's|[@]includedir@|$(PREFIX)/include/openzwave/|g' \
+ -e 's|[@]libdir@|$${prefix}/lib|g' \
+ -e 's|[@]includedir@|$${prefix}/include/openzwave/|g' \
-e 's|[@]sysconfdir@|/etc/openzwave/|g' \
-e 's|[@]gitversion@|$(GITVERSION)|g' \
-e 's|[@]docdir@|$(docdir)/|g' \

Loading…
Cancel
Save