From: Christopher Howard Date: Tue, 15 May 2018 17:48:36 +0000 (-0800) Subject: tinyscheme: Tweaks to allow building libraries X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=797b5408dcf97594c507a0fb3ab7fcebb601e469;p=librecmc%2Fpackage-feed.git tinyscheme: Tweaks to allow building libraries Causes the libtinyscheme.a and libtinyscheme.so to also be built, which builds successfully on mips_24kc targets at least. This patch causes them to be built in build_dir but not actually included in the ipkg. --- diff --git a/lang/tinyscheme/Makefile b/lang/tinyscheme/Makefile index b4a78dc..d96384b 100644 --- a/lang/tinyscheme/Makefile +++ b/lang/tinyscheme/Makefile @@ -40,16 +40,16 @@ define Package/tinyscheme CATEGORY:=Languages TITLE:=TinyScheme programming language URL:=http://tinyscheme.sourceforge.net + MAINTAINER=Christopher Howard 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)) +define Build/Compile + $(call Build/Compile/Default,PLATFORM_FEATURES='-fPIC -DInitFile="\"/usr/lib/tinyscheme/init.scm\""') endef define Package/tinyscheme/install diff --git a/lang/tinyscheme/patches/001-makefile.patch b/lang/tinyscheme/patches/001-makefile.patch index 6417ca7..6c58ddc 100644 --- a/lang/tinyscheme/patches/001-makefile.patch +++ b/lang/tinyscheme/patches/001-makefile.patch @@ -1,20 +1,41 @@ --- a/makefile 2013-04-14 12:08:33.000000000 -0800 -+++ a/makefile 2018-05-01 09:12:00.895474940 -0800 -@@ -34,7 +34,7 @@ ++++ b/makefile 2018-05-15 09:36:27.877379450 -0800 +@@ -18,8 +18,8 @@ + #AR= echo + + # Unix, generally +-CC = gcc -fpic -pedantic +-DEBUG=-g -Wall -Wno-char-subscripts -O ++CC = gcc -fPIC -pedantic ++# DEBUG=-g -Wall -Wno-char-subscripts -O + Osuf=o + SOsuf=so + LIBsuf=a +@@ -27,14 +27,15 @@ + LIBPREFIX=lib + OUT = -o $@ + RM= -rm -f +-AR= ar crs ++AR= ar ++AR_OPTS= crs + + # Linux + LD = gcc LDFLAGS = -shared - DEBUG=-g -Wno-char-subscripts -O +-DEBUG=-g -Wno-char-subscripts -O ++DEBUG=-Wall -Wno-char-subscripts -O SYS_LIBS= -ldl -lm -PLATFORM_FEATURES= -DSUN_DL=1 -+PLATFORM_FEATURES= -DSUN_DL=1 -DInitFile=\"/usr/lib/tinyscheme/init.scm\" ++# PLATFORM_FEATURES= -DInitFile=\"/usr/lib/tinyscheme/init.scm\" # Cygwin #PLATFORM_FEATURES = -DUSE_STRLWR=0 -@@ -68,7 +68,7 @@ - LIBTARGET = $(LIBPREFIX)tinyscheme.$(SOsuf) - STATICLIBTARGET = $(LIBPREFIX)tinyscheme.$(LIBsuf) +@@ -80,7 +81,7 @@ + $(CC) -o $@ $(DEBUG) $(OBJS) $(SYS_LIBS) --all: $(LIBTARGET) $(STATICLIBTARGET) scheme$(EXE_EXT) -+all: scheme$(EXE_EXT) + $(STATICLIBTARGET): $(OBJS) +- $(AR) $@ $(OBJS) ++ $(AR) $(AR_OPTS) $@ $(OBJS) - %.$(Osuf): %.c - $(CC) -I. -c $(DEBUG) $(FEATURES) $(DL_FLAGS) $< + $(OBJS): scheme.h scheme-private.h opdefines.h + dynload.$(Osuf): dynload.h