dev-scheme/guile-reader: port to new guile eclasses

Signed-off-by: Arsen Arsenović <arsen@gentoo.org>
This commit is contained in:
Arsen Arsenović 2024-08-03 19:52:59 +02:00
parent a35501c897
commit 749a720102
No known key found for this signature in database
GPG Key ID: 52C294301EA2C493
4 changed files with 152 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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
}

View File

@ -37,6 +37,7 @@
# Guile rework masks. Mask all packages or package versions that are
# being bumped as part of the Guile reslotting process.
# Masked until the whole Guile ecosystem is updated.
>=dev-scheme/guile-reader-0.6.3-r100
dev-scheme/guile:2.2
dev-scheme/guile:3.0
>=dev-build/make-4.4.1-r100