diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | Use-reason_phrase-instead-of-get_phrase.patch | 51 |
3 files changed, 64 insertions, 7 deletions
@@ -1,14 +1,13 @@ pkgbase = tootle pkgdesc = GTK3 client for Mastodon pkgver = 1.0 - pkgrel = 3 + pkgrel = 4 url = https://github.com/bleakgrey/tootle arch = x86_64 arch = aarch64 license = GPL3 makedepends = cmake makedepends = desktop-file-utils - makedepends = git makedepends = gnome-common makedepends = gobject-introspection makedepends = hicolor-icon-theme @@ -27,7 +26,8 @@ pkgbase = tootle optdepends = noto-fonts-emoji: color emoji options = !libtool source = https://github.com/bleakgrey/tootle/archive/1.0.tar.gz + source = Use-reason_phrase-instead-of-get_phrase.patch sha256sums = e0a0a062b1b72010242f7bb4db97cd71190f23067188b5c07372264d768a0496 + sha256sums = 06314649f967661defaf5d847a9ecdf4b942299a08613c4f3087afa6ecf5d7fc pkgname = tootle - @@ -3,7 +3,7 @@ pkgname=tootle pkgver=1.0 _pkgver=${pkgver//_/-} -pkgrel=3 +pkgrel=4 pkgdesc="GTK3 client for Mastodon" arch=('x86_64' 'aarch64') url="https://github.com/bleakgrey/tootle" @@ -23,7 +23,6 @@ optdepends=( makedepends=( 'cmake' 'desktop-file-utils' - 'git' 'gnome-common' 'gobject-introspection' 'hicolor-icon-theme' @@ -34,11 +33,18 @@ makedepends=( 'yelp-tools' ) options=('!libtool') -source=("https://github.com/bleakgrey/$pkgname/archive/${_pkgver}.tar.gz") -sha256sums=('e0a0a062b1b72010242f7bb4db97cd71190f23067188b5c07372264d768a0496') +source=( + "https://github.com/bleakgrey/$pkgname/archive/${_pkgver}.tar.gz" + "Use-reason_phrase-instead-of-get_phrase.patch" +) +sha256sums=('e0a0a062b1b72010242f7bb4db97cd71190f23067188b5c07372264d768a0496' + '06314649f967661defaf5d847a9ecdf4b942299a08613c4f3087afa6ecf5d7fc') build() { cd "${srcdir}/${pkgname}-${_pkgver}" + + patch -p1 < "$startdir/Use-reason_phrase-instead-of-get_phrase.patch" + arch-meson build ninja -C build } diff --git a/Use-reason_phrase-instead-of-get_phrase.patch b/Use-reason_phrase-instead-of-get_phrase.patch new file mode 100644 index 000000000000..432bc4ca5ac4 --- /dev/null +++ b/Use-reason_phrase-instead-of-get_phrase.patch @@ -0,0 +1,51 @@ +From 858ee78fbebe161a4cdd707a469dc0f045211a51 Mon Sep 17 00:00:00 2001 +From: Max Harmathy <harmathy@mailbox.org> +Date: Wed, 25 Aug 2021 13:05:58 +0200 +Subject: [PATCH] Use reason_phrase instead of get_phrase + +--- + src/Services/Cache.vala | 2 +- + src/Services/Network.vala | 7 +------ + 2 files changed, 2 insertions(+), 7 deletions(-) + +diff --git a/src/Services/Cache.vala b/src/Services/Cache.vala +index 2251697..2ed314e 100644 +--- a/src/Services/Cache.vala ++++ b/src/Services/Cache.vala +@@ -88,7 +88,7 @@ public class Tootle.Cache : GLib.Object { + try { + var code = msg.status_code; + if (code != Soup.Status.OK) { +- var error = network.describe_error (code); ++ var error = msg.reason_phrase; + throw new Oopsie.INSTANCE (@"Server returned $error"); + } + +diff --git a/src/Services/Network.vala b/src/Services/Network.vala +index fa2839c..d0143b0 100644 +--- a/src/Services/Network.vala ++++ b/src/Services/Network.vala +@@ -56,7 +56,7 @@ public class Tootle.Network : GLib.Object { + else if (status == Soup.Status.CANCELLED) + debug ("Message is cancelled. Ignoring callback invocation."); + else +- ecb ((int32) status, describe_error ((int32) status)); ++ ecb ((int32) status, msg.reason_phrase); + }); + } + catch (Error e) { +@@ -65,11 +65,6 @@ public class Tootle.Network : GLib.Object { + } + } + +- public string describe_error (uint code) { +- var reason = Soup.Status.get_phrase (code); +- return @"$code: $reason"; +- } +- + public void on_error (int32 code, string message) { + warning (message); + app.toast (message); +-- +2.33.0 + |