tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Make lang/tinyscheme compile under both Linux and NetBSD
On Mon, Feb 21, 2011 at 10:05:08AM -0300, Silas Silva wrote:
> On Sat, Feb 19, 2011 at 06:28:31PM +0300, Aleksej Saushev wrote:
> > Perhaps, you should reuse ${BUILDLINK_LDADD.dl:Q}, e.g., pass its value
> > in MAKE_ENV or so. See Jeremy's comment on dlopen.buildlink3.mk.
>
> Thank you very much for the tips, Aleksej and Jeremy. After changes, it
> compiles and runs fine under Linux and NetBSD.
>
> A new patch is attached. Is it fine? May I open a PR on that?
Besides making this little change, I've also updated to TinyScheme 1.40.
New patch attached. Can you please review? Should I open a PR
requesting the update?
--
Silas Silva
? work
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/tinyscheme/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- Makefile 12 Aug 2010 10:22:40 -0000 1.12
+++ Makefile 21 Feb 2011 14:18:41 -0000
@@ -1,10 +1,8 @@
# $NetBSD: Makefile,v 1.12 2010/08/12 10:22:40 asau Exp $
-DISTNAME= tinyscheme1.39
-PKGNAME= tinyscheme-1.39
+DISTNAME= tinyscheme-1.40
CATEGORIES= lang
MASTER_SITES= $(MASTER_SITE_SOURCEFORGE:=tinyscheme/)
-EXTRACT_SUFX= .zip
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
HOMEPAGE= http://tinyscheme.sourceforge.net/home.html
@@ -14,6 +12,9 @@
MAKE_FILE= makefile
USE_LIBTOOL= yes
+.include "../../mk/dlopen.buildlink3.mk"
+MAKE_ENV+= SYS_LIBS=${BUILDLINK_LDADD.dl:Q}
+
PKG_DESTDIR_SUPPORT= user-destdir
INSTALLATION_DIRS= bin include lib share/tinyscheme
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/lang/tinyscheme/distinfo,v
retrieving revision 1.10
diff -u -r1.10 distinfo
--- distinfo 12 Aug 2010 10:22:40 -0000 1.10
+++ distinfo 21 Feb 2011 14:18:41 -0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.10 2010/08/12 10:22:40 asau Exp $
+$NetBSD$
-SHA1 (tinyscheme1.39.zip) = d759bff93683399ee7abbfd1a822d000adb22a0c
-RMD160 (tinyscheme1.39.zip) = d8d365ccceb9482ffd457fd6d4f97c1651e131e9
-Size (tinyscheme1.39.zip) = 58751 bytes
-SHA1 (patch-aa) = 94cac80297b4e89e2fe2ff8a575c616354aa122d
+SHA1 (tinyscheme-1.40.tar.gz) = e03f7ac41f0517bb35eced2772c79eb9db42ea82
+RMD160 (tinyscheme-1.40.tar.gz) = 1eac087a90c2c2e8ca5f4cefbc5660b96491e4b3
+Size (tinyscheme-1.40.tar.gz) = 60160 bytes
+SHA1 (patch-aa) = 503dacf47cedf00752da66d1d25a66bba350e196
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/lang/tinyscheme/patches/patch-aa,v
retrieving revision 1.7
diff -u -r1.7 patch-aa
--- patches/patch-aa 12 Aug 2010 10:22:41 -0000 1.7
+++ patches/patch-aa 21 Feb 2011 14:18:41 -0000
@@ -1,53 +1,44 @@
-$NetBSD: patch-aa,v 1.7 2010/08/12 10:22:41 asau Exp $
+$NetBSD$
---- makefile.orig 2006-12-07 13:29:24.000000000 +0300
-+++ makefile 2010-08-12 14:14:07.000000000 +0400
+--- makefile.orig 2011-02-21 10:54:25.000000000 -0300
++++ makefile 2011-02-21 10:57:14.000000000 -0300
@@ -18,7 +18,7 @@
#AR= echo
- # Unix, generally
--CC = gcc -fpic
-+#CC = gcc -fpic
- DEBUG=-g -Wall -Wno-char-subscripts -O
- Osuf=o
- SOsuf=so
-@@ -28,16 +28,17 @@
- OUT = -o $@
- RM= -rm -f
- AR= ar crs
-+SYS_LIBS= -lm
-
- # Linux
- LD = gcc
- LDFLAGS = -shared
+ # Unix, generally
+-CC = gcc -fpic
++#CC = gcc -fpic
+ DEBUG=-g -Wall -Wno-char-subscripts -O
+ Osuf=o
+ SOsuf=so
+@@ -33,8 +33,8 @@
+ LD = gcc
+ LDFLAGS = -shared
DEBUG=-g -Wno-char-subscripts -O
-SYS_LIBS= -ldl
+-PLATFORM_FEATURES= -DSUN_DL=1
+#SYS_LIBS= -ldl
- PLATFORM_FEATURES= -DSUN_DL=1
++#PLATFORM_FEATURES= -DSUN_DL=1
# Cygwin
--PLATFORM_FEATURES = -DUSE_STRLWR=0
-+#PLATFORM_FEATURES = -DUSE_STRLWR=0
-
-
- # Solaris
-@@ -57,19 +58,23 @@
- LIBTARGET = $(LIBPREFIX)tinyscheme.$(SOsuf)
+ #PLATFORM_FEATURES = -DUSE_STRLWR=0
+@@ -57,19 +57,23 @@
+ LIBTARGET = $(LIBPREFIX)tinyscheme.$(SOsuf)
STATICLIBTARGET = $(LIBPREFIX)tinyscheme.$(LIBsuf)
-all: $(LIBTARGET) $(STATICLIBTARGET) scheme$(EXE_EXT)
+all: $(STATICLIBTARGET) scheme$(EXE_EXT)
--%.$(Osuf): %.c
-- $(CC) -I. -c $(DEBUG) $(FEATURES) $(DL_FLAGS) $<
+-%.$(Osuf): %.c
+- $(CC) -I. -c $(DEBUG) $(FEATURES) $(DL_FLAGS) $<
-
--$(LIBTARGET): $(OBJS)
-- $(LD) $(LDFLAGS) $(OUT) $(OBJS) $(SYS_LIBS)
+-$(LIBTARGET): $(OBJS)
+- $(LD) $(LDFLAGS) $(OUT) $(OBJS) $(SYS_LIBS)
+.c.$(Osuf):
+ $(LIBTOOL) --mode=compile $(CC) -I. -c $(DEBUG) $(FEATURES) $(DL_FLAGS)
$<
- scheme$(EXE_EXT): $(OBJS)
-- $(CC) -o $@ $(DEBUG) $(OBJS) $(SYS_LIBS)
+ scheme$(EXE_EXT): $(OBJS)
+- $(CC) -o $@ $(DEBUG) $(OBJS) $(SYS_LIBS)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(DEBUG) $(OBJS) $(LIBS:.a=.la)
$(SYS_LIBS)
$(STATICLIBTARGET): $(OBJS)
@@ -62,4 +53,4 @@
+ $(BSD_INSTALL_DATA) scheme.h $(DESTDIR)$(PREFIX)/include/tinyscheme.h
$(OBJS): scheme.h scheme-private.h opdefines.h
- dynload.$(Osuf): dynload.h
+ dynload.$(Osuf): dynload.h
Home |
Main Index |
Thread Index |
Old Index