summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred Wingate <parona@protonmail.com>2024-08-27 18:49:27 +0300
committerArsen Arsenović <arsen@gentoo.org>2024-09-18 15:06:42 +0200
commit6f017cdc716e776d5608cccc4242e2bc92a88665 (patch)
treecb11ec48657583b920852a922045d7b8a5ec1bc4
parentx11-misc/xbindkeys: switch to new guile mechanism (diff)
downloadgentoo-6f017cdc716e776d5608cccc4242e2bc92a88665.tar.gz
gentoo-6f017cdc716e776d5608cccc4242e2bc92a88665.tar.bz2
gentoo-6f017cdc716e776d5608cccc4242e2bc92a88665.zip
dev-scheme/guile-gi: switch to new guile mechanism
Bug: https://bugs.gentoo.org/880955 Signed-off-by: Alfred Wingate <parona@protonmail.com> Signed-off-by: Arsen Arsenović <arsen@gentoo.org>
-rw-r--r--dev-scheme/guile-gi/files/guile-gi-0.3.2-function-cast.patch89
-rw-r--r--dev-scheme/guile-gi/guile-gi-0.3.2-r100.ebuild64
-rw-r--r--profiles/package.mask1
3 files changed, 154 insertions, 0 deletions
diff --git a/dev-scheme/guile-gi/files/guile-gi-0.3.2-function-cast.patch b/dev-scheme/guile-gi/files/guile-gi-0.3.2-function-cast.patch
new file mode 100644
index 000000000000..74d325bf7c20
--- /dev/null
+++ b/dev-scheme/guile-gi/files/guile-gi-0.3.2-function-cast.patch
@@ -0,0 +1,89 @@
+https://bugs.gentoo.org/880955
+
+Based on https://github.com/spk121/guile-gi/commit/94144d0beffa96bf62c03bc71b498b94dafacc46
+
+--- a/src/gig_callback.c
++++ b/src/gig_callback.c
+@@ -296,6 +296,12 @@ callback_binding_inner(struct callback_binding_args *args)
+ return (void *)1;
+ }
+
++inline static void *
++callback_binding_inner_v(void *args)
++{
++ return callback_binding_inner(args);
++}
++
+ void
+ callback_binding(ffi_cif *cif, gpointer ret, gpointer *ffi_args, gpointer user_data)
+ {
+@@ -314,7 +320,7 @@ callback_binding(ffi_cif *cif, gpointer ret, gpointer *ffi_args, gpointer user_d
+ if (scm_is_true(scm_fluid_ref(gig_callback_thread_fluid)))
+ callback_binding_inner(&args);
+ else {
+- if (NULL == scm_with_guile(callback_binding_inner, &args))
++ if (NULL == scm_with_guile(callback_binding_inner_v, &args))
+ scm_c_eval_string("(quit EXIT_FAILURE)");
+ }
+ }
+@@ -365,6 +371,12 @@ c_callback_binding_inner(struct callback_binding_args *args)
+ return (void *)1;
+ }
+
++inline static void *
++c_callback_binding_inner_v(void *args)
++{
++ return c_callback_binding_inner(args);
++}
++
+ void
+ c_callback_binding(ffi_cif *cif, gpointer ret, gpointer *ffi_args, gpointer user_data)
+ {
+@@ -383,7 +395,7 @@ c_callback_binding(ffi_cif *cif, gpointer ret, gpointer *ffi_args, gpointer user
+ if (scm_is_true(scm_fluid_ref(gig_callback_thread_fluid)))
+ c_callback_binding_inner(&args);
+ else {
+- if (NULL == scm_with_guile(c_callback_binding_inner, &args))
++ if (NULL == scm_with_guile(c_callback_binding_inner_v, &args))
+ scm_c_eval_string("(quit EXIT_FAILURE)");
+ }
+ }
+@@ -692,10 +704,16 @@ callback_free(GigCallback *gcb)
+ g_free(gcb);
+ }
+
++inline static void
++callback_free_v(void *gcb)
++{
++ callback_free(gcb);
++}
++
+ static void
+ gig_fini_callback(void)
+ {
+ g_debug("Freeing callbacks");
+- g_slist_free_full(callback_list, (GDestroyNotify)callback_free);
++ g_slist_free_full(callback_list, (GDestroyNotify)callback_free_v);
+ callback_list = NULL;
+ }
+--- a/src/gig_type_private.c
++++ b/src/gig_type_private.c
+@@ -59,8 +59,14 @@ _boxed_funcs_free(GigBoxedFuncs *funcs)
+ g_free(funcs);
+ }
+
++inline static void
++_boxed_funcs_free_v(void *funcs)
++{
++ _boxed_funcs_free(funcs);
++}
++
+ void
+ _free_boxed_funcs()
+ {
+- g_slist_free_full(_boxed_funcs, (GDestroyNotify)_boxed_funcs_free);
++ g_slist_free_full(_boxed_funcs, (GDestroyNotify)_boxed_funcs_free_v);
+ }
+--
+2.46.0
+
diff --git a/dev-scheme/guile-gi/guile-gi-0.3.2-r100.ebuild b/dev-scheme/guile-gi/guile-gi-0.3.2-r100.ebuild
new file mode 100644
index 000000000000..1d232ddf9d51
--- /dev/null
+++ b/dev-scheme/guile-gi/guile-gi-0.3.2-r100.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+GUILE_COMPAT=( 2-2 3-0 )
+inherit virtualx autotools guile
+
+DESCRIPTION="Bindings for GObject Introspection and libgirepository for Guile"
+HOMEPAGE="https://spk121.github.io/guile-gi/"
+
+if [[ "${PV}" == *9999* ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/spk121/${PN}.git"
+else
+ SRC_URI="https://github.com/spk121/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+
+REQUIRED_USED="${GUILE_REQUIRED_USE}"
+
+DEPEND="
+ ${GUILE_DEPS}
+ dev-libs/gobject-introspection
+ x11-libs/gtk+:3[introspection]
+"
+RDEPEND="${DEPEND}"
+BDEPEND="sys-apps/texinfo"
+
+PATCHES=(
+ "${FILESDIR}"/guile-gi-0.3.2-function-cast.patch
+)
+
+src_prepare() {
+ guile_src_prepare
+
+ eautoreconf
+}
+
+src_configure() {
+ guile_foreach_impl econf --enable-introspection=yes
+}
+
+src_compile() {
+ my_compile() {
+ mkdir test || die
+ default
+ }
+ guile_foreach_impl my_compile
+}
+
+src_test() {
+ guile_foreach_impl virtx default
+}
+
+src_install() {
+ guile_src_install
+
+ mv "${ED}"/usr/share/doc/${PN} "${ED}"/usr/share/doc/${PF} || die
+ find "${ED}" -type f -name '*.la' -delete || die
+}
diff --git a/profiles/package.mask b/profiles/package.mask
index e80f0e0496fa..088d7d1deec8 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -396,6 +396,7 @@ dev-scheme/guile:3.0
>=sys-devel/autogen-5.18.16-r100
>=www-client/elinks-0.16.1.1-r100
>=x11-misc/xbindkeys-1.8.7-r100
+>=dev-scheme/guile-gi-0.3.2-r100
# Eli Schwartz <eschwartz@gentoo.org> (2024-08-15)
# Abandoned upstream since 2011, unmaintained in gentoo since 2017. Tons of