commit: b86cfc65f686d6994f3e93faa52735b20a800f6b
Author: Yuan Liao <liaoyuan <AT> gmail <DOT> com>
AuthorDate: Mon Apr 29 17:13:47 2024 +0000
Commit: Yuan Liao <liaoyuan <AT> gmail <DOT> com>
CommitDate: Mon Apr 29 18:22:45 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b86cfc65
gnome-extra/extension-manager: Add 0.5.1
Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com>
gnome-extra/extension-manager/Manifest | 1 +
.../extension-manager-0.5.1.ebuild | 87 ++++++++++++++++++++++
...ension-manager-0.5.1-frames_omitted_count.patch | 56 ++++++++++++++
3 files changed, 144 insertions(+)
diff --git a/gnome-extra/extension-manager/Manifest
b/gnome-extra/extension-manager/Manifest
index 214884f857..e33f88fc3e 100644
--- a/gnome-extra/extension-manager/Manifest
+++ b/gnome-extra/extension-manager/Manifest
@@ -1 +1,2 @@
DIST extension-manager-0.5.0.tar.gz 2246539 BLAKE2B
650033c0a61d7ee4b3b752c12d8474398990f86cdc66c02681c2a1255b4c3afb12db874e8591df6bb4749bf17f322cd20094b0cce35600f82fa6f2cf4ae3f752
SHA512
975f71c072b12358760439ab9254ed8967cfb9c9c8cd38e93d38db0fb8138e4911a7a63c924f8a62b46fbedc83246e156765f3be9e092096d8647d78a0e7717f
+DIST extension-manager-0.5.1.tar.gz 2248071 BLAKE2B
44fbd22961c462d1d3047e790e0054b77508476b927ae83b9677b7ad60df854287901c66a671c9c05d5a1f7857cf2f4dbad662604bed6322e8e02340880fa2d5
SHA512
7f5fc64adda0ea8c0d505c29d2a9037e565a42a66a2c151f5ed21267c715aa1738b94b075704fe4479961356a255c9aea450155b969a60cb78edf40ae448681f
diff --git a/gnome-extra/extension-manager/extension-manager-0.5.1.ebuild
b/gnome-extra/extension-manager/extension-manager-0.5.1.ebuild
new file mode 100644
index 0000000000..771c31ed39
--- /dev/null
+++ b/gnome-extra/extension-manager/extension-manager-0.5.1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit gnome2-utils meson xdg
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/mjakeman/extension-manager.git"
+else
+
SRC_URI="https://github.com/mjakeman/extension-manager/archive/v${PV}.tar.gz ->
${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+DESCRIPTION="A native tool for browsing, installing, and managing GNOME Shell
Extensions"
+HOMEPAGE="https://mattjakeman.com/apps/extension-manager"
+
+LICENSE="GPL-3+"
+SLOT="0"
+
+BDEPEND="
+ dev-libs/glib:2
+ dev-util/blueprint-compiler
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+RDEPEND="
+ dev-libs/glib:2
+ dev-libs/json-glib
+ gui-libs/gtk:4[introspection]
+ >=gui-libs/libadwaita-1.5.0:1[introspection]
+ gui-libs/text-engine
+ net-libs/libsoup:3.0
+"
+
+DEPEND="
+ ${RDEPEND}
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.5.1-frames_omitted_count.patch"
+)
+
+src_configure() {
+ local emesonargs=(
+ -Dpackage="ebuild"
+ -Ddistributor="Gentoo GURU <[email protected]>"
+
+ # sys-libs/libbacktrace has been last-rited in ::gentoo
+ # and is thus unavailable
+ -Dbacktrace=false
+ )
+ if has live ${PROPERTIES}; then
+ # Produce a development build for live ebuild
+ emesonargs+=( -Ddevelopment=true )
+ fi
+ meson_src_configure
+}
+
+# Tests are skipped because as of version 0.3.0, the tests only validate
+# resource files and do not verify any functionality of the program. Those
+# validations are either already handled by QA checks or not relevant on
+# Gentoo. For more information about the rationale, please refer to:
+#
https://github.com/gentoo/guru/commit/f896bee213fbb62c70e818c1bf503fee2a41919a#comments
+#
+# If tests are to be executed in the future because the upstream adds
+# functionality tests or for other reasons, and should there be no convenient
+# way to skip the validations, the following variable values need to be set:
+#
+# IUSE="test"
+# RESTRICT="!test? ( test )"
+# BDEPEND="test? ( dev-libs/appstream-glib dev-util/desktop-file-utils )"
+src_test() {
+ :
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+ gnome2_schemas_update
+}
+
+pkg_postrm() {
+ xdg_pkg_postrm
+ gnome2_schemas_update
+}
diff --git
a/gnome-extra/extension-manager/files/extension-manager-0.5.1-frames_omitted_count.patch
b/gnome-extra/extension-manager/files/extension-manager-0.5.1-frames_omitted_count.patch
new file mode 100644
index 0000000000..62b2e2f82b
--- /dev/null
+++
b/gnome-extra/extension-manager/files/extension-manager-0.5.1-frames_omitted_count.patch
@@ -0,0 +1,56 @@
+From f3768fb0227c714d7ed0613a28142613aa4a9c6b Mon Sep 17 00:00:00 2001
+From: Yuan Liao <[email protected]>
+Date: Mon, 29 Apr 2024 13:40:41 -0400
+Subject: [PATCH] backtrace: Define static functions only if `WITH_BACKTRACE`
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The static functions are internal to file exm-backtrace.c and are only
+used to facilitate backtrace collection. In build configurations with
+backtraces disabled ('meson setup -Dbacktrace=false'),
+exm_backtrace_print() will not call the static functions, so they are
+unused and thus need not be defined.
+
+Previously, due to how the preprocessor macros were arranged, the static
+variables in this file would not be defined when backtraces are
+disabled; if any static functions use them, then builds with backtraces
+disabled would fail due to a compiler error like:
+
+ ../extension-manager-0.5.1/src/exm-backtrace.c: In function
‘exm_backtrace_full_cb’:
+ ../extension-manager-0.5.1/src/exm-backtrace.c:58:9: error:
‘frames_omitted_count’ undeclared (first use in this function)
+ 58 | frames_omitted_count++;
+ |
+
+This commit fixes such errors when backtraces are disabled.
+
+Fixes: dcc312e (Make libbacktrace an optional dependency, 2023-06-03)
+Fixes: d63d301 (backtrace: Collate 'null' messages, 2024-04-01)
+Signed-off-by: Yuan Liao <[email protected]>
+---
+ src/exm-backtrace.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/exm-backtrace.c b/src/exm-backtrace.c
+index b6c3ae3..e7a449a 100644
+--- a/src/exm-backtrace.c
++++ b/src/exm-backtrace.c
+@@ -33,7 +33,6 @@
+ #if WITH_BACKTRACE
+ static struct backtrace_state *state = NULL;
+ static int frames_omitted_count = 0;
+-#endif
+
+ static void
+ exm_backtrace_error_cb (void *data,
+@@ -71,6 +70,7 @@ exm_backtrace_full_cb (GString *string_builder,
+
+ return 0;
+ }
++#endif
+
+ void
+ exm_backtrace_init (char *filename)
+--
+2.43.2
+