pkgsrc/lang/scm/patches/patch-aa

123 lines
4.5 KiB
Text

$NetBSD: patch-aa,v 1.6 2016/06/01 13:32:13 joerg Exp $
Configure for pkgsrc.
Fix installation rules.
Missing dependency of scmfig.h scmflags.h.
--- Makefile.orig 2006-10-25 01:47:17.000000000 +0000
+++ Makefile
@@ -44,7 +44,7 @@
SHELL = /bin/sh
#CC = gcc
#CFLAGS = -g
-#LIBS =
+LIBS = -lm
#LD = $(CC) -g
LD = $(CC)
SCMLIT = ./scmlit
@@ -86,7 +86,7 @@ srcdir.mk: Makefile
echo "srcdir=`pwd`/" >> srcdir.mk
#srcdir=$(HOME)/scm/
#srcdir=/usr/local/src/scm/
-include srcdir.mk
+#include srcdir.mk
# directory where COPYING and InitXXX.scm reside.
#IMPLPATH = /usr/local/src/scm/
@@ -110,7 +110,9 @@ ofiles = scm.o time.o repl.o scl.o sys.o
# continue-ia64.o
ifiles = Init$(VERSION).scm Transcen.scm Link.scm Macro.scm Macexp.scm \
Tscript.scm compile.scm Iedline.scm Idiffer.scm
-hobfiles = hobbit.scm scmhob.scm scmhob.h
+hobsrcs = hobbit.scm scmhob.scm
+hobincs = scmhob.h
+hobfiles = $(hobsrcs) $(hobincs)
turfiles = turtlegr.c turtle grtest.scm
xafiles = xatoms.scm x11.scm xevent.scm keysymdef.scm
xfiles = x.c x.h xgen.scm xevent.h inc2scm $(xafiles)
@@ -138,19 +140,19 @@ scmflags:
else mv newflags.h scmflags.h; fi
.c.o:
$(CC) -c $(CFLAGS) $< -o $@
-scm.o: scm.c scm.h scmfig.h scmflags.h patchlvl.h
-scmmain.o: scmmain.c scm.h scmfig.h scmflags.h patchlvl.h
-scl.o: scl.c scm.h scmfig.h scmflags.h
-eval.o: eval.c scm.h scmfig.h scmflags.h setjump.h
-debug.o: debug.c scm.h scmfig.h scmflags.h setjump.h
-unif.o: unif.c scm.h scmfig.h scmflags.h
-#ramap.o: ramap.c scm.h scmfig.h scmflags.h
-repl.o: repl.c scm.h scmfig.h scmflags.h setjump.h
-sys.o: sys.c scm.h scmfig.h scmflags.h setjump.h
-time.o: time.c scm.h scmfig.h scmflags.h
-subr.o: subr.c scm.h scmfig.h scmflags.h
-rope.o: rope.c scm.h scmfig.h scmflags.h
-continue.o: continue.c continue.h setjump.h scm.h scmfig.h scmflags.h
+scm.o: scm.c scm.h scmfig.h scmflags.h scmflags.h patchlvl.h
+scmmain.o: scmmain.c scm.h scmfig.h scmflags.h scmflags.h patchlvl.h
+scl.o: scl.c scm.h scmfig.h scmflags.h scmflags.h
+eval.o: eval.c scm.h scmfig.h scmflags.h scmflags.h setjump.h
+debug.o: debug.c scm.h scmfig.h scmflags.h scmflags.h setjump.h
+unif.o: unif.c scm.h scmfig.h scmflags.h scmflags.h
+#ramap.o: ramap.c scm.h scmfig.h scmflags.h scmflags.h
+repl.o: repl.c scm.h scmfig.h scmflags.h scmflags.h setjump.h
+sys.o: sys.c scm.h scmfig.h scmflags.h scmflags.h setjump.h
+time.o: time.c scm.h scmfig.h scmflags.h scmflags.h
+subr.o: subr.c scm.h scmfig.h scmflags.h scmflags.h
+rope.o: rope.c scm.h scmfig.h scmflags.h scmflags.h
+continue.o: continue.c continue.h setjump.h scm.h scmfig.h scmflags.h scmflags.h
continue-ia64.o: continue-ia64.S get-contoffset-ia64.c
gcc -o get-contoffset-ia64 get-contoffset-ia64.c
./get-contoffset-ia64 contoffset-ia64.S
@@ -249,7 +251,7 @@ libscm.opt:
echo "-F engineering-notation" >> libscm.opt
echo "-F dynamic-linking" >> libscm.opt
mylib: libscm.a
-libscm.a: libscm.opt
+libscm.a: libscm.opt scmlit
$(BUILD) -t lib -f libscm.opt
libtest: libscm.a libtest.c
$(LD) -o libtest libtest.c libscm.a -ldl -lm -lc
@@ -420,12 +422,12 @@ $(PREVDOCS)scm.info: srcdir.mk Makefile
rpm_prefix=$(HOME)/rpmbuild/
-prefix = /usr/local/
+prefix = $(PREFIX)/
exec_prefix = $(prefix)
# directory where `make install' will put executable.
bindir = $(exec_prefix)bin/
libdir = $(exec_prefix)lib/
-libscmdir = $(libdir)scm/
+libscmdir = $(prefix)share/scm/
# directory where `make install' will put manual page.
mandir = $(prefix)man/
man1dir = $(mandir)man1/
@@ -477,7 +479,7 @@ $(infodir)Xlibscm.info.gz: $(infodir)Xli
$(infodir)hobbit.info.gz: $(infodir)hobbit.info
gzip -f $(infodir)hobbit.info
-install: scm.1 db.so wbtab.scm rwb-isam.scm
+install:
test -d $(bindir) || mkdir $(bindir)
test -d $(mandir) || mkdir $(mandir)
test -d $(man1dir) || mkdir $(man1dir)
@@ -486,16 +488,16 @@ install: scm.1 db.so wbtab.scm rwb-isam.
-cp scm.1 $(man1dir)
test -d $(libdir) || mkdir $(libdir)
test -d $(libscmdir) || mkdir $(libscmdir)
- -cp $(ifiles) $(hobfiles) COPYING r4rstest.scm $(libscmdir)
+ -cp $(ifiles) $(hobsrcs) COPYING r4rstest.scm $(libscmdir)
test -f $(libscmdir)require.scm || \
cp requires.scm $(libscmdir)require.scm
- -cp build build.scm mkimpcat.scm Iedline.scm $(SHOBJS) patchlvl.h\
+ -cp build build.scm mkimpcat.scm Iedline.scm $(SHOBJS) \
$(xafiles) $(libscmdir)
-cp db.so wbtab.scm rwb-isam.scm $(libscmdir)
installlib:
test -d $(includedir) || mkdir $(includedir)
- cp scm.h scmfig.h scmflags.h $(includedir)
+ cp scm.h scmfig.h scmflags.h patchlvl.h $(hobincs) $(includedir)
test -d $(libdir) || mkdir $(libdir)
cp libscm.a $(libdir)libscm.a