From 43d0e0778950dc2d8801b03491da040de2f75601 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Sun, 19 Jan 2020 15:34:32 +0200 Subject: [PATCH] domoticz: bump to 2020.1 Drop upstreamed patches. The file appversion.default was removed from Domoticz, causing the hacks to inject APPVERSION, APPDATE and APPHASH to fail. As the appversion.h is generated during compile time, implementing a new way to inject these defines is non-trivial, so simply drop them. As the minor version for this release is no longer based on the number of commits, the package versioning needs to be revised if we want to build a git snapshot instead of stable release. Leave this for another day and drop that logic for now. Signed-off-by: Stijn Tintel --- utils/domoticz/Makefile | 26 +----- utils/domoticz/patches/010-python.patch | 64 --------------- .../patches/020-openssl-deprecated.patch | 22 ------ ...seSet-Use-round-instead-of-std-round.patch | 79 ------------------- 4 files changed, 4 insertions(+), 187 deletions(-) delete mode 100644 utils/domoticz/patches/010-python.patch delete mode 100644 utils/domoticz/patches/020-openssl-deprecated.patch delete mode 100644 utils/domoticz/patches/030-SunRiseSet-Use-round-instead-of-std-round.patch diff --git a/utils/domoticz/Makefile b/utils/domoticz/Makefile index 7b40ba075..ded095a2d 100644 --- a/utils/domoticz/Makefile +++ b/utils/domoticz/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2016 - 2017 Stijn Tintel +# Copyright (C) 2016 - 2020 Stijn Tintel # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,21 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=domoticz -PKG_VERSION_MAJOR:=4 -PKG_VERSION_PATCH:=10717 -PKG_COMMIT:= -PKG_VERSION:=$(PKG_VERSION_MAJOR).$(PKG_VERSION_PATCH) -PKG_RELEASE:=3 +PKG_VERSION:=2020.1 +PKG_RELEASE:=1 -ifeq ($(PKG_COMMIT),) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/domoticz/domoticz/archive/$(PKG_VERSION)/$(PKG_SOURCE) -else -PKG_SOURCE:=$(PKG_NAME)-$(PKG_COMMIT).tar.gz -PKG_SOURCE_URL:=https://github.com/domoticz/domoticz/archive/$(PKG_COMMIT)/$(PKG_SOURCE) -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_COMMIT) -endif -PKG_HASH:=c053a2161942529f56b748945ec297dcd67f449e68029fc886893a528891ad86 +PKG_HASH:=d0c17b2082dad8a8caeed888b7d4c191975e74a2808b5d078305f5327b82442d PKG_LICENSE:=GPL-3.0 PKG_LICENSE_FILES:=License.txt @@ -80,15 +71,6 @@ TARGET_CXXFLAGS+=-DWITH_GPIO -flto define Build/Prepare $(call Build/Prepare/Default) - # Fix APPVERSION/APPDATE since we don't build from a git tree - sed -i 's/#define APPVERSION.*/#define APPVERSION $(PKG_VERSION_PATCH)/' \ - $(PKG_BUILD_DIR)/appversion.default - COMMITDATE=`tar tvfz $(DL_DIR)/$(PKG_SOURCE) --full-time | sed 's/.* \(20..-..-.. ..:..:..\) domoticz-.*/\1/;q'`; \ - COMMITTS=`date --date="$$$${COMMITDATE}" +%s`; \ - sed -i "s/#define APPDATE.*/#define APPDATE $$$${COMMITTS}/" $(PKG_BUILD_DIR)/appversion.default -ifneq ($(PKG_COMMIT),) - sed -i "s/#define APPHASH.*/#define APPHASH \"$(shell echo $(PKG_COMMIT) | cut -c1-8)\"/" $(PKG_BUILD_DIR)/appversion.default -endif # Remove unwanted scripts cd $(PKG_BUILD_DIR)/scripts && rm -rf \ buienradar_rain_example.pl \ diff --git a/utils/domoticz/patches/010-python.patch b/utils/domoticz/patches/010-python.patch deleted file mode 100644 index c46c92363..000000000 --- a/utils/domoticz/patches/010-python.patch +++ /dev/null @@ -1,64 +0,0 @@ -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 diff --git a/utils/domoticz/patches/020-openssl-deprecated.patch b/utils/domoticz/patches/020-openssl-deprecated.patch deleted file mode 100644 index 6b01a2e76..000000000 --- a/utils/domoticz/patches/020-openssl-deprecated.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 87749eb9b74d82dced807cc16fb011d4e3fb052d Mon Sep 17 00:00:00 2001 -From: Rosen Penev -Date: Sat, 13 Jul 2019 17:28:06 -0700 -Subject: [PATCH] WebServerHelper: Fix compilation - deprecated APIs - -OpenSSL has initialization deprecated. ---- - main/WebServerHelper.cpp | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/main/WebServerHelper.cpp -+++ b/main/WebServerHelper.cpp -@@ -37,7 +37,9 @@ namespace http { - our_listener_port = web_settings.listening_port; - #ifdef WWW_ENABLE_SSL - if (secure_web_settings.is_enabled()) { -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER) - SSL_library_init(); -+#endif - secureServer_.reset(new CWebServer()); - bRet |= secureServer_->StartServer(secure_web_settings, serverpath, bIgnoreUsernamePassword); - serverCollection.push_back(secureServer_); diff --git a/utils/domoticz/patches/030-SunRiseSet-Use-round-instead-of-std-round.patch b/utils/domoticz/patches/030-SunRiseSet-Use-round-instead-of-std-round.patch deleted file mode 100644 index a7334e6b2..000000000 --- a/utils/domoticz/patches/030-SunRiseSet-Use-round-instead-of-std-round.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 01d0b036179e12284880fb2d29ae579399e5fe91 Mon Sep 17 00:00:00 2001 -From: Rosen Penev -Date: Fri, 25 Oct 2019 15:05:14 -0700 -Subject: [PATCH] SunRiseSet: Use round instead of std::round. - -The latter is not available with uClibc-ng. - -Signed-off-by: Rosen Penev ---- - main/SunRiseSet.cpp | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - -diff --git a/main/SunRiseSet.cpp b/main/SunRiseSet.cpp -index 14fe07fee7..dce69bc7ba 100644 ---- a/main/SunRiseSet.cpp -+++ b/main/SunRiseSet.cpp -@@ -144,7 +144,7 @@ bool SunRiseSet::GetSunRiseSet(const double latit, const double longit, const in - //astrlen = day_astronomical_twilight_length(year,month,day,longit,latit); - - double _tmpH; -- result.DaylengthMins = static_cast(std::round(modf(daylen, &_tmpH)*60)); -+ result.DaylengthMins = static_cast(round(modf(daylen, &_tmpH)*60)); - result.DaylengthHours = static_cast(_tmpH); - - rs = sun_rise_set(year, month, day, longit, latit, &rise, &set); -@@ -154,14 +154,14 @@ bool SunRiseSet::GetSunRiseSet(const double latit, const double longit, const in - - rise = UtcToLocal(rise, timezone); - set = UtcToLocal(set, timezone); -- result.SunAtSouthMin = static_cast(std::round(modf((rise+set)/2.0, &_tmpH)*60)); -+ result.SunAtSouthMin = static_cast(round(modf((rise+set)/2.0, &_tmpH)*60)); - result.SunAtSouthHour = static_cast(_tmpH); - - switch(rs) { - case 0: -- result.SunRiseMin = static_cast(std::round(modf(rise, &_tmpH)*60)); -+ result.SunRiseMin = static_cast(round(modf(rise, &_tmpH)*60)); - result.SunRiseHour = static_cast(_tmpH); -- result.SunSetMin = static_cast(std::round(modf(set, &_tmpH)*60)); -+ result.SunSetMin = static_cast(round(modf(set, &_tmpH)*60)); - result.SunSetHour = static_cast(_tmpH); - //fix a possible rounding issue above - if (result.SunRiseMin > 59) -@@ -189,9 +189,9 @@ bool SunRiseSet::GetSunRiseSet(const double latit, const double longit, const in - case 0: - civ_start = UtcToLocal(civ_start, timezone); - civ_end = UtcToLocal(civ_end, timezone); -- result.CivilTwilightStartMin = static_cast(std::round(modf(civ_start, &_tmpH)*60)); -+ result.CivilTwilightStartMin = static_cast(round(modf(civ_start, &_tmpH)*60)); - result.CivilTwilightStartHour = static_cast(_tmpH); -- result.CivilTwilightEndMin = static_cast(std::round(modf(civ_end, &_tmpH)*60)); -+ result.CivilTwilightEndMin = static_cast(round(modf(civ_end, &_tmpH)*60)); - result.CivilTwilightEndHour = static_cast(_tmpH); - break; - case +1: -@@ -208,9 +208,9 @@ bool SunRiseSet::GetSunRiseSet(const double latit, const double longit, const in - case 0: - naut_start = UtcToLocal(naut_start, timezone); - naut_end = UtcToLocal(naut_end, timezone); -- result.NauticalTwilightStartMin = static_cast(std::round(modf(naut_start, &_tmpH)*60)); -+ result.NauticalTwilightStartMin = static_cast(round(modf(naut_start, &_tmpH)*60)); - result.NauticalTwilightStartHour = static_cast(_tmpH); -- result.NauticalTwilightEndMin = static_cast(std::round(modf(naut_end, &_tmpH)*60)); -+ result.NauticalTwilightEndMin = static_cast(round(modf(naut_end, &_tmpH)*60)); - result.NauticalTwilightEndHour = static_cast(_tmpH); - break; - case +1: -@@ -227,9 +227,9 @@ bool SunRiseSet::GetSunRiseSet(const double latit, const double longit, const in - case 0: - astr_start = UtcToLocal(astr_start, timezone); - astr_end = UtcToLocal(astr_end, timezone); -- result.AstronomicalTwilightStartMin = static_cast(std::round(modf(astr_start, &_tmpH)*60)); -+ result.AstronomicalTwilightStartMin = static_cast(round(modf(astr_start, &_tmpH)*60)); - result.AstronomicalTwilightStartHour = static_cast(_tmpH); -- result.AstronomicalTwilightEndMin = static_cast(std::round(modf(astr_end, &_tmpH)*60)); -+ result.AstronomicalTwilightEndMin = static_cast(round(modf(astr_end, &_tmpH)*60)); - result.AstronomicalTwilightEndHour = static_cast(_tmpH); - break; - case +1: