aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsykose <alice@ayaya.dev>2022-11-09 14:43:15 +0000
committerpsykose <alice@ayaya.dev>2022-11-09 20:59:44 +0100
commit305ee6d66f96fa7cd8e1c9fea942e5bbe05317b8 (patch)
treed007e0094eef14fd58bf94e3d0a1925747bc9c34
parentdc9e1bf1103cd025e984087b48bf1e4a33ecb073 (diff)
downloadaports-305ee6d66f96fa7cd8e1c9fea942e5bbe05317b8.tar.gz
aports-305ee6d66f96fa7cd8e1c9fea942e5bbe05317b8.tar.bz2
aports-305ee6d66f96fa7cd8e1c9fea942e5bbe05317b8.tar.xz
community/domoticz: upgrade to 2022.2
-rw-r--r--community/domoticz/APKBUILD10
-rw-r--r--community/domoticz/domoticz-python-3.10.patch161
2 files changed, 3 insertions, 168 deletions
diff --git a/community/domoticz/APKBUILD b/community/domoticz/APKBUILD
index 5bdd0648cb..102f8ba090 100644
--- a/community/domoticz/APKBUILD
+++ b/community/domoticz/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Johannes Heimansberg <git@jhe.dedyn.io>
pkgname=domoticz
-pkgver=2022.1
-pkgrel=6
+pkgver=2022.2
+pkgrel=0
pkgdesc="Open source Home Automation System"
url="https://www.domoticz.com/"
arch="all"
@@ -19,8 +19,6 @@ subpackages="$pkgname-openrc"
install="$pkgname.pre-install"
source="domoticz-$pkgver.tar.gz::https://github.com/domoticz/domoticz/archive/$pkgver.tar.gz
luafix.patch
- domoticz-python-3.10.patch
- $pkgname-gcc12.patch::https://github.com/domoticz/domoticz/commit/8d73c42d608456448eee4c523173d83c82f094ac.patch
domoticz.confd
domoticz.initd
"
@@ -69,10 +67,8 @@ package() {
}
sha512sums="
-d75ce3c0033321c20de67bb1e69e33df03f488ca7974bcbecbb109a7c516d19885dc24c6edaa664df51798692c7bff4e3967a0382b6c1a093e4133283a747e86 domoticz-2022.1.tar.gz
+d1b45974e5913ad9f2cdff753cb4fb94d25e7859d1a6905f5ccb2e2c2bb8c88353f2ff4d431b19c1757e6731915d74c3d7c69c9aae431b48625896fdc2d0d978 domoticz-2022.2.tar.gz
83e568a2e5e310ffd22c8e8546f96ee15824817a6a65d6027195689a8a7668ec54107c68d54b70cc998cbef36a2b976c9636080ab94e91462b2280de0ac12058 luafix.patch
-6b4e1ccd9ba9065cac74ecf469073bcd68d22a98cc6fd86e29ec078355bbc142e1b928bf62f9eced58256a6ae0a5be5de5e54fa8114ff4aa01c97a65a2ba809a domoticz-python-3.10.patch
-305f4419a2b16efc77b713ff9e1f29d9c01f3a531057826697cc0ba9533eb633a00ec697ff6d1dba5bd3c763d90aa69198b40112a78587fc3b7922c13219c558 domoticz-gcc12.patch
724440da335f1e22c8dc181df62dac9ad2bcca98b39bff059de4be5901a93a0a8cb6864d92262092041d796ee7d3933f62cf337316d35a800bbb44f84a1709e0 domoticz.confd
aee1461afa96b6c9af6b88450a2e179990aca8ab74974b03242f58f786843f121fa1dec1177e82c143a775ad2e3db8603f54f341614e9fd55f645085c370b54d domoticz.initd
"
diff --git a/community/domoticz/domoticz-python-3.10.patch b/community/domoticz/domoticz-python-3.10.patch
deleted file mode 100644
index 59f1db97da..0000000000
--- a/community/domoticz/domoticz-python-3.10.patch
+++ /dev/null
@@ -1,161 +0,0 @@
-From 6e5f16b148d4fde62f53ea45c533e9a8d6592b74 Mon Sep 17 00:00:00 2001
-From: Johannes Heimansberg <git@jhe.dedyn.io>
-Date: Sat, 12 Feb 2022 10:43:26 +0100
-Subject: [PATCH] Python 3.10 compatibility
-
----
- CMakeLists.txt | 2 +-
- hardware/plugins/DelayedLink.h | 24 +++++++++++++-----------
- hardware/plugins/PluginManager.cpp | 22 +++++++++++-----------
- hardware/plugins/Plugins.cpp | 1 +
- 4 files changed, 26 insertions(+), 23 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7d7bf667a..d365f9c3a 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -745,7 +745,7 @@ ELSE()
- message(STATUS "Not found telldus-core (telldus-core.h), not adding tellstick support")
- ENDIF(TELLDUSCORE_INCLUDE)
-
--target_link_libraries(domoticz ${Boost_LIBRARIES} ${ZLIB_LIBRARIES} ${MINIZIP_LIBRARIES} ${CURL_LIBRARIES} pthread ${MQTT_LIBRARIES} ${LUA_LIBRARIES} ${CMAKE_DL_LIBS} ${TELLDUS_LIBRARIES})
-+target_link_libraries(domoticz ${Boost_LIBRARIES} ${ZLIB_LIBRARIES} ${MINIZIP_LIBRARIES} ${CURL_LIBRARIES} pthread -lpython3.10 ${MQTT_LIBRARIES} ${LUA_LIBRARIES} ${CMAKE_DL_LIBS} ${TELLDUS_LIBRARIES})
-
- IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- target_link_libraries(domoticz -lresolv)
-diff --git a/hardware/plugins/DelayedLink.h b/hardware/plugins/DelayedLink.h
-index c20ba0632..ea38d87ac 100644
---- a/hardware/plugins/DelayedLink.h
-+++ b/hardware/plugins/DelayedLink.h
-@@ -9,6 +9,7 @@
- #ifdef WITH_THREAD
- # undefine WITH_THREAD
- #endif
-+#define PY_SSIZE_T_CLEAN
- #include <Python.h>
- #include <structmember.h>
- #include <frameobject.h>
-@@ -114,14 +115,14 @@ namespace Plugins {
- DECLARE_PYTHON_SYMBOL(PyObject*, PyModule_Create2, struct PyModuleDef* COMMA int);
- #endif
- DECLARE_PYTHON_SYMBOL(int, PyModule_AddObject, PyObject* COMMA const char* COMMA PyObject*);
-- DECLARE_PYTHON_SYMBOL(int, PyArg_ParseTuple, PyObject* COMMA const char* COMMA ...);
-- DECLARE_PYTHON_SYMBOL(int, PyArg_ParseTupleAndKeywords, PyObject* COMMA PyObject* COMMA const char* COMMA char*[] COMMA ...);
-+ DECLARE_PYTHON_SYMBOL(int, _PyArg_ParseTuple_SizeT, PyObject* COMMA const char* COMMA ...);
-+ DECLARE_PYTHON_SYMBOL(int, _PyArg_ParseTupleAndKeywords_SizeT, PyObject* COMMA PyObject* COMMA const char* COMMA char*[] COMMA ...);
- DECLARE_PYTHON_SYMBOL(PyObject*, PyUnicode_FromFormat, const char* COMMA ...);
-- DECLARE_PYTHON_SYMBOL(PyObject*, Py_BuildValue, const char* COMMA ...);
-+ DECLARE_PYTHON_SYMBOL(PyObject*, _Py_BuildValue_SizeT, const char* COMMA ...);
- DECLARE_PYTHON_SYMBOL(void, PyMem_Free, void*);
- DECLARE_PYTHON_SYMBOL(PyObject*, PyBool_FromLong, long);
-- DECLARE_PYTHON_SYMBOL(int, PyRun_SimpleStringFlags, const char* COMMA PyCompilerFlags*);
-- DECLARE_PYTHON_SYMBOL(int, PyRun_SimpleFileExFlags, FILE* COMMA const char* COMMA int COMMA PyCompilerFlags*);
-+ DECLARE_PYTHON_SYMBOL(int, PyRun_SimpleStringFlags, const char* COMMA PyCompilerFlags*);
-+ DECLARE_PYTHON_SYMBOL(int, PyRun_SimpleFileExFlags, FILE* COMMA const char* COMMA int COMMA PyCompilerFlags*);
- DECLARE_PYTHON_SYMBOL(void*, PyCapsule_Import, const char *name COMMA int);
- DECLARE_PYTHON_SYMBOL(void*, PyType_GenericAlloc, const PyTypeObject * COMMA Py_ssize_t);
- DECLARE_PYTHON_SYMBOL(PyObject*, PyUnicode_DecodeUTF8, const char * COMMA Py_ssize_t COMMA const char *);
-@@ -170,6 +171,7 @@ namespace Plugins {
- if (!shared_lib_) shared_lib_ = LoadLibrary("python34.dll");
- # endif
- #else
-+ if (!shared_lib_) FindLibrary("python3.10", true);
- if (!shared_lib_) FindLibrary("python3.9", true);
- if (!shared_lib_) FindLibrary("python3.8", true);
- if (!shared_lib_) FindLibrary("python3.7", true);
-@@ -262,10 +264,10 @@ namespace Plugins {
- RESOLVE_PYTHON_SYMBOL(PyModule_Create2);
- #endif
- RESOLVE_PYTHON_SYMBOL(PyModule_AddObject);
-- RESOLVE_PYTHON_SYMBOL(PyArg_ParseTuple);
-- RESOLVE_PYTHON_SYMBOL(PyArg_ParseTupleAndKeywords);
-+ RESOLVE_PYTHON_SYMBOL(_PyArg_ParseTuple_SizeT);
-+ RESOLVE_PYTHON_SYMBOL(_PyArg_ParseTupleAndKeywords_SizeT);
- RESOLVE_PYTHON_SYMBOL(PyUnicode_FromFormat);
-- RESOLVE_PYTHON_SYMBOL(Py_BuildValue);
-+ RESOLVE_PYTHON_SYMBOL(_Py_BuildValue_SizeT);
- RESOLVE_PYTHON_SYMBOL(PyMem_Free);
- #ifdef _DEBUG
- RESOLVE_PYTHON_SYMBOL(_Py_Dealloc);
-@@ -494,8 +496,8 @@ extern SharedLibraryProxy* pythonLib;
- #define PyObject_IsInstance pythonLib->PyObject_IsInstance
- #define PyObject_IsSubclass pythonLib->PyObject_IsSubclass
- #define PyObject_Dir pythonLib->PyObject_Dir
--#define PyArg_ParseTuple pythonLib->PyArg_ParseTuple
--#define Py_BuildValue pythonLib->Py_BuildValue
-+#define PyArg_ParseTuple pythonLib->_PyArg_ParseTuple_SizeT
-+#define Py_BuildValue pythonLib->_Py_BuildValue_SizeT
- #define PyMem_Free pythonLib->PyMem_Free
- #ifdef _DEBUG
- # define PyModule_Create2TraceRefs pythonLib->PyModule_Create2TraceRefs
-@@ -503,7 +505,7 @@ extern SharedLibraryProxy* pythonLib;
- # define PyModule_Create2 pythonLib->PyModule_Create2
- #endif
- #define PyModule_AddObject pythonLib->PyModule_AddObject
--#define PyArg_ParseTupleAndKeywords pythonLib->PyArg_ParseTupleAndKeywords
-+#define PyArg_ParseTupleAndKeywords pythonLib->_PyArg_ParseTupleAndKeywords_SizeT
-
- #ifdef _DEBUG
- # define _Py_Dealloc pythonLib->_Py_Dealloc
-diff --git a/hardware/plugins/PluginManager.cpp b/hardware/plugins/PluginManager.cpp
-index ee9398957..2f1e9b17a 100644
---- a/hardware/plugins/PluginManager.cpp
-+++ b/hardware/plugins/PluginManager.cpp
-@@ -31,7 +31,7 @@
- #include "DelayedLink.h"
- #include "../../main/EventsPythonModule.h"
-
--#define MINIMUM_PYTHON_VERSION "3.4.0"
-+#define MINIMUM_PYTHON_VERSION "3.10.0"
-
- #define ATTRIBUTE_VALUE(pElement, Name, Value) \
- { \
-@@ -111,6 +111,16 @@ namespace Plugins {
- return false;
- }
-
-+ Py_Initialize();
-+
-+ // Initialise threads. Python 3.7+ does this inside Py_Initialize so done here for compatibility
-+ if (!PyEval_ThreadsInitialized())
-+ {
-+ PyEval_InitThreads();
-+ }
-+
-+ m_InitialPythonThread = PyEval_SaveThread();
-+
- // Set program name, this prevents it being set to 'python'
- Py_SetProgramName(Py_GetProgramFullPath());
-
-@@ -132,16 +142,6 @@ namespace Plugins {
- return false;
- }
-
-- Py_Initialize();
--
-- // Initialise threads. Python 3.7+ does this inside Py_Initialize so done here for compatibility
-- if (!PyEval_ThreadsInitialized())
-- {
-- PyEval_InitThreads();
-- }
--
-- m_InitialPythonThread = PyEval_SaveThread();
--
- m_bEnabled = true;
- _log.Log(LOG_STATUS, "PluginSystem: Started, Python version '%s', %d plugin definitions loaded.", sVersion.c_str(), (int)m_PluginXml.size());
- }
-diff --git a/hardware/plugins/Plugins.cpp b/hardware/plugins/Plugins.cpp
-index 01f0beace..f419147b6 100644
---- a/hardware/plugins/Plugins.cpp
-+++ b/hardware/plugins/Plugins.cpp
-@@ -2268,6 +2268,7 @@ namespace Plugins
- {
- if (PyErr_Occurred())
- {
-+ LogPythonException(sHandler);
- PyErr_Clear();
- Log(LOG_NORM, "Python exception set prior to callback '%s'", sHandler.c_str());
- }
---
-2.35.1
-