X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=domoticz-python.patch;h=c580ab5320a5cdbdc051e6ec97fd388b1cf641d2;hb=e7e8ea248392389403fc20b89bfe3e315e6053af;hp=9ef3e7ef4e9eeb02a94078ad08b13a8e5f9e6dc9;hpb=86ad24629954c9e56592db6cbdb8364994fbfd50;p=packages%2Fdomoticz.git diff --git a/domoticz-python.patch b/domoticz-python.patch index 9ef3e7e..c580ab5 100644 --- a/domoticz-python.patch +++ b/domoticz-python.patch @@ -1,7 +1,23 @@ -diff -urN domoticz-4.10717.orig/hardware/plugins/DelayedLink.h domoticz-4.10717/hardware/plugins/DelayedLink.h ---- domoticz-4.10717.orig/hardware/plugins/DelayedLink.h 2019-05-10 11:37:55.000000000 +0200 -+++ domoticz-4.10717/hardware/plugins/DelayedLink.h 2019-10-05 19:05:40.930495976 +0200 -@@ -145,18 +145,10 @@ +From f7b229ce873ff71e2b48e855075153dc1026750d Mon Sep 17 00:00:00 2001 +From: Michael Cronenworth +Date: Mon, 7 Aug 2017 14:37:28 -0500 +Subject: [PATCH] Follow PEP-384 when finding and opening python3 library + +Instead of maintaining a list of all Python versions the Python 3 +standard defines that there MUST be a stable ABI and we can always +rely on a "python3.dll" or a "libpython3.so" existing. + +This also fixes library loading on Linux distributions that use +SO versioned libraries. +--- + hardware/plugins/DelayedLink.h | 28 ++-------------------------- + 1 file changed, 2 insertions(+), 26 deletions(-) + +diff --git a/hardware/plugins/DelayedLink.h b/hardware/plugins/DelayedLink.h +index 25c83f034..ecf19da09 100644 +--- a/hardware/plugins/DelayedLink.h ++++ b/hardware/plugins/DelayedLink.h +@@ -150,18 +150,10 @@ if (!shared_lib_) shared_lib_ = LoadLibrary("python35_d.dll"); if (!shared_lib_) shared_lib_ = LoadLibrary("python34_d.dll"); # else @@ -19,9 +35,9 @@ diff -urN domoticz-4.10717.orig/hardware/plugins/DelayedLink.h domoticz-4.10717/ - if (!shared_lib_) FindLibrary("python3.5", true); - if (!shared_lib_) FindLibrary("python3.4", true); + if (!shared_lib_) FindLibrary("python3", true); - #endif - if (shared_lib_) - { + #ifdef __FreeBSD__ + if (!shared_lib_) FindLibrary("python3.7m", true); + if (!shared_lib_) FindLibrary("python3.6m", true); @@ -271,24 +263,12 @@ library = "lib" + sLibrary + ".so"; shared_lib_ = dlopen(library.c_str(), RTLD_LAZY | RTLD_GLOBAL);