extension-manager: update to 0.5.1

This commit is contained in:
chrysos349 2024-03-20 16:54:06 +03:00 committed by classabbyamp
parent f1ab36d5c2
commit bf16ead8bf
2 changed files with 56 additions and 3 deletions

View File

@ -0,0 +1,53 @@
From f3768fb0227c714d7ed0613a28142613aa4a9c6b Mon Sep 17 00:00:00 2001
From: Yuan Liao <liaoyuan@gmail.com>
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 <liaoyuan@gmail.com>
---
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 b6c3ae35..e7a449a8 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)

View File

@ -1,6 +1,6 @@
# Template file for 'extension-manager'
pkgname=extension-manager
version=0.4.3
version=0.5.1
revision=1
build_style=meson
configure_args="-Dbacktrace=false"
@ -11,9 +11,9 @@ short_desc="Utility for browsing and installing GNOME Shell Extensions"
maintainer="chrysos349 <chrysostom349@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://github.com/mjakeman/extension-manager"
changelog="https://raw.githubusercontent.com/mjakeman/extension-manager/master/NEWS"
changelog="https://github.com/mjakeman/extension-manager/releases"
distfiles="https://github.com/mjakeman/extension-manager/archive/v${version}.tar.gz"
checksum=0dff375888c68103dc1a48d0691c34e2bad9670d2d4050a1088f51c04342b956
checksum=b4cd95cbf45a3d046858fb44e78f3e3147a24279e77bfbbe8a422920f20a7b3b
pre_build() {
if [ "$CROSS_BUILD" ]; then