]> git.pld-linux.org Git - packages/domoticz.git/commitdiff
fix build with python 3.9
authorJan Palus <atler@pld-linux.org>
Thu, 8 Apr 2021 22:08:25 +0000 (00:08 +0200)
committerJan Palus <atler@pld-linux.org>
Thu, 8 Apr 2021 22:23:47 +0000 (00:23 +0200)
domoticz.spec
python3.9.patch [new file with mode: 0644]

index e1bb9caca7e4590463a2b6b2ecf7b7f9a5fb919e..1c5e3660c2905b61a8bb51547ed1d3b6f49a4593 100644 (file)
@@ -18,6 +18,7 @@ Patch2:               %{name}-python.patch
 Patch3:                no-git.patch
 Patch4:                boost-1.73.patch
 Patch5:                %{name}-gpio.patch
 Patch3:                no-git.patch
 Patch4:                boost-1.73.patch
 Patch5:                %{name}-gpio.patch
+Patch6:                python3.9.patch
 BuildRequires: boost-devel >= 1.66.0
 BuildRequires: cereal-devel
 BuildRequires: cmake >= 3.16.0
 BuildRequires: boost-devel >= 1.66.0
 BuildRequires: cereal-devel
 BuildRequires: cmake >= 3.16.0
@@ -61,6 +62,7 @@ and much more. Notifications/Alerts can be sent to any mobile device
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 APPVERSION="%{version}"
 echo "#define APPVERSION ${APPVERSION##*.}" > appversion.h
 
 APPVERSION="%{version}"
 echo "#define APPVERSION ${APPVERSION##*.}" > appversion.h
diff --git a/python3.9.patch b/python3.9.patch
new file mode 100644 (file)
index 0000000..ad13e03
--- /dev/null
@@ -0,0 +1,34 @@
+Index: domoticz-2020.2/hardware/plugins/DelayedLink.h
+===================================================================
+--- domoticz-2020.2.orig/hardware/plugins/DelayedLink.h
++++ domoticz-2020.2/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)
+Index: domoticz-2020.2/CMakeLists.txt
+===================================================================
+--- domoticz-2020.2.orig/CMakeLists.txt
++++ domoticz-2020.2/CMakeLists.txt
+@@ -744,7 +744,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 ${PYTHON_LIBRARIES} ${MQTT_LIBRARIES} ${LUA_LIBRARIES} ${CMAKE_DL_LIBS} ${TELLDUS_LIBRARIES})
+ IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+   target_link_libraries(domoticz -lresolv)
This page took 0.247411 seconds and 4 git commands to generate.