summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-rw-r--r--pcr/tootle/PKGBUILD18
-rw-r--r--pcr/tootle/handle-unknown-message-types.patch56
2 files changed, 69 insertions, 5 deletions
diff --git a/pcr/tootle/PKGBUILD b/pcr/tootle/PKGBUILD
index 446dafe7e..f075e5af3 100644
--- a/pcr/tootle/PKGBUILD
+++ b/pcr/tootle/PKGBUILD
@@ -7,7 +7,7 @@
pkgname=tootle
pkgver=0.2.0
-pkgrel=1
+pkgrel=2
pkgdesc="GTK3 client for Mastodon federated services"
arch=('armv7h' 'x86_64' 'i686')
url=https://github.com/bleakgrey/tootle
@@ -17,12 +17,14 @@ depends=('glib2' 'gtk3' 'hicolor-icon-theme' 'libsoup' 'granite' 'json-glib')
optdepends=('noto-fonts-emoji: color emoji')
makedepends=('git' 'desktop-file-utils' 'hicolor-icon-theme' 'intltool' 'yelp-tools' 'gnome-common' 'gobject-introspection' 'meson' 'ninja' 'vala')
options=('!libtool')
-source=(https://github.com/bleakgrey/${pkgname}/archive/${pkgver}.tar.gz \
- fix-build-on-vala-46.patch \
- tootle-horn-16.png tootle-horn-24.png tootle-horn-32.png tootle-horn-48.png \
- tootle-horn-64.png tootle-horn-128.png tootle-horn-grey-128.png )
+source=(https://github.com/bleakgrey/${pkgname}/archive/${pkgver}.tar.gz
+ fix-build-on-vala-46.patch
+ handle-unknown-message-types.patch
+ tootle-horn-16.png tootle-horn-24.png tootle-horn-32.png tootle-horn-48.png
+ tootle-horn-64.png tootle-horn-128.png tootle-horn-grey-128.png)
sha256sums=('e83c4a0539bf7b4b9d2b81d036ee0e8a69564b11c70f77ded5091955a89d2737'
'5158d1e2019eaf6f4fa043b8483f8dfa049335d572a2563a0d4f71f799cae2b0'
+ '6f28fe4169d5f596e3574fa717cc07c709659c653f6fee56fdfe370aa02d55c5'
'd0f5575de5c73afc5b0db9c91c45762f4eb948b36b756bf45f5116cde91b42a8'
'6c3533b2e795d478047d3df477109c85aaa8aa1389db42341ec770823d595502'
'516b0358b6e9806c812331a8819567519cf54131566ca1450c251eced401eb11'
@@ -36,6 +38,12 @@ prepare()
cd "${srcdir}/${pkgname}-${pkgver}"
patch -p1 < ../fix-build-on-vala-46.patch
+ # FIXME: the program will crash if it gets any message of an unknown type
+ # there is a fix for this on the upstream master branch
+ # but it can not be back-ported onto release 0.2.0
+ # this patch is adapted from a rejected merge request:
+ # https://github.com/bleakgrey/tootle/pull/143
+ patch -p1 < ../handle-unknown-message-types.patch
sed -i "s|'\.svg'|'\.png'|" data/meson.build
for dims in 16 24 32 48 64 128
diff --git a/pcr/tootle/handle-unknown-message-types.patch b/pcr/tootle/handle-unknown-message-types.patch
new file mode 100644
index 000000000..4653b2675
--- /dev/null
+++ b/pcr/tootle/handle-unknown-message-types.patch
@@ -0,0 +1,56 @@
+diff --git a/src/API/NotificationType.vala b/src/API/NotificationType.vala
+index 53598b5..25c2b2c 100644
+--- a/src/API/NotificationType.vala
++++ b/src/API/NotificationType.vala
+@@ -4,7 +4,8 @@ public enum Tootle.NotificationType {
+ FAVORITE,
+ FOLLOW,
+ FOLLOW_REQUEST, // Internal
+- WATCHLIST; // Internal
++ WATCHLIST, // Internal
++ UNKNOWN; // Fallback
+
+ public string to_string() {
+ switch (this) {
+@@ -20,8 +21,9 @@ public enum Tootle.NotificationType {
+ return "follow_request";
+ case WATCHLIST:
+ return "watchlist";
++ case UNKNOWN:
+ default:
+- assert_not_reached();
++ return "unknown";
+ }
+ }
+
+@@ -39,8 +41,9 @@ public enum Tootle.NotificationType {
+ return FOLLOW_REQUEST;
+ case "watchlist":
+ return WATCHLIST;
++ case "unknown":
+ default:
+- assert_not_reached();
++ return UNKNOWN;
+ }
+ }
+
+@@ -58,6 +61,8 @@ public enum Tootle.NotificationType {
+ return _("<a href=\"%s\"><b>%s</b></a> wants to follow you").printf (account.url, account.display_name);
+ case WATCHLIST:
+ return _("<a href=\"%s\"><b>%s</b></a> posted a toot").printf (account.url, account.display_name);
++ case UNKNOWN:
++ return _("<a href=\"%s\"><b>%s</b></a> posted an unrecognized type of message").printf (account.url, account.display_name);
+ default:
+ assert_not_reached();
+ }
+@@ -75,8 +80,9 @@ public enum Tootle.NotificationType {
+ case FOLLOW:
+ case FOLLOW_REQUEST:
+ return "contact-new-symbolic";
++ case UNKNOWN:
+ default:
+- assert_not_reached();
++ return "dialog-warning";
+ }
+ }
+