summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--Adhere-to-GLib.Object-naming-conventions.patch69
-rw-r--r--PKGBUILD7
3 files changed, 77 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f227f1a8bd8c..8c6ef642daeb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = tootle
pkgdesc = GTK3 client for Mastodon
pkgver = 1.0
- pkgrel = 4
+ pkgrel = 5
url = https://github.com/bleakgrey/tootle
arch = x86_64
arch = aarch64
@@ -27,7 +27,9 @@ pkgbase = tootle
options = !libtool
source = https://github.com/bleakgrey/tootle/archive/1.0.tar.gz
source = Use-reason_phrase-instead-of-get_phrase.patch
+ source = Adhere-to-GLib.Object-naming-conventions.patch
sha256sums = e0a0a062b1b72010242f7bb4db97cd71190f23067188b5c07372264d768a0496
sha256sums = 06314649f967661defaf5d847a9ecdf4b942299a08613c4f3087afa6ecf5d7fc
+ sha256sums = 84962b788787c075fadaf2fe4e56f104340b6f1386c889df03455a67fcc5f779
pkgname = tootle
diff --git a/Adhere-to-GLib.Object-naming-conventions.patch b/Adhere-to-GLib.Object-naming-conventions.patch
new file mode 100644
index 000000000000..6c48de830e20
--- /dev/null
+++ b/Adhere-to-GLib.Object-naming-conventions.patch
@@ -0,0 +1,69 @@
+From da4bcf5afa1df36fb5c6cb2dc175600911252d9b Mon Sep 17 00:00:00 2001
+From: Clayton Craft <clayton@craftyguy.net>
+Date: Tue, 26 Oct 2021 15:03:25 -0700
+Subject: [PATCH] Adhere to GLib.Object naming conventions for properties
+
+Vala now validates property names against GLib.Object conventions, this
+fixes a compilation error as a result of this enforcement:
+
+../src/API/Status.vala:27.5-27.23: error: Name `_url' is not valid for a GLib.Object property
+ public string? _url { get; set; }
+ ^^^^^^^^^^^^^^^^^^^
+
+Relevant Vala change:
+https://gitlab.gnome.org/GNOME/vala/-/commit/38d61fbff037687ea4772e6df85c7e22a74b335e
+
+fixes #337
+
+Signed-off-by: Clayton Craft <clayton@craftyguy.net>
+---
+ src/API/Attachment.vala | 6 +++---
+ src/API/Status.vala | 8 ++++----
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/API/Attachment.vala b/src/API/Attachment.vala
+index 5c66e79..3749bd7 100644
+--- a/src/API/Attachment.vala
++++ b/src/API/Attachment.vala
+@@ -32,10 +32,10 @@ public class Tootle.API.Attachment : Entity {
+ public string kind { get; set; }
+ public string url { get; set; }
+ public string? description { get; set; }
+- public string? _preview_url { get; set; }
++ private string? t_preview_url { get; set; }
+ public string? preview_url {
+- set { this._preview_url = value; }
+- get { return (this._preview_url == null || this._preview_url == "") ? url : _preview_url; }
++ set { this.t_preview_url = value; }
++ get { return (this.t_preview_url == null || this.t_preview_url == "") ? url : t_preview_url; }
+ }
+
+ public static Attachment from (Json.Node node) throws Error {
+diff --git a/src/API/Status.vala b/src/API/Status.vala
+index 4de9b9d..7ebb2e5 100644
+--- a/src/API/Status.vala
++++ b/src/API/Status.vala
+@@ -24,16 +24,16 @@ public class Tootle.API.Status : Entity, Widgetizable {
+ public ArrayList<API.Mention>? mentions { get; set; default = null; }
+ public ArrayList<API.Attachment>? media_attachments { get; set; default = null; }
+
+- public string? _url { get; set; }
++ private string? t_url { get; set; }
+ public string url {
+ owned get { return this.get_modified_url (); }
+- set { this._url = value; }
++ set { this.t_url = value; }
+ }
+ string get_modified_url () {
+- if (this._url == null) {
++ if (this.t_url == null) {
+ return this.uri.replace ("/activity", "");
+ }
+- return this._url;
++ return this.t_url;
+ }
+
+ public Status formal {
+--
+2.33.1
+
diff --git a/PKGBUILD b/PKGBUILD
index 68cb7d130afa..7af8eeaf61cf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=tootle
pkgver=1.0
_pkgver=${pkgver//_/-}
-pkgrel=4
+pkgrel=5
pkgdesc="GTK3 client for Mastodon"
arch=('x86_64' 'aarch64')
url="https://github.com/bleakgrey/tootle"
@@ -36,14 +36,17 @@ options=('!libtool')
source=(
"https://github.com/bleakgrey/$pkgname/archive/${_pkgver}.tar.gz"
"Use-reason_phrase-instead-of-get_phrase.patch"
+ "Adhere-to-GLib.Object-naming-conventions.patch"
)
sha256sums=('e0a0a062b1b72010242f7bb4db97cd71190f23067188b5c07372264d768a0496'
- '06314649f967661defaf5d847a9ecdf4b942299a08613c4f3087afa6ecf5d7fc')
+ '06314649f967661defaf5d847a9ecdf4b942299a08613c4f3087afa6ecf5d7fc'
+ '84962b788787c075fadaf2fe4e56f104340b6f1386c889df03455a67fcc5f779')
build() {
cd "${srcdir}/${pkgname}-${_pkgver}"
patch -p1 < "$startdir/Use-reason_phrase-instead-of-get_phrase.patch"
+ patch -p1 < "$startdir/Adhere-to-GLib.Object-naming-conventions.patch"
arch-meson build
ninja -C build