summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD11
-rw-r--r--python3.9.patch44
3 files changed, 55 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dff36a65235a..fa950394dd2a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = domoticz
pkgdesc = Web based home automation
pkgver = 2020.2
- pkgrel = 4
+ pkgrel = 5
url = https://www.domoticz.com
install = domoticz.install
arch = i686
@@ -26,8 +26,10 @@ pkgbase = domoticz
depends = python
source = https://github.com/domoticz/domoticz/archive/2020.2.tar.gz
source = domoticz.service
+ source = python3.9.patch
md5sums = fd383a13d13d0976c72f332d6db1d24e
md5sums = c13a3f5d04142587d159820156a6223f
+ md5sums = 39b1a4aa57dff4d7083f67870bc1fa1b
pkgname = domoticz
diff --git a/PKGBUILD b/PKGBUILD
index a9fb2511744a..53302c802040 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=domoticz
pkgver=2020.2
-pkgrel=4
+pkgrel=5
pkgdesc="Web based home automation"
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h')
url='https://www.domoticz.com'
@@ -26,12 +26,17 @@ makedepends=('git'
'python')
install='domoticz.install'
source=("https://github.com/domoticz/domoticz/archive/${pkgver}.tar.gz"
- 'domoticz.service')
+ 'domoticz.service'
+ 'python3.9.patch')
md5sums=('fd383a13d13d0976c72f332d6db1d24e'
- 'c13a3f5d04142587d159820156a6223f')
+ 'c13a3f5d04142587d159820156a6223f'
+ '39b1a4aa57dff4d7083f67870bc1fa1b')
prepare() {
+
mkdir -p "${srcdir}/${pkgname}-${pkgver}/build"
+ patch --forward --strip=1 --input="${srcdir}/python3.9.patch"
+
cd "${srcdir}/${pkgname}-${pkgver}/build"
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/domoticz \
diff --git a/python3.9.patch b/python3.9.patch
new file mode 100644
index 000000000000..266fc190b7ef
--- /dev/null
+++ b/python3.9.patch
@@ -0,0 +1,44 @@
+diff -u --unified --recursive --text /home/raqua/domoticz/src/domoticz-2020.2/hardware/plugins/DelayedLink.h /home/raqua/domoticz2/src/domoticz-2020.2/hardware/plugins/DelayedLink.h
+--- ./domoticz-2020.2/hardware/plugins/DelayedLink.h 2020-04-26 15:49:25.000000000 +0200
++++ ./domoticz-2020.2/hardware/plugins/DelayedLink.h 2020-12-05 14:22:49.533604214 +0100
+@@ -14,6 +14,17 @@
+ #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
++# define _Py_Dealloc
++# endif
++#endif
++
+ #if PY_VERSION_HEX >= 0x030800f0
+ static inline void
+ py3__Py_DECREF(const char *filename, int lineno, PyObject *op)
+@@ -182,12 +193,14 @@
+ if (!shared_lib_) {
+ #ifdef WIN32
+ # ifdef _DEBUG
++ if (!shared_lib_) shared_lib_ = LoadLibrary("python39_d.dll");
+ if (!shared_lib_) shared_lib_ = LoadLibrary("python38_d.dll");
+ if (!shared_lib_) shared_lib_ = LoadLibrary("python37_d.dll");
+ if (!shared_lib_) shared_lib_ = LoadLibrary("python36_d.dll");
+ if (!shared_lib_) shared_lib_ = LoadLibrary("python35_d.dll");
+ if (!shared_lib_) shared_lib_ = LoadLibrary("python34_d.dll");
+ # else
++ if (!shared_lib_) shared_lib_ = LoadLibrary("python39.dll");
+ if (!shared_lib_) shared_lib_ = LoadLibrary("python38.dll");
+ if (!shared_lib_) shared_lib_ = LoadLibrary("python37.dll");
+ if (!shared_lib_) shared_lib_ = LoadLibrary("python36.dll");
+@@ -195,6 +208,7 @@
+ 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);