Browse Source

Merge branch 'tinyscheme' of pi31415/librecmc-package-feed into v1.4

RISCI_ATOM 6 years ago
parent
commit
4a64056e70
2 changed files with 82 additions and 0 deletions
  1. 62 0
      lang/tinyscheme/Makefile
  2. 20 0
      lang/tinyscheme/patches/001-makefile.patch

+ 62 - 0
lang/tinyscheme/Makefile

@@ -0,0 +1,62 @@
+# The software `TinyScheme` was packaged for OpenWRT and LibreCMC by
+# Christopher Howard <christopher.howard@qlfiles.net> in May 2018.
+
+# This package configuration file is licensed under the GPL-3+.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# The upstream author of `TinyScheme` is Dimitrios Souflis
+# <dsouflis@acm.org>
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=tinyscheme
+PKG_VERSION:=1.41
+PKG_RELEASE:=1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/tinyscheme-$(PKG_VERSION)
+PKG_SOURCE:=tinyscheme-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=ftp://lavender.qlfiles.net/tinyscheme/
+PKG_HASH:=eac0103494c755192b9e8f10454d9f98f2bbd4d352e046f7b253439a3f991999
+PKG_CAT:=zcat
+PKG_LICENSE:=BSD-3-Clause
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/tinyscheme
+	SECTION:=lang
+	CATEGORY:=Languages
+	TITLE:=TinyScheme programming language
+	URL:=http://tinyscheme.sourceforge.net
+endef
+
+define Package/tinyscheme/description
+	TinyScheme is a lightweight Scheme interpreter that implements as large a
+	subset of R5RS as was possible without getting very large and complicated.
+        This package installs only the tinyscheme binary, not the shared library.
+endef
+
+define Build/Configure
+	$(call Build/Configure/Default,--with-linux-headers=$(LINUX_DIR))
+endef
+
+define Package/tinyscheme/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/scheme $(1)/usr/bin/tinyscheme
+	$(INSTALL_DIR) $(1)/usr/lib/tinyscheme
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/init.scm $(1)/usr/lib/tinyscheme/init.scm
+endef
+
+$(eval $(call BuildPackage,tinyscheme))

+ 20 - 0
lang/tinyscheme/patches/001-makefile.patch

@@ -0,0 +1,20 @@
+--- a/makefile	2013-04-14 12:08:33.000000000 -0800
++++ a/makefile	2018-05-01 09:12:00.895474940 -0800
+@@ -34,7 +34,7 @@
+ LDFLAGS = -shared
+ DEBUG=-g -Wno-char-subscripts -O
+ SYS_LIBS= -ldl -lm
+-PLATFORM_FEATURES= -DSUN_DL=1
++PLATFORM_FEATURES= -DSUN_DL=1 -DInitFile=\"/usr/lib/tinyscheme/init.scm\"
+ 
+ # Cygwin
+ #PLATFORM_FEATURES = -DUSE_STRLWR=0
+@@ -68,7 +68,7 @@
+ LIBTARGET = $(LIBPREFIX)tinyscheme.$(SOsuf)
+ STATICLIBTARGET = $(LIBPREFIX)tinyscheme.$(LIBsuf)
+ 
+-all: $(LIBTARGET) $(STATICLIBTARGET) scheme$(EXE_EXT)
++all: scheme$(EXE_EXT)
+ 
+ %.$(Osuf): %.c
+ 	$(CC) -I. -c $(DEBUG) $(FEATURES) $(DL_FLAGS) $<