mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
Merge pull request #13762 from neheb/domo4
domoticz: fix compilation with python 3.9
This commit is contained in:
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=domoticz
|
PKG_NAME:=domoticz
|
||||||
PKG_VERSION:=2020.2
|
PKG_VERSION:=2020.2
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://github.com/domoticz/domoticz/archive/$(PKG_VERSION)/$(PKG_SOURCE)
|
PKG_SOURCE_URL:=https://github.com/domoticz/domoticz/archive/$(PKG_VERSION)/$(PKG_SOURCE)
|
||||||
@@ -25,7 +25,6 @@ PKG_USE_MIPS16:=0
|
|||||||
CMAKE_INSTALL:=1
|
CMAKE_INSTALL:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include $(INCLUDE_DIR)/nls.mk
|
|
||||||
include $(INCLUDE_DIR)/cmake.mk
|
include $(INCLUDE_DIR)/cmake.mk
|
||||||
|
|
||||||
define Package/domoticz
|
define Package/domoticz
|
||||||
@@ -42,6 +41,7 @@ define Package/domoticz
|
|||||||
+boost-thread \
|
+boost-thread \
|
||||||
+jsoncpp \
|
+jsoncpp \
|
||||||
+libcurl \
|
+libcurl \
|
||||||
|
+python3 \
|
||||||
+minizip \
|
+minizip \
|
||||||
+lua5.3 \
|
+lua5.3 \
|
||||||
+libmosquitto \
|
+libmosquitto \
|
||||||
@@ -73,8 +73,9 @@ CMAKE_OPTIONS += \
|
|||||||
-DUSE_PYTHON=yes \
|
-DUSE_PYTHON=yes \
|
||||||
-DWITH_LIBUSB=no
|
-DWITH_LIBUSB=no
|
||||||
|
|
||||||
TARGET_CFLAGS += -flto -DBOOST_BIND_GLOBAL_PLACEHOLDERS
|
TARGET_CFLAGS += -flto
|
||||||
TARGET_CXXFLAGS += -DWITH_GPIO -flto
|
TARGET_CXXFLAGS += -DWITH_GPIO -flto
|
||||||
|
TARGET_LDFLAGS += -lpython3.9
|
||||||
|
|
||||||
define Build/Prepare
|
define Build/Prepare
|
||||||
$(call Build/Prepare/Default)
|
$(call Build/Prepare/Default)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,27 @@
|
|||||||
|
--- a/hardware/plugins/DelayedLink.h
|
||||||
|
+++ b/hardware/plugins/DelayedLink.h
|
||||||
|
@@ -14,6 +14,16 @@
|
||||||
|
#include <frameobject.h>
|
||||||
|
#include "../../main/Helper.h"
|
||||||
|
|
||||||
|
+#ifndef _Py_DEC_REFTOTAL
|
||||||
|
+ /* _Py_DEC_REFTOTAL macro has been removed from Python 3.9 by:
|
||||||
|
+ https://github.com/python/cpython/commit/49932fec62c616ec88da52642339d83ae719e924 */
|
||||||
|
+# ifdef Py_REF_DEBUG
|
||||||
|
+# define _Py_DEC_REFTOTAL _Py_RefTotal--
|
||||||
|
+# else
|
||||||
|
+# define _Py_DEC_REFTOTAL
|
||||||
|
+# endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#if PY_VERSION_HEX >= 0x030800f0
|
||||||
|
static inline void
|
||||||
|
py3__Py_DECREF(const char *filename, int lineno, PyObject *op)
|
||||||
|
@@ -195,6 +205,7 @@ namespace Plugins {
|
||||||
|
if (!shared_lib_) shared_lib_ = LoadLibrary("python34.dll");
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
+ if (!shared_lib_) FindLibrary("python3.9", true);
|
||||||
|
if (!shared_lib_) FindLibrary("python3.8", true);
|
||||||
|
if (!shared_lib_) FindLibrary("python3.7", true);
|
||||||
|
if (!shared_lib_) FindLibrary("python3.6", true);
|
||||||
Reference in New Issue
Block a user