From 56c2caadbdbc316aff9220416b1d32b611241600 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 18 Nov 2019 16:23:53 -0800 Subject: [PATCH 1/2] domoticz: Fix compilation with newer Python Backported upstream patch. Fixes #10543 Signed-off-by: Rosen Penev --- utils/domoticz/patches/010-python.patch | 64 +++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 utils/domoticz/patches/010-python.patch diff --git a/utils/domoticz/patches/010-python.patch b/utils/domoticz/patches/010-python.patch new file mode 100644 index 000000000..c46c92363 --- /dev/null +++ b/utils/domoticz/patches/010-python.patch @@ -0,0 +1,64 @@ +From e9bd383ceb63db7cfe8a284014f0cdf8c2bfe4f0 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Fri, 1 Nov 2019 10:54:11 +0100 +Subject: [PATCH] DelayedLink.h: fix build with python 3.8 + +Fix build with python 3.8 by copy/pasting the vim workaround from +https://github.com/vim/vim/commit/13a1f3fb0c9d08bba6109fe2131c9524e6ba7e15 + +Fix 3703 + +Signed-off-by: Fabrice Fontaine +--- + hardware/plugins/DelayedLink.h | 38 ++++++++++++++++++++++++++++++++++ + 1 file changed, 38 insertions(+) + +diff --git a/hardware/plugins/DelayedLink.h b/hardware/plugins/DelayedLink.h +index 4bf1973281..c90a7d8e69 100644 +--- a/hardware/plugins/DelayedLink.h ++++ b/hardware/plugins/DelayedLink.h +@@ -14,6 +14,44 @@ + #include + #include "../../main/Helper.h" + ++#if PY_VERSION_HEX >= 0x030800f0 ++static inline void ++py3__Py_DECREF(const char *filename, int lineno, PyObject *op) ++{ ++ (void)filename; /* may be unused, shut up -Wunused-parameter */ ++ (void)lineno; /* may be unused, shut up -Wunused-parameter */ ++ _Py_DEC_REFTOTAL; ++ if (--op->ob_refcnt != 0) ++ { ++#ifdef Py_REF_DEBUG ++ if (op->ob_refcnt < 0) ++ { ++ _Py_NegativeRefcount(filename, lineno, op); ++ } ++#endif ++ } ++ else ++ { ++ _Py_Dealloc(op); ++ } ++} ++ ++#undef Py_DECREF ++#define Py_DECREF(op) py3__Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op)) ++ ++static inline void ++py3__Py_XDECREF(PyObject *op) ++{ ++ if (op != NULL) ++ { ++ Py_DECREF(op); ++ } ++} ++ ++#undef Py_XDECREF ++#define Py_XDECREF(op) py3__Py_XDECREF(_PyObject_CAST(op)) ++#endif ++ + namespace Plugins { + + #ifdef WIN32 From 21f05d0df1fa98055727e351f7ce2a3b25cf918f Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 18 Nov 2019 15:17:26 -0800 Subject: [PATCH 2/2] domoticz: Add missing dependency CMake picks up telldus-core now that it is in the tree. Fixes #10246 Signed-off-by: Rosen Penev --- utils/domoticz/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/domoticz/Makefile b/utils/domoticz/Makefile index edf3edf17..5358b44f8 100644 --- a/utils/domoticz/Makefile +++ b/utils/domoticz/Makefile @@ -12,7 +12,7 @@ PKG_VERSION_MAJOR:=4 PKG_VERSION_PATCH:=10717 PKG_COMMIT:= PKG_VERSION:=$(PKG_VERSION_MAJOR).$(PKG_VERSION_PATCH) -PKG_RELEASE:=1 +PKG_RELEASE:=2 ifeq ($(PKG_COMMIT),) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz @@ -54,6 +54,7 @@ define Package/domoticz +libopenzwave \ +libsqlite3 \ +libstdcpp \ + +telldus-core \ +zlib endef