commit:     8182cbbbfbdc0a6e09713426e7dff1db16e982fe
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 15 12:06:25 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov 15 12:07:39 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8182cbbb

www-client/elinks: fix build w/ guile

Closes: https://bugs.gentoo.org/966060
Signed-off-by: Sam James <sam <AT> gentoo.org>

 www-client/elinks/elinks-0.18.0.ebuild            |  1 +
 www-client/elinks/files/elinks-0.18.0-guile.patch | 37 +++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/www-client/elinks/elinks-0.18.0.ebuild 
b/www-client/elinks/elinks-0.18.0.ebuild
index 4ab6e8a9d8dc..e29c501ede2f 100644
--- a/www-client/elinks/elinks-0.18.0.ebuild
+++ b/www-client/elinks/elinks-0.18.0.ebuild
@@ -85,6 +85,7 @@ BDEPEND="
 PATCHES=(
        "${FILESDIR}"/${P}-sftp.patch
        "${FILESDIR}"/${P}-build.patch
+       "${FILESDIR}"/${PN}-0.18.0-guile.patch
 )
 
 pkg_setup() {

diff --git a/www-client/elinks/files/elinks-0.18.0-guile.patch 
b/www-client/elinks/files/elinks-0.18.0-guile.patch
new file mode 100644
index 000000000000..2dded55ff800
--- /dev/null
+++ b/www-client/elinks/files/elinks-0.18.0-guile.patch
@@ -0,0 +1,37 @@
+https://bugs.gentoo.org/966060
+https://github.com/rkd77/elinks/issues/373
+https://github.com/rkd77/elinks/commit/ed65b37141fffa0f14886583e0caeca2d52bf52b
+
+From ed65b37141fffa0f14886583e0caeca2d52bf52b Mon Sep 17 00:00:00 2001
+From: Witold Filipczyk <[email protected]>
+Date: Tue, 1 Apr 2025 10:22:09 +0200
+Subject: [PATCH] [scripting] init guile before displaying version. Refs #373
+
+---
+ src/scripting/guile/guile.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/scripting/guile/guile.c b/src/scripting/guile/guile.c
+index 01226169b..93e30f09c 100644
+--- a/src/scripting/guile/guile.c
++++ b/src/scripting/guile/guile.c
+@@ -4,6 +4,9 @@
+ #include "config.h"
+ #endif
+ 
++#include <libguile.h>
++#include <stdio.h>
++
+ #include "elinks.h"
+ 
+ #include "intl/libintl.h"
+@@ -15,6 +18,8 @@ static const char *
+ get_name_guile(struct module *xxx)
+ {
+       static char elguileversion[32];
++
++      scm_init_guile();
+       snprintf(elguileversion, 31, "Guile %s", 
scm_to_locale_string(scm_version()));
+ 
+       return elguileversion;
+

Reply via email to