diff options
author | Arsen Arsenović <arsen@gentoo.org> | 2024-08-03 19:52:59 +0200 |
---|---|---|
committer | Arsen Arsenović <arsen@gentoo.org> | 2024-08-18 19:43:16 +0200 |
commit | 749a720102518c446809c7239c4633e02e4c7472 (patch) | |
tree | 785ab14ed4290bd7d9caaff117f74549b7adf5f0 /dev-scheme | |
parent | dev-build/make: switch to new guile mechanism (diff) | |
download | gentoo-749a720102518c446809c7239c4633e02e4c7472.tar.gz gentoo-749a720102518c446809c7239c4633e02e4c7472.tar.bz2 gentoo-749a720102518c446809c7239c4633e02e4c7472.zip |
dev-scheme/guile-reader: port to new guile eclasses
Signed-off-by: Arsen Arsenović <arsen@gentoo.org>
Diffstat (limited to 'dev-scheme')
3 files changed, 151 insertions, 0 deletions
diff --git a/dev-scheme/guile-reader/files/guile-reader-0.6.3-implicit-fn-decl.patch b/dev-scheme/guile-reader/files/guile-reader-0.6.3-implicit-fn-decl.patch new file mode 100644 index 000000000000..f09f3055c0a6 --- /dev/null +++ b/dev-scheme/guile-reader/files/guile-reader-0.6.3-implicit-fn-decl.patch @@ -0,0 +1,25 @@ +From d4ff9b9e4c64f7e60c95676ec74c49b12b20ad3b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@gentoo.org> +Date: Sat, 3 Aug 2024 18:28:51 +0200 +Subject: [PATCH 1/2] add missing include + +fixes an implicit function declaration +--- + src/compat.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/compat.c b/src/compat.c +index 943c7f9..9b15b31 100644 +--- a/src/compat.c ++++ b/src/compat.c +@@ -21,6 +21,7 @@ + #endif + + #include <libguile.h> ++#include <libguile/deprecation.h> + #include <compat.h> + #include <string.h> + #include <stdio.h> +-- +2.45.2 + diff --git a/dev-scheme/guile-reader/files/guile-reader-0.6.3-slot.patch b/dev-scheme/guile-reader/files/guile-reader-0.6.3-slot.patch new file mode 100644 index 000000000000..79df5bebb546 --- /dev/null +++ b/dev-scheme/guile-reader/files/guile-reader-0.6.3-slot.patch @@ -0,0 +1,66 @@ +From d75f6155c5ff58ac2b3fee311f7056e01b1b6981 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me> +Date: Sat, 3 Aug 2024 18:29:21 +0200 +Subject: [PATCH 2/2] use the guile extension directory for libguile-reader.so + +this directory is slotted, and so, allows parallel installation. +--- + configure.ac | 2 ++ + modules/Makefile.am | 3 ++- + modules/system/reader.in | 2 +- + src/Makefile.am | 2 +- + 4 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c34e4dd..2ddd308 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -114,6 +114,8 @@ fi + AC_PATH_PROGS([GUILD], [guild guile-tools]) + GUILE_SITE_DIR + ++AC_SUBST([guileextdir], ["${GUILE_EXTENSION}"]) ++ + clean_LIBS="$LIBS" + clean_CFLAGS="$CFLAGS" + LIBS="$LIBS $GUILE_LIBS" +diff --git a/modules/Makefile.am b/modules/Makefile.am +index 25f2499..b0d4fd4 100644 +--- a/modules/Makefile.am ++++ b/modules/Makefile.am +@@ -13,7 +13,8 @@ nobase_nodist_guilemodule_DATA = \ + + .in.scm: + $(AM_V_GEN)$(MKDIR_P) `dirname "$@"` ; \ +- $(SED) -e 's|[@]libdir[@]|$(libdir)|g' < "$<" > "$@.tmp" ; \ ++ $(SED) -e 's|[@]guileextdir[@]|$(guileextdir)|g' \ ++ < "$<" > "$@.tmp" ; \ + mv "$@.tmp" "$@" + + if HAVE_GUILE2 +diff --git a/modules/system/reader.in b/modules/system/reader.in +index fbef2ac..cd23ba7 100644 +--- a/modules/system/reader.in ++++ b/modules/system/reader.in +@@ -58,7 +58,7 @@ + + (define %libguile-reader + (string-append (or (getenv "GUILE_READER_LIBDIR") +- "@libdir@") ++ "@guileextdir@") + "/libguile-reader")) + + (load-extension %libguile-reader "scm_reader_init_bindings") +diff --git a/src/Makefile.am b/src/Makefile.am +index e029bac..71294c2 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,4 +1,4 @@ +-lib_LTLIBRARIES = libguile-reader.la ++guileext_LTLIBRARIES = libguile-reader.la + libguile_reader_la_SOURCES = reader.c token-readers.c reader-lib.c compat.c + libguile_reader_la_LDFLAGS = -module -version-info 1:0:0 $(GUILE_LDFLAGS) + +-- +2.45.2 + diff --git a/dev-scheme/guile-reader/guile-reader-0.6.3-r100.ebuild b/dev-scheme/guile-reader/guile-reader-0.6.3-r100.ebuild new file mode 100644 index 000000000000..5374e0aaaa63 --- /dev/null +++ b/dev-scheme/guile-reader/guile-reader-0.6.3-r100.ebuild @@ -0,0 +1,60 @@ +# 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 guile autotools + +DESCRIPTION="Simple framework for building readers for GNU Guile" +HOMEPAGE="https://www.nongnu.org/guile-reader/" +SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +REQUIRED_USE="${GUILE_REQUIRED_USE}" + +RDEPEND="${GUILE_DEPS}" +DEPEND="${RDEPEND}" +BDEPEND="dev-util/gperf" + +PATCHES=( + "${FILESDIR}/${PN}-0.6.3-implicit-fn-decl.patch" + "${FILESDIR}/${PN}-0.6.3-slot.patch" +) + +src_prepare() { + default + + eautoreconf + + guile_bump_sources +} + +configure_one_src() { + local -x guile_snarf="${GUILESNARF}" + # We don't have lightning packaged and, naturally, guile-reader has + # no --with-... for it. Suppress the automagic. + econf \ + ac_cv_header_lightning_h=no +} + +src_configure() { + guile_foreach_impl configure_one_src +} + +compile_one_src() { + # Makefile appears to be missing seemingly all dependencies. + emake -j1 --shuffle=none +} + +src_compile() { + guile_foreach_impl compile_one_src +} + +src_install() { + guile_src_install + + find "${ED}" -type f -name '*.la' -delete || die +} |