From: "Yuan Liao" <liaoyuan@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: gnome-extra/extension-manager/files/, gnome-extra/extension-manager/
Date: Sat, 3 Jun 2023 18:01:54 +0000 (UTC) [thread overview]
Message-ID: <1685814010.eab57b2ecae661d7a5bab86bd0c7157d3dcbcbc3.liaoyuan@gentoo> (raw)
commit: eab57b2ecae661d7a5bab86bd0c7157d3dcbcbc3
Author: Yuan Liao <liaoyuan <AT> gmail <DOT> com>
AuthorDate: Sat Jun 3 17:40:10 2023 +0000
Commit: Yuan Liao <liaoyuan <AT> gmail <DOT> com>
CommitDate: Sat Jun 3 17:40:10 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=eab57b2e
gnome-extra/extension-manager: Add patch to remove libbacktrace dep
Signed-off-by: Yuan Liao <liaoyuan <AT> gmail.com>
...99.ebuild => extension-manager-0.4.1-r1.ebuild} | 10 +-
.../extension-manager-9999.ebuild | 10 +-
...er-0.4.1-exm-backtrace.c-include-stdint.h.patch | 31 +++++
...-manager-0.4.1-make-libbacktrace-optional.patch | 153 +++++++++++++++++++++
4 files changed, 202 insertions(+), 2 deletions(-)
diff --git a/gnome-extra/extension-manager/extension-manager-9999.ebuild b/gnome-extra/extension-manager/extension-manager-0.4.1-r1.ebuild
similarity index 88%
copy from gnome-extra/extension-manager/extension-manager-9999.ebuild
copy to gnome-extra/extension-manager/extension-manager-0.4.1-r1.ebuild
index 273d091d9..bed7abdeb 100644
--- a/gnome-extra/extension-manager/extension-manager-9999.ebuild
+++ b/gnome-extra/extension-manager/extension-manager-0.4.1-r1.ebuild
@@ -33,17 +33,25 @@ RDEPEND="
>=gui-libs/libadwaita-1.2.0:1[introspection]
gui-libs/text-engine
net-libs/libsoup:3.0
- sys-libs/libbacktrace
"
DEPEND="
${RDEPEND}
"
+PATCHES=(
+ "${FILESDIR}/${PN}-0.4.1-exm-backtrace.c-include-stdint.h.patch"
+ "${FILESDIR}/${PN}-0.4.1-make-libbacktrace-optional.patch"
+)
+
src_configure() {
local emesonargs=(
-Dpackage="ebuild"
-Ddistributor="Gentoo GURU <guru-bugs@gentoo.org>"
+
+ # 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
diff --git a/gnome-extra/extension-manager/extension-manager-9999.ebuild b/gnome-extra/extension-manager/extension-manager-9999.ebuild
index 273d091d9..bed7abdeb 100644
--- a/gnome-extra/extension-manager/extension-manager-9999.ebuild
+++ b/gnome-extra/extension-manager/extension-manager-9999.ebuild
@@ -33,17 +33,25 @@ RDEPEND="
>=gui-libs/libadwaita-1.2.0:1[introspection]
gui-libs/text-engine
net-libs/libsoup:3.0
- sys-libs/libbacktrace
"
DEPEND="
${RDEPEND}
"
+PATCHES=(
+ "${FILESDIR}/${PN}-0.4.1-exm-backtrace.c-include-stdint.h.patch"
+ "${FILESDIR}/${PN}-0.4.1-make-libbacktrace-optional.patch"
+)
+
src_configure() {
local emesonargs=(
-Dpackage="ebuild"
-Ddistributor="Gentoo GURU <guru-bugs@gentoo.org>"
+
+ # 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
diff --git a/gnome-extra/extension-manager/files/extension-manager-0.4.1-exm-backtrace.c-include-stdint.h.patch b/gnome-extra/extension-manager/files/extension-manager-0.4.1-exm-backtrace.c-include-stdint.h.patch
new file mode 100644
index 000000000..bc0e27b57
--- /dev/null
+++ b/gnome-extra/extension-manager/files/extension-manager-0.4.1-exm-backtrace.c-include-stdint.h.patch
@@ -0,0 +1,31 @@
+From 49186450ff33e4a75d966cee51bcb6446fae3639 Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Sat, 3 Jun 2023 09:59:11 -0700
+Subject: [PATCH 1/2] exm-backtrace.c: Explicitly include stdint.h for
+ uintptr_t usage
+
+The file uses type uintptr_t from stdint.h, which is indirectly included
+by backtrace.h. Even so, the file should unconditionally include
+stdint.h just in case backtrace.h no longer includes stdint.h in the
+future.
+
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ src/exm-backtrace.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/exm-backtrace.c b/src/exm-backtrace.c
+index 56b253a..4951394 100644
+--- a/src/exm-backtrace.c
++++ b/src/exm-backtrace.c
+@@ -21,6 +21,7 @@
+ #include "exm-backtrace.h"
+
+ #include <glib.h>
++#include <stdint.h>
+
+ #include <backtrace-supported.h>
+ #include <backtrace.h>
+--
+2.39.3
+
diff --git a/gnome-extra/extension-manager/files/extension-manager-0.4.1-make-libbacktrace-optional.patch b/gnome-extra/extension-manager/files/extension-manager-0.4.1-make-libbacktrace-optional.patch
new file mode 100644
index 000000000..66c1a20c0
--- /dev/null
+++ b/gnome-extra/extension-manager/files/extension-manager-0.4.1-make-libbacktrace-optional.patch
@@ -0,0 +1,153 @@
+From 6365d56e120c7522bc5a2ba515a3cd6efac1b184 Mon Sep 17 00:00:00 2001
+From: Yuan Liao <liaoyuan@gmail.com>
+Date: Sat, 3 Jun 2023 09:55:38 -0700
+Subject: [PATCH 2/2] Make libbacktrace an optional dependency
+
+Signed-off-by: Yuan Liao <liaoyuan@gmail.com>
+---
+ meson.build | 1 +
+ meson_options.txt | 5 +++++
+ src/exm-application.c | 2 ++
+ src/exm-backtrace.c | 17 +++++++++++++++++
+ src/meson.build | 9 ++++++---
+ 5 files changed, 31 insertions(+), 3 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 536cd97..d7b0eb5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -25,6 +25,7 @@ config_h.set_quoted('PKG_NAME', get_option('package'))
+ config_h.set_quoted('PKG_DISTRIBUTOR', get_option('distributor'))
+ config_h.set10('IS_OFFICIAL', get_option('official'))
+ config_h.set10('IS_DEVEL', get_option('development'))
++config_h.set10('WITH_BACKTRACE', get_option('backtrace'))
+ configure_file(
+ output: 'exm-config.h',
+ configuration: config_h,
+diff --git a/meson_options.txt b/meson_options.txt
+index b604dda..3f54b77 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -8,6 +8,11 @@ option('official',
+ value: false,
+ description: 'Whether this is an official upstream package')
+
++option('backtrace',
++ type: 'boolean',
++ value: true,
++ description: 'Whether the package is built with backtrace support')
++
+ # Will be shown in error messages
+ option('package',
+ type: 'string',
+diff --git a/src/exm-application.c b/src/exm-application.c
+index 5b56295..d062627 100644
+--- a/src/exm-application.c
++++ b/src/exm-application.c
+@@ -201,11 +201,13 @@ exm_application_show_about (GSimpleAction *action,
+ GTK_LICENSE_MPL_2_0,
+ NULL);
+
++#if WITH_BACKTRACE
+ adw_about_window_add_legal_section (ADW_ABOUT_WINDOW (about_window),
+ "libbacktrace",
+ "Copyright (C) 2012-2016 Free Software Foundation, Inc.",
+ GTK_LICENSE_BSD_3,
+ NULL);
++#endif
+
+ adw_about_window_add_legal_section (ADW_ABOUT_WINDOW (about_window),
+ "blueprint",
+diff --git a/src/exm-backtrace.c b/src/exm-backtrace.c
+index 4951394..3cf09b7 100644
+--- a/src/exm-backtrace.c
++++ b/src/exm-backtrace.c
+@@ -18,15 +18,21 @@
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
++#include "exm-config.h"
++
+ #include "exm-backtrace.h"
+
+ #include <glib.h>
+ #include <stdint.h>
+
++#if WITH_BACKTRACE
+ #include <backtrace-supported.h>
+ #include <backtrace.h>
++#endif
+
++#if WITH_BACKTRACE
+ static struct backtrace_state *state = NULL;
++#endif
+
+ static void
+ exm_backtrace_error_cb (void *data,
+@@ -54,6 +60,8 @@ exm_backtrace_full_cb (GString *string_builder,
+ void
+ exm_backtrace_init (char *filename)
+ {
++#if WITH_BACKTRACE
++
+ #ifdef BACKTRACE_SUPPORTED
+ state = backtrace_create_state (filename, 0,
+ exm_backtrace_error_cb,
+@@ -61,11 +69,16 @@ exm_backtrace_init (char *filename)
+ #else
+ g_warning ("Backtraces are not supported.\n");
+ #endif
++
++#else
++ g_warning ("Backtraces were not enabled at build time.\n");
++#endif
+ }
+
+ char *
+ exm_backtrace_print ()
+ {
++#if WITH_BACKTRACE
+ GString *string_builder;
+
+ if (!state)
+@@ -82,4 +95,8 @@ exm_backtrace_print ()
+ string_builder);
+
+ return g_string_free (string_builder, FALSE);
++#else
++ g_critical ("Backtraces were not enabled at build time.\n");
++ return NULL;
++#endif
+ }
+diff --git a/src/meson.build b/src/meson.build
+index 8599a8f..2adde2d 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -29,7 +29,7 @@ exm_sources = [
+ ]
+
+ cc = meson.get_compiler('c')
+-libbacktrace_dep = cc.find_library('backtrace', required: true)
++libbacktrace_dep = cc.find_library('backtrace', required: get_option('backtrace'))
+
+ exm_deps = [
+ dependency('gtk4'),
+@@ -37,10 +37,13 @@ exm_deps = [
+ dependency('gio-unix-2.0'),
+ dependency('json-glib-1.0'),
+ dependency('libsoup-3.0'),
+- dependency('text-engine-0.1'),
+- libbacktrace_dep
++ dependency('text-engine-0.1')
+ ]
+
++if libbacktrace_dep.found()
++ exm_deps += libbacktrace_dep
++endif
++
+ gnome = import('gnome')
+
+ subdir('local')
+--
+2.39.3
+
next reply other threads:[~2023-06-03 18:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-03 18:01 Yuan Liao [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-19 14:59 [gentoo-commits] repo/proj/guru:dev commit in: gnome-extra/extension-manager/files/, gnome-extra/extension-manager/ Yuan Liao
2024-04-29 18:23 Yuan Liao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1685814010.eab57b2ecae661d7a5bab86bd0c7157d3dcbcbc3.liaoyuan@gentoo \
--to=liaoyuan@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox