Skip to content

Commit

Permalink
chicken-scheme: new version 5.4.0
Browse files Browse the repository at this point in the history
* New version.
* 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.

Signed-off-by: Jeronimo Pellegrini <[email protected]>
  • Loading branch information
jpellegrini committed Sep 21, 2024
1 parent 446c9dd commit ec8cc69
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 11 deletions.
44 changes: 33 additions & 11 deletions lang/chicken-scheme/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2019-2020 Jerônimo Cordoni Pellegrini <[email protected]>
# Copyright (C) 2019-2024 Jerônimo Pellegrini <[email protected]>
#
# This file is free software, licensed under the GNU General Public License v3
# or later.
Expand All @@ -8,13 +8,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=chicken-scheme
PKG_VERSION:=5.2.0
PKG_RELEASE:=2
PKG_VERSION:=5.4.0

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 <[email protected]>

PKG_LICENSE:=BSD-3-Clause
Expand All @@ -30,9 +29,12 @@ define Package/chicken-scheme/Default
ABI_VERSION:=11
endef

##
## chicken-scheme-interpreter
##

###############################
###
### chicken-scheme-interpreter
###
###############################

define Package/chicken-scheme-interpreter
$(call Package/chicken-scheme/Default)
Expand Down Expand Up @@ -73,20 +75,40 @@ $(eval $(call BuildPackage,chicken-scheme-interpreter))



##
## chicken-scheme-full
##
########################
###
### chicken-scheme-full
###
########################

## ABOUT THE PATCH INCLUDED FOR OPENWRT in package/lang/chicken/patches:
## ------------------------------------
#
# 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!

## ABOUT NOT STRIPPING THE BINARIES:
## --------------------------------
#
# mips-openwrt-linux-musl-gcc dowsn't seem to link with libchicken.so.
# already tried -lchicken and passing /usr/lib/libchicken.so on the command
# line.
# also tried -Wl,-R/usr/lib,-R/usr/lib/chicken/$(ABI_VERSION)
#
# current solution: we do not strip binaries in chicken-scheme-full
# we do this by unsetting STRIP and RSTRIP, *and* reloading rules.mk
#
# Here:
STRIP:=:
RSTRIP:=:

include $(TOPDIR)/rules.mk

define Package/chicken-scheme-full
Expand Down
15 changes: 15 additions & 0 deletions lang/chicken-scheme/patches/00.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff -Nur chicken-5.4.0/defaults.make chicken-5.4.0-new/defaults.make
--- chicken-5.4.0/defaults.make 2024-07-16 02:43:18.000000000 -0300
+++ chicken-5.4.0-new/defaults.make 2024-09-21 08:19:24.032355201 -0300
@@ -506,6 +506,11 @@
endif
$(call echo, >>, $@,#endif)
$(call echo, >>, $@,/* END OF FILE */)
+ # For OpenWRT:
+ sed -e's/\-fmacro-prefix-map[^ ]*//' $@ > [email protected]
+ sed -e's/\-ldl//' [email protected] > [email protected]
+ cp [email protected] $@
+ rm [email protected] [email protected]

chicken-install.rc:
$(call echo, >, $@,/* GENERATED */)

0 comments on commit ec8cc69

Please sign in to comment.