chicken-scheme: bump to 5.4.0
authorJeronimo Pellegrini <j_p@aleph0.info>
Wed, 19 Nov 2025 16:23:02 +0000 (13:23 -0300)
committerGeorge Sapkin <george@sapk.in>
Mon, 22 Dec 2025 12:56:48 +0000 (14:56 +0200)
A patch is included in order to get the compiler (csc) to work properly
on the target device (comment in the OpenWRT package Makefile). csc,
chicken-install, chicken-status have been verified to work. What the
patch does is to remove -fmacro-prefix-map and -ldl in the strings that
are passed to gcc when the Scheme compiler runs. Without that, the
compiler will not run on the router. A longer description is in the
patch header.

Co-authored-by: George Sapkin <george@sapk.in>
Signed-off-by: Jeronimo Pellegrini <j_p@aleph0.info>
lang/chicken-scheme/Makefile
lang/chicken-scheme/patches/001-fix-flags-passed-from-csc-to-gcc.patch [new file with mode: 0644]

index 8cd3860a00873aadbfaa56ee1c5ff739409fc96e..5dbf169a53667f23d8178eb720f5f29ada4aef0b 100644 (file)
@@ -1,17 +1,17 @@
-# Copyright (C) 2019-2020 Jerônimo Cordoni Pellegrini <j_p@aleph0.info>
+# Copyright (C) 2019-2025, Jerônimo Pellegrini <j_p@aleph0.info>
 #
 # SPDX-License-Identifier: GPL-3.0-or-later
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=chicken-scheme
-PKG_VERSION:=5.2.0
-PKG_RELEASE:=3
+PKG_VERSION:=5.4.0
+PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/chicken-$(PKG_VERSION)
 PKG_SOURCE:=chicken-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://code.call-cc.org/releases/$(PKG_VERSION)/
-PKG_HASH:=819149c8ce7303a9b381d3fdc1d5765c5f9ac4dee6f627d1652f47966a8780fa
+PKG_HASH:=3c5d4aa61c1167bf6d9bf9eaf891da7630ba9f5f3c15bf09515a7039bfcdec5f
 PKG_MAINTAINER:=Jeronimo Pellegrini <j_p@aleph0.info>
 
 PKG_LICENSE:=BSD-3-Clause
diff --git a/lang/chicken-scheme/patches/001-fix-flags-passed-from-csc-to-gcc.patch b/lang/chicken-scheme/patches/001-fix-flags-passed-from-csc-to-gcc.patch
new file mode 100644 (file)
index 0000000..171610d
--- /dev/null
@@ -0,0 +1,35 @@
+From: Jeronimo Pellegrini <j_p@aleph0.info>
+Date Thu, 20 Nov 2025 00:00:00 -0300
+Subject: [PATCH] chicken-scheme: fix compiler behavior
+
+Chicken is a Scheme interpreter and compiler. csi is the interpreter,
+and csc is the compiler, which translates Scheme into C and calls gcc.
+
+This patch changes the compiler, csc.
+
+The Chicken build system will dynamically build the file chicken-config.h,
+and for OpenWRT this is done *inside the buildroot*. But then, the values
+in that file are hardcoded into the csc binary, and they don't work well
+in the target device:
+1. -ldl is passed to ld
+2. -fmacro-prefix-map=... is passed to gcc, with the original path from the
+   buildroot
+and these two will not work on OpenWRT (and are not needed anyway), so the
+patch included actually modifies the build system to remove those two flags.
+Then csc works on the target device!
+
+Signed-off-by: Jeronimo Pellegrini <j_p@aleph0.info>
+---
+ defaults.make | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/defaults.make
++++ b/defaults.make
+@@ -506,6 +506,7 @@ else
+ endif
+       $(call echo, >>, $@,#endif)
+       $(call echo, >>, $@,/* END OF FILE */)
++      sed -i -e's/\-fmacro-prefix-map[^ ]*//' -e's/\-ldl//' $@
+ chicken-install.rc:
+       $(call echo, >, $@,/* GENERATED */)