summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Reimer2020-09-04 23:29:47 +0200
committerManuel Reimer2020-09-04 23:29:47 +0200
commit2e771ab27998ae9fa5437a36e85d009d301b3d42 (patch)
tree86035c9ef265e0b4000a08f023ccfa62f7cadd9a
parentdbc9704eac4ce1744ea4b70287a459fdd39c86fe (diff)
downloadaur-2e771ab27998ae9fa5437a36e85d009d301b3d42.tar.gz
Sync from VDR4Arch (https://github.com/VDR4Arch/vdr4arch/commit/d157e0dcad325a4ae3e972b9d97a189f889f842c)
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD11
-rw-r--r--vdr-fritzbox-detach_thread.patch35
3 files changed, 49 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ae06198371bb..6a7be53c2c0e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by makepkg 5.2.2
-# Sun Aug 2 17:33:31 UTC 2020
+# Fri Sep 4 21:29:47 UTC 2020
pkgbase = vdr-fritzbox
pkgdesc = Connects to the Fritz!Box to inform you about incoming and outgoing calls
pkgver = 1.5.3
- pkgrel = 21
+ pkgrel = 22
url = https://github.com/jowi24/vdr-fritz
arch = x86_64
arch = i686
@@ -18,10 +18,12 @@ pkgbase = vdr-fritzbox
backup = etc/vdr/conf.avail/50-fritzbox.conf
source = https://github.com/jowi24/vdr-fritz/releases/download/1.5.3/vdr-fritzbox-1.5.3.tgz
source = libnetpp-boost-1.67-fix.patch::https://github.com/jowi24/libnetpp/commit/212847f0efaeffee8422059b8e202d844174aaf3.patch
+ source = vdr-fritzbox-detach_thread.patch
source = 50-fritzbox.conf
- md5sums = 14a81f5c5fd0f871e9294964c1bf21fc
- md5sums = ebf28bb6267256cdfa8c4fe6dc18f2b8
- md5sums = a46d5cab7444a60d0ca9657d0785a8a0
+ sha256sums = d09471c229206e268216828c1a2d2bb7a15fc26530e0cb67bfbdb8ba934e2b0e
+ sha256sums = 8f5796a9dc725c627cc556fecd271f24f6a0a5c7fbc0a64df807cd4f3c6efa3a
+ sha256sums = 64af3529c3ea466911ee89f4848019421716a53526ee74a534ed713ccc5625ba
+ sha256sums = f80efa7827c89f30d0ce25df00e6bb0efdf0e8fe68e9ca15c7f15caea731ba33
pkgname = vdr-fritzbox
diff --git a/PKGBUILD b/PKGBUILD
index 66ed76db186d..e791648e5e52 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=vdr-fritzbox
pkgver=1.5.3
_vdrapi=2.4.3
-pkgrel=21
+pkgrel=22
pkgdesc="Connects to the Fritz!Box to inform you about incoming and outgoing calls"
url="https://github.com/jowi24/vdr-fritz"
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h')
@@ -14,16 +14,19 @@ makedepends=('boost')
_plugname=${pkgname//vdr-/}
source=("https://github.com/jowi24/vdr-fritz/releases/download/$pkgver/$pkgname-$pkgver.tgz"
"libnetpp-boost-1.67-fix.patch::https://github.com/jowi24/libnetpp/commit/212847f0efaeffee8422059b8e202d844174aaf3.patch"
+ "$pkgname-detach_thread.patch"
"50-$_plugname.conf")
backup=("etc/vdr/conf.avail/50-$_plugname.conf")
-md5sums=('14a81f5c5fd0f871e9294964c1bf21fc'
- 'ebf28bb6267256cdfa8c4fe6dc18f2b8'
- 'a46d5cab7444a60d0ca9657d0785a8a0')
+sha256sums=('d09471c229206e268216828c1a2d2bb7a15fc26530e0cb67bfbdb8ba934e2b0e'
+ '8f5796a9dc725c627cc556fecd271f24f6a0a5c7fbc0a64df807cd4f3c6efa3a'
+ '64af3529c3ea466911ee89f4848019421716a53526ee74a534ed713ccc5625ba'
+ 'f80efa7827c89f30d0ce25df00e6bb0efdf0e8fe68e9ca15c7f15caea731ba33')
prepare() {
cd "${srcdir}/${_plugname}-${pkgver}"
patch -p1 -d "libnet++" -i "${srcdir}/libnetpp-boost-1.67-fix.patch"
+ patch -p1 -i "$srcdir/$pkgname-detach_thread.patch"
}
build() {
diff --git a/vdr-fritzbox-detach_thread.patch b/vdr-fritzbox-detach_thread.patch
new file mode 100644
index 000000000000..cf23d80507f1
--- /dev/null
+++ b/vdr-fritzbox-detach_thread.patch
@@ -0,0 +1,35 @@
+Index: vdr-plugin-fritzbox-1.5.3+git20200520-8-b56735f/libfritz++/Listener.cpp
+===================================================================
+--- vdr-plugin-fritzbox-1.5.3+git20200520-8-b56735f.orig/libfritz++/Listener.cpp 2020-08-31 12:35:17.529471966 +0200
++++ vdr-plugin-fritzbox-1.5.3+git20200520-8-b56735f/libfritz++/Listener.cpp 2020-08-31 12:35:17.525472037 +0200
+@@ -41,13 +41,17 @@
+ {
+ this->event = event;
+ thread = new std::thread(&Listener::run, this);
++ threadNativeHandle = thread->native_handle();
++ thread->detach();
+ }
+
+ Listener::~Listener()
+ {
+ if (thread) {
+ cancelThread();
+- thread->join();
++ int r = pthread_cancel(threadNativeHandle);
++ if (r != 0)
++ ERR(std::string{"could not cancel thread: "} + strerror(r));
+ delete thread;
+ }
+ }
+Index: vdr-plugin-fritzbox-1.5.3+git20200520-8-b56735f/libfritz++/Listener.h
+===================================================================
+--- vdr-plugin-fritzbox-1.5.3+git20200520-8-b56735f.orig/libfritz++/Listener.h 2020-08-31 12:35:17.529471966 +0200
++++ vdr-plugin-fritzbox-1.5.3+git20200520-8-b56735f/libfritz++/Listener.h 2020-08-31 12:35:17.525472037 +0200
+@@ -59,6 +59,7 @@
+ EventHandler *event;
+ std::vector<int> activeConnections;
+ std::thread *thread;
++ pthread_t threadNativeHandle;
+ network::TcpClient *tcpClientPtr = nullptr;
+ Listener(EventHandler *event);
+ void handleNewCall(bool outgoing, int connId, std::string remoteNumber, std::string localParty, std::string medium);