From 270f038c1f61a7d201e65ba2fd60a6844111812b Mon Sep 17 00:00:00 2001 From: Ryan Fox Date: Sat, 30 Sep 2023 21:33:38 -0700 Subject: [PATCH] net-misc/tuba: add 0.5.0 --- net-misc/tuba/Manifest | 1 + net-misc/tuba/files/tuba-0.5.0-fixes.patch | 32 ++++++++++++ net-misc/tuba/tuba-0.5.0.ebuild | 58 ++++++++++++++++++++++ net-misc/tuba/tuba-9999.ebuild | 6 +-- 4 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 net-misc/tuba/files/tuba-0.5.0-fixes.patch create mode 100644 net-misc/tuba/tuba-0.5.0.ebuild diff --git a/net-misc/tuba/Manifest b/net-misc/tuba/Manifest index f9011d6..2e8b131 100644 --- a/net-misc/tuba/Manifest +++ b/net-misc/tuba/Manifest @@ -1,2 +1,3 @@ DIST tuba-0.4.0.tar.gz 434483 BLAKE2B a7606c99524cd3e555aca38ef94f343a36e928f8e8fd46811bdbe60feb1385363c53c7f57aebc0710f89e234e0238d01912d24e8c8f167ded8d5ef386e08d405 SHA512 d3612d988605d3c2d20249a091e0b2580aaf6a7c289646f23c6aac9552b9466d8a32621498d8c8f77509bd932326304f4f9657d1a2c7d3ed538cc7e40efa96ce DIST tuba-0.4.1.tar.gz 439861 BLAKE2B bed75b909ec9c31c53c1c46973011b8396b5e4af976aa5277a1457abd1e51d5e4a13a639632ab9ed5d67339351a99d2e9a8598a04a35b08a5b27de05d6f5c01c SHA512 7804e06a29d18e1fdf88aa4e8237a8fd8c8eccaa668ec9b2057a84a9f17c855b2c378c3ffe354e157fdeb8c392128ddaf6faf92687b67319d7cc3371e4d885ab +DIST tuba-0.5.0.tar.gz 499037 BLAKE2B 182997192b31e643acf92fbd2319e444a3491d01e53f7d365ed6b89abe08523060ed88e2013c1ba3d2f91c8a12381ff3c07e33cc8b57c9e7033df06abb01352d SHA512 4e0a97600c8aef60527f71f84f91e3226ff7dcc9efc7720f8a88cdbbeae327b51a64a4f34bacdf36235b63cbc612fbd102df9c885933b3d118d05f4a99f52be3 diff --git a/net-misc/tuba/files/tuba-0.5.0-fixes.patch b/net-misc/tuba/files/tuba-0.5.0-fixes.patch new file mode 100644 index 0000000..dd0631e --- /dev/null +++ b/net-misc/tuba/files/tuba-0.5.0-fixes.patch @@ -0,0 +1,32 @@ +diff --git a/src/Views/TabbedBase.vala b/src/Views/TabbedBase.vala +index 6a36a8c..8b752a7 100644 +--- a/src/Views/TabbedBase.vala ++++ b/src/Views/TabbedBase.vala +@@ -157,6 +157,7 @@ public class Tuba.Views.TabbedBase : Views.Base { + if (view.content_box.has_css_class ("no-transition")) { + Timeout.add_once (200, () => { + last_view.content_box.remove_css_class ("no-transition"); ++ return true; + }); + } + +diff --git a/src/Widgets/VoteBox.vala b/src/Widgets/VoteBox.vala +index b996f9f..abc3b9c 100644 +--- a/src/Widgets/VoteBox.vala ++++ b/src/Widgets/VoteBox.vala +@@ -73,15 +73,11 @@ public class Tuba.Widgets.VoteBox : Gtk.Box { + var percentage = poll.votes_count > 0 ? ((double)p.votes_count / poll.votes_count) * 100 : 0.0; + + var provider = new Gtk.CssProvider (); +- #if GTK_4_12 +- provider.load_from_string (generate_css_style ((int) percentage)); +- #else + #if VALAC_05611 + provider.load_from_data (generate_css_style ((int) percentage), -1); + #else + provider.load_from_data (generate_css_style ((int) percentage).data); + #endif +- #endif + + row.get_style_context ().add_provider (provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); + row.add_css_class (@"ttl-poll-$((int) percentage)"); diff --git a/net-misc/tuba/tuba-0.5.0.ebuild b/net-misc/tuba/tuba-0.5.0.ebuild new file mode 100644 index 0000000..a92ed18 --- /dev/null +++ b/net-misc/tuba/tuba-0.5.0.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit gnome2-utils meson vala xdg + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/GeopJr/Tuba.git" +else + MY_PN="Tuba" + MY_P="${MY_PN}-${PV}" + S="${WORKDIR}/${MY_P}" + SRC_URI="https://github.com/GeopJr/Tuba/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +DESCRIPTION="Mastodon client, previously known as Tooth" +HOMEPAGE="https://tuba.geopjr.dev/" +LICENSE="CC-BY-3.0 GPL-3+" +SLOT="0" + +DEPEND=" + >=app-crypt/libsecret-0.20 + >=dev-libs/glib-2.76.0 + >=dev-libs/json-glib-1.4.4 + >=dev-libs/libxml2-2.9.10 + >=dev-libs/libgee-0.8.5 + >=gui-libs/gtk-4.11.3:4 + >=gui-libs/libadwaita-1.4 + >=net-libs/libsoup-3 + gui-libs/gtksourceview:5 +" +RDEPEND="${DEPEND}" +BDEPEND=" + $(vala_depend) + virtual/pkgconfig +" + +PATCHES=( "${FILESDIR}/${P}-fixes.patch" ) + +VALA_MIN_API_VERSION=0.48 + +src_prepare() { + default + vala_setup +} + +pkg_postinst() { + gnome2_schemas_update + xdg_pkg_postinst +} + +pkg_postrm() { + gnome2_schemas_update + xdg_pkg_postrm +} diff --git a/net-misc/tuba/tuba-9999.ebuild b/net-misc/tuba/tuba-9999.ebuild index 62b53dc..4665b30 100644 --- a/net-misc/tuba/tuba-9999.ebuild +++ b/net-misc/tuba/tuba-9999.ebuild @@ -23,12 +23,12 @@ SLOT="0" DEPEND=" >=app-crypt/libsecret-0.20 - >=dev-libs/glib-2.71.2 + >=dev-libs/glib-2.76.0 >=dev-libs/json-glib-1.4.4 >=dev-libs/libxml2-2.9.10 >=dev-libs/libgee-0.8.5 - >=gui-libs/gtk-4.3:4 - >=gui-libs/libadwaita-1.2 + >=gui-libs/gtk-4.11.3:4 + >=gui-libs/libadwaita-1.4 >=net-libs/libsoup-3 gui-libs/gtksourceview:5 "