summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorgbr2020-04-27 03:32:10 -0300
committergbr2020-04-27 03:32:10 -0300
commitd2c9357c2103a509cfeb618726db1ada22289d67 (patch)
treeb95f7bd3ee8b54454ef8c1850a02d5907f311947
parent57ee8bee3591223736130c54f0543a93ae1ceec5 (diff)
downloadaur-d2c9357c2103a509cfeb618726db1ada22289d67.tar.gz
Compatibility fix for libnethogs 0.8.6
-rw-r--r--.SRCINFO4
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD15
-rw-r--r--nethogsmonitor_init.patch13
4 files changed, 32 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fb53ef98a62b..efdce6bbf017 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = gnethogs
pkgdesc = GTK front-end for nethogs
pkgver = 0.2
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/mbfoss/gnethogs
install = gnethogs.install
arch = x86_64
@@ -11,7 +11,9 @@ pkgbase = gnethogs
depends = nethogs
depends = gtkmm3
source = gnethogs-v0.2.tar.gz::https://github.com/mbfoss/gnethogs/archive/v0.2.tar.gz
+ source = nethogsmonitor_init.patch
sha1sums = 1a9f2eace9536745191836ad063cbd4bce12d117
+ sha1sums = SKIP
pkgname = gnethogs
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..0e3be6071f06
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+src/
+pkg/
+*.zst
+*.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
index b8d226483b10..92b815400dcc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: gbr <gbr@protonmail.com>
pkgname=gnethogs
pkgver=0.2
-pkgrel=1
+pkgrel=2
pkgdesc='GTK front-end for nethogs'
arch=('x86_64')
url='https://github.com/mbfoss/gnethogs'
@@ -14,10 +14,19 @@ makedepends=(
'intltool'
'libxml2'
)
-source=("${pkgname}-v${pkgver}.tar.gz::https://github.com/mbfoss/gnethogs/archive/v${pkgver}.tar.gz")
-sha1sums=('1a9f2eace9536745191836ad063cbd4bce12d117')
+source=("${pkgname}-v${pkgver}.tar.gz::https://github.com/mbfoss/gnethogs/archive/v${pkgver}.tar.gz"
+ "nethogsmonitor_init.patch"
+)
+sha1sums=('1a9f2eace9536745191836ad063cbd4bce12d117'
+ 'SKIP'
+)
install=gnethogs.install
+prepare() {
+ cd "${pkgname}-${pkgver}"
+ patch --forward --strip=1 --input="${srcdir}/nethogsmonitor_init.patch"
+}
+
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./autogen.sh
diff --git a/nethogsmonitor_init.patch b/nethogsmonitor_init.patch
new file mode 100644
index 000000000000..e472664033b1
--- /dev/null
+++ b/nethogsmonitor_init.patch
@@ -0,0 +1,13 @@
+diff --git a/src/main.cpp b/src/main.cpp
+index eca2f41..82d5783 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -15,7 +15,7 @@ static void onNethogsUpdate(int action, NethogsMonitorRecord const* update)
+
+ static void nethogsMonitorThreadProc()
+ {
+- const int status = nethogsmonitor_loop(&onNethogsUpdate);
++ const int status = nethogsmonitor_loop(&onNethogsUpdate, NULL, 100);
+ PendingUpdates::setNetHogsMonitorStatus(status);
+ }
+