mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
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>
This commit is contained in:
committed by
Arsen Arsenović
parent
fecf67e319
commit
6f017cdc71
89
dev-scheme/guile-gi/files/guile-gi-0.3.2-function-cast.patch
Normal file
89
dev-scheme/guile-gi/files/guile-gi-0.3.2-function-cast.patch
Normal file
@@ -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
|
||||
|
||||
64
dev-scheme/guile-gi/guile-gi-0.3.2-r100.ebuild
Normal file
64
dev-scheme/guile-gi/guile-gi-0.3.2-r100.ebuild
Normal file
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user