Browse Source

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 <stijn@linux-ipv6.be>
lilik-openwrt-22.03
Stijn Tintel 5 years ago
parent
commit
43d0e07789
4 changed files with 4 additions and 187 deletions
  1. +4
    -22
      utils/domoticz/Makefile
  2. +0
    -64
      utils/domoticz/patches/010-python.patch
  3. +0
    -22
      utils/domoticz/patches/020-openssl-deprecated.patch
  4. +0
    -79
      utils/domoticz/patches/030-SunRiseSet-Use-round-instead-of-std-round.patch

+ 4
- 22
utils/domoticz/Makefile View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2016 - 2017 Stijn Tintel <stijn@linux-ipv6.be>
# Copyright (C) 2016 - 2020 Stijn Tintel <stijn@linux-ipv6.be>
#
# 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 \


+ 0
- 64
utils/domoticz/patches/010-python.patch View File

@ -1,64 +0,0 @@
From e9bd383ceb63db7cfe8a284014f0cdf8c2bfe4f0 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
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 <fontaine.fabrice@gmail.com>
---
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 <frameobject.h>
#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

+ 0
- 22
utils/domoticz/patches/020-openssl-deprecated.patch View File

@ -1,22 +0,0 @@
From 87749eb9b74d82dced807cc16fb011d4e3fb052d Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
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_);

+ 0
- 79
utils/domoticz/patches/030-SunRiseSet-Use-round-instead-of-std-round.patch View File

@ -1,79 +0,0 @@
From 01d0b036179e12284880fb2d29ae579399e5fe91 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
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 <rosenp@gmail.com>
---
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<int>(std::round(modf(daylen, &_tmpH)*60));
+ result.DaylengthMins = static_cast<int>(round(modf(daylen, &_tmpH)*60));
result.DaylengthHours = static_cast<int>(_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<int>(std::round(modf((rise+set)/2.0, &_tmpH)*60));
+ result.SunAtSouthMin = static_cast<int>(round(modf((rise+set)/2.0, &_tmpH)*60));
result.SunAtSouthHour = static_cast<int>(_tmpH);
switch(rs) {
case 0:
- result.SunRiseMin = static_cast<int>(std::round(modf(rise, &_tmpH)*60));
+ result.SunRiseMin = static_cast<int>(round(modf(rise, &_tmpH)*60));
result.SunRiseHour = static_cast<int>(_tmpH);
- result.SunSetMin = static_cast<int>(std::round(modf(set, &_tmpH)*60));
+ result.SunSetMin = static_cast<int>(round(modf(set, &_tmpH)*60));
result.SunSetHour = static_cast<int>(_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<int>(std::round(modf(civ_start, &_tmpH)*60));
+ result.CivilTwilightStartMin = static_cast<int>(round(modf(civ_start, &_tmpH)*60));
result.CivilTwilightStartHour = static_cast<int>(_tmpH);
- result.CivilTwilightEndMin = static_cast<int>(std::round(modf(civ_end, &_tmpH)*60));
+ result.CivilTwilightEndMin = static_cast<int>(round(modf(civ_end, &_tmpH)*60));
result.CivilTwilightEndHour = static_cast<int>(_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<int>(std::round(modf(naut_start, &_tmpH)*60));
+ result.NauticalTwilightStartMin = static_cast<int>(round(modf(naut_start, &_tmpH)*60));
result.NauticalTwilightStartHour = static_cast<int>(_tmpH);
- result.NauticalTwilightEndMin = static_cast<int>(std::round(modf(naut_end, &_tmpH)*60));
+ result.NauticalTwilightEndMin = static_cast<int>(round(modf(naut_end, &_tmpH)*60));
result.NauticalTwilightEndHour = static_cast<int>(_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<int>(std::round(modf(astr_start, &_tmpH)*60));
+ result.AstronomicalTwilightStartMin = static_cast<int>(round(modf(astr_start, &_tmpH)*60));
result.AstronomicalTwilightStartHour = static_cast<int>(_tmpH);
- result.AstronomicalTwilightEndMin = static_cast<int>(std::round(modf(astr_end, &_tmpH)*60));
+ result.AstronomicalTwilightEndMin = static_cast<int>(round(modf(astr_end, &_tmpH)*60));
result.AstronomicalTwilightEndHour = static_cast<int>(_tmpH);
break;
case +1:

Loading…
Cancel
Save