diff options
author | Alfred Wingate <parona@protonmail.com> | 2024-08-27 18:49:27 +0300 |
---|---|---|
committer | Arsen Arsenović <arsen@gentoo.org> | 2024-09-18 15:06:42 +0200 |
commit | 6f017cdc716e776d5608cccc4242e2bc92a88665 (patch) | |
tree | cb11ec48657583b920852a922045d7b8a5ec1bc4 /dev-scheme | |
parent | x11-misc/xbindkeys: switch to new guile mechanism (diff) | |
download | gentoo-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>
Diffstat (limited to 'dev-scheme')
-rw-r--r-- | dev-scheme/guile-gi/files/guile-gi-0.3.2-function-cast.patch | 89 | ||||
-rw-r--r-- | dev-scheme/guile-gi/guile-gi-0.3.2-r100.ebuild | 64 |
2 files changed, 153 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 +} |