Browse Source

Builds TinyScheme library correctly

Adjusts makefile to use $(CC) rather than $(LD) so that gcc will be
used rather than the linker directly. This bypasses the problem
with being unable to link to libgcc_s.so.
pi31415 6 years ago
parent
commit
218e83e89c
2 changed files with 14 additions and 4 deletions
  1. 5 2
      lang/tinyscheme/Makefile
  2. 9 2
      lang/tinyscheme/patches/001-makefile.patch

+ 5 - 2
lang/tinyscheme/Makefile

@@ -44,8 +44,8 @@ define Package/tinyscheme
 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.
+TinyScheme is a lightweight Scheme interpreter that implements as large
+a subset of R5RS as was possible without getting very large and complicated.
 endef
 
 define Build/Compile
@@ -55,6 +55,9 @@ 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
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/libtinyscheme.so $(1)/usr/lib/libtinyscheme.so
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/libtinyscheme.a $(1)/usr/lib/libtinyscheme.a
 	$(INSTALL_DIR) $(1)/usr/lib/tinyscheme
 	$(INSTALL_DATA) $(PKG_BUILD_DIR)/init.scm $(1)/usr/lib/tinyscheme/init.scm
 endef

+ 9 - 2
lang/tinyscheme/patches/001-makefile.patch

@@ -1,5 +1,5 @@
 --- a/makefile	2013-04-14 12:08:33.000000000 -0800
-+++ b/makefile	2018-05-15 09:36:27.877379450 -0800
++++ b/makefile	2018-05-23 07:18:29.251203367 -0800
 @@ -18,8 +18,8 @@
  #AR= echo
  
@@ -30,7 +30,14 @@
  
  # Cygwin
  #PLATFORM_FEATURES = -DUSE_STRLWR=0
-@@ -80,7 +81,7 @@
+@@ -74,13 +75,13 @@
+ 	$(CC) -I. -c $(DEBUG) $(FEATURES) $(DL_FLAGS) $<
+ 
+ $(LIBTARGET): $(OBJS)
+-	$(LD) $(LDFLAGS) $(OUT) $(OBJS) $(SYS_LIBS)
++	$(CC) $(LDFLAGS) $(OUT) $(OBJS) $(SYS_LIBS)
+ 
+ scheme$(EXE_EXT): $(OBJS)
  	$(CC) -o $@ $(DEBUG) $(OBJS) $(SYS_LIBS)
  
  $(STATICLIBTARGET): $(OBJS)