From bb125f9d08e2ab0b58c3c77daef2fbedf0463e77 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 19 Mar 2022 14:32:52 +0100 Subject: [PATCH] - added guile3 patch, release 5 --- g-wrap-guile3.patch | 71 +++++++++++++++++++++++++++++++++++++++++++++ g-wrap.spec | 4 ++- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 g-wrap-guile3.patch diff --git a/g-wrap-guile3.patch b/g-wrap-guile3.patch new file mode 100644 index 0000000..eb46c4c --- /dev/null +++ b/g-wrap-guile3.patch @@ -0,0 +1,71 @@ +--- g-wrap-1.9.15/configure.ac.orig 2015-07-21 01:23:34.000000000 +0200 ++++ g-wrap-1.9.15/configure.ac 2022-03-19 09:47:32.034820854 +0100 +@@ -78,7 +78,7 @@ AC_DEFINE_UNQUOTED(ffi_type_ssize_t, ffi + [ffi type for ssize_t]) + + dnl Guile +-GUILE_PKG([2.2 2.0]) ++GUILE_PKG([3.0 2.2 2.0]) + GUILE_PROGS + GUILE_FLAGS + GUILE_VERSION="`guile-config info guileversion | sed -r 's,\\.[[0-9]]+$,,'`" +--- g-wrap-1.9.15/guile/g-wrap/guile-runtime.c.orig 2014-09-22 06:42:47.000000000 +0200 ++++ g-wrap-1.9.15/guile/g-wrap/guile-runtime.c 2022-03-19 14:09:17.473070527 +0100 +@@ -179,14 +179,14 @@ gw_guile_add_subr_method (SCM generic, S + SCM var = scm_module_lookup (module, class_name); + specializers = scm_cons (SCM_VARIABLE_REF (var), specializers); + } else { +- specializers = scm_cons (scm_class_top, specializers); ++ specializers = scm_cons (scm_variable_ref (scm_c_lookup ("")), specializers); + } + all_specializers = SCM_CDR (all_specializers); + } + specializers = scm_reverse (specializers); + + if (use_optional_args) +- specializers = scm_append_x (scm_list_2 (specializers, scm_class_top)); ++ specializers = scm_append_x (scm_list_2 (specializers, scm_variable_ref (scm_c_lookup ("")))); + + formals = SCM_EOL; + for (i = n_req_args; i > 0; i--) +@@ -222,7 +222,7 @@ gw_guile_add_subr_method (SCM generic, S + #endif + + meth = scm_apply_0 (SCM_VARIABLE_REF (var_make), +- scm_list_5 (scm_class_method, ++ scm_list_5 (scm_variable_ref (scm_c_lookup ("")), + k_specializers, specializers, + k_procedure, procm)); + scm_call_2 (SCM_VARIABLE_REF (var_add_method_x), generic, meth); +@@ -352,10 +352,10 @@ allocate_generic_variable (SCM module, S + if (scm_is_false (var)) { + /* Symbol unbound, make a new generic */ + generic = scm_apply_0 (SCM_VARIABLE_REF (var_make), +- scm_list_3 (scm_class_generic, k_name, sym)); ++ scm_list_3 (scm_variable_ref (scm_c_lookup("")), k_name, sym)); + return scm_make_variable (generic); + } else if (scm_is_true (scm_call_2 (is_a_p_proc, scm_variable_ref (var), +- scm_class_generic))) { ++ (scm_variable_ref (scm_c_lookup("")))))) { + /* I seem to remember theq is_a_p thing is a hack around GOOPS's deficient + macros, but I don't remember. Anyway the existing binding is a generic, + let's use it */ +@@ -364,7 +364,7 @@ allocate_generic_variable (SCM module, S + /* Make a generic that falls back on the original binding. NB: generics also + satisfy procedure?. */ + generic = scm_apply_0 (SCM_VARIABLE_REF (var_make), +- scm_list_5 (scm_class_generic, ++ scm_list_5 ((scm_variable_ref (scm_c_lookup(""))), + k_name, sym, + k_default, scm_variable_ref (var))); + return scm_make_variable (generic); +@@ -756,7 +756,8 @@ gw_guile_handle_wrapper_error(GWLangAren + scm_misc_error(func_name, error->message, *(SCM *)error->data); + break; + case GW_ERR_MEMORY: +- scm_memory_error(func_name); ++ fprintf (stderr, "FATAL: memory error in %s\n", func_name); ++ abort (); + break; + case GW_ERR_RANGE: + scm_error (out_of_range_key, diff --git a/g-wrap.spec b/g-wrap.spec index 1cefb67..c61a816 100644 --- a/g-wrap.spec +++ b/g-wrap.spec @@ -3,13 +3,14 @@ Summary(pl.UTF-8): Narzędzie do eksportowania bibliotek C do interpreterów Sch Summary(pt_BR.UTF-8): Um utilitário para geração automática de código para exportar bibliotecas C para guile scheme e rscheme Name: g-wrap Version: 1.9.15 -Release: 4 +Release: 5 Epoch: 2 License: LGPL v2.1+ Group: Libraries Source0: http://download.savannah.gnu.org/releases/g-wrap/%{name}-%{version}.tar.gz # Source0-md5: 037d465a28782636a995cf0179f1d7ff Patch0: %{name}-info.patch +Patch1: %{name}-guile3.patch URL: http://www.nongnu.org/g-wrap/ BuildRequires: autoconf >= 2.61 BuildRequires: automake >= 1:1.12 @@ -75,6 +76,7 @@ Bibliotecas estáticas para desenvolvimento com a biblioteca g-wrap. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build %{__libtoolize} -- 2.44.0