summaryrefslogtreecommitdiff
path: root/lang/scm/patches
diff options
context:
space:
mode:
authorjoerg <joerg>2006-02-19 17:50:11 +0000
committerjoerg <joerg>2006-02-19 17:50:11 +0000
commitcc2f5d3a2932434abd3427cbaedabed7b0552461 (patch)
tree14077f7a4755f2211ba0fcb4aa4939b733b9bad2 /lang/scm/patches
parentc80c387f1bcff00e52024c9a87aedfff89736ede (diff)
downloadpkgsrc-cc2f5d3a2932434abd3427cbaedabed7b0552461.tar.gz
Always link scmlit with LIBS=-lm, since it uses math functions.
Fix errno. Add DragonFly support.
Diffstat (limited to 'lang/scm/patches')
-rw-r--r--lang/scm/patches/patch-aa11
-rw-r--r--lang/scm/patches/patch-ac25
-rw-r--r--lang/scm/patches/patch-ad13
-rw-r--r--lang/scm/patches/patch-ae13
-rw-r--r--lang/scm/patches/patch-af40
-rw-r--r--lang/scm/patches/patch-ag90
-rw-r--r--lang/scm/patches/patch-ah14
7 files changed, 205 insertions, 1 deletions
diff --git a/lang/scm/patches/patch-aa b/lang/scm/patches/patch-aa
index dcf8dae5c3d..de45641556c 100644
--- a/lang/scm/patches/patch-aa
+++ b/lang/scm/patches/patch-aa
@@ -1,7 +1,16 @@
-$NetBSD: patch-aa,v 1.2 2005/10/25 09:32:15 adam Exp $
+$NetBSD: patch-aa,v 1.3 2006/02/19 17:50:11 joerg Exp $
--- Makefile.orig 2005-06-24 01:20:35.000000000 +0000
+++ Makefile
+@@ -44,7 +44,7 @@
+ SHELL = /bin/sh
+ #CC = gcc
+ #CFLAGS = -g
+-#LIBS =
++LIBS = -lm
+ #LD = $(CC) -g
+ LD = $(CC)
+ SCMLIT = ./scmlit
@@ -97,7 +97,9 @@ ofiles = scm.o time.o repl.o scl.o sys.o
# ramap.o
ifiles = Init$(VERSION).scm Transcen.scm Link.scm Macro.scm Macexp.scm \
diff --git a/lang/scm/patches/patch-ac b/lang/scm/patches/patch-ac
new file mode 100644
index 00000000000..dd4428adcd8
--- /dev/null
+++ b/lang/scm/patches/patch-ac
@@ -0,0 +1,25 @@
+$NetBSD: patch-ac,v 1.1 2006/02/19 17:50:11 joerg Exp $
+
+--- scmfig.h.orig 2006-02-08 17:51:31.000000000 +0000
++++ scmfig.h
+@@ -793,20 +793,6 @@ typedef SCM *SCMPTR;
+ gc_for_open_files();\
+ else if (!SCM_INTERRUPTED(errno)) break;}}
+
+-#ifndef MSDOS
+-# ifdef ARM_ULIB
+- extern volatile int errno;
+-# else
+- extern int errno;
+-# endif
+-#endif
+-#ifdef __TURBOC__
+-# if (__TURBOC__==1)
+- /* Needed for TURBOC V1.0 */
+- extern int errno;
+-# endif
+-#endif
+-
+ /* EXIT_SUCCESS is the default code to return from SCM if no errors
+ were encountered. EXIT_FAILURE is the default code to return from
+ SCM if errors were encountered. The return code can be explicitly
diff --git a/lang/scm/patches/patch-ad b/lang/scm/patches/patch-ad
new file mode 100644
index 00000000000..c945fb1e2ef
--- /dev/null
+++ b/lang/scm/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1 2006/02/19 17:50:11 joerg Exp $
+
+--- findexec.c.orig 2006-02-08 17:53:00.000000000 +0000
++++ findexec.c
+@@ -78,7 +78,7 @@ Wed Feb 21 23:06:35 1996 Aubrey Jaffer
+ # ifndef __STDC__
+ # define const /**/
+ # endif
+-# ifdef __FreeBSD__
++# if defined(__FreeBSD__) || defined(__DragonFly__)
+ /* This might be same for 44bsd derived system. */
+ # include <sys/types.h>
+ # include <sys/stat.h>
diff --git a/lang/scm/patches/patch-ae b/lang/scm/patches/patch-ae
new file mode 100644
index 00000000000..ad4efdba4bf
--- /dev/null
+++ b/lang/scm/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1 2006/02/19 17:50:11 joerg Exp $
+
+--- time.c.orig 2006-02-08 17:55:21.000000000 +0000
++++ time.c
+@@ -111,7 +111,7 @@
+ # include <sys/times.h>
+ # define USE_GETTIMEOFDAY
+ #endif
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ # include <sys/types.h>
+ # include <sys/time.h>
+ # include <sys/timeb.h>
diff --git a/lang/scm/patches/patch-af b/lang/scm/patches/patch-af
new file mode 100644
index 00000000000..1a64e4d01dc
--- /dev/null
+++ b/lang/scm/patches/patch-af
@@ -0,0 +1,40 @@
+$NetBSD: patch-af,v 1.1 2006/02/19 17:50:11 joerg Exp $
+
+--- scmmain.c.orig 2006-02-08 17:59:55.000000000 +0000
++++ scmmain.c
+@@ -43,7 +43,7 @@
+ Author: Aubrey Jaffer */
+
+ /* added by Dai Inukai 2001-03-21*/
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ # include <floatingpoint.h>
+ #endif
+
+@@ -114,7 +114,7 @@ int main(argc, argv)
+ int nargc, iverbose = 0, buf0stdin;
+ SCM retval;
+ /* added by Dai Inukai 2001-03-21 */
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ fp_prec_t fpspec;
+ #endif
+
+@@ -135,7 +135,7 @@ int main(argc, argv)
+ init_sbrk(); /* Do this before malloc()s. */
+ #endif
+ /* added by Dai Inukai 2001-03-21 */
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ fpspec = fpsetprec(FP_PE); /* IEEE 64 bit FP mantissa*/
+ #endif
+ execpath = 0; /* even when dumped */
+@@ -176,7 +176,7 @@ int main(argc, argv)
+ if (execpath) free(execpath);
+ execpath = 0;
+ /* added by Dai Inukai 2001-03-27 */
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__DragonFly__)
+ fpspec = fpsetprec(fpspec); /* Set back to FP_PD which is 53 bit FP. */
+ /* This may not be needed because the */
+ /* kernel is set to FP_PD by default. */
diff --git a/lang/scm/patches/patch-ag b/lang/scm/patches/patch-ag
new file mode 100644
index 00000000000..0b23cc4e2e9
--- /dev/null
+++ b/lang/scm/patches/patch-ag
@@ -0,0 +1,90 @@
+$NetBSD: patch-ag,v 1.1 2006/02/19 17:50:11 joerg Exp $
+
+--- build.scm.orig 2006-02-19 17:31:59.000000000 +0000
++++ build.scm
+@@ -483,6 +483,7 @@
+ (gnu-win32 i386 unix gcc ) ;gcc
+ (djgpp i386 ms-dos gcc ) ;gcc
+ (freebsd i386 unix cc ) ;cc
++ (dragonfly i386 unix cc ) ;cc
+ (gcc *unknown* unix gcc ) ;gcc
+ (highc i386 ms-dos hc386 ) ;bind386
+ (hp-ux hp-risc hp-ux cc ) ;cc
+@@ -647,6 +648,14 @@
+ (dlll freebsd "-DSUN_DL" "-export-dynamic" "" () ())
+ (nostart freebsd "" "-e start -dc -dp -Bstatic -lgnumalloc" #f ("pre-crt0.c") ())
+ (dump freebsd "" "/usr/lib/crt0.o" "" ("unexsunos4.c") ())
++ (c dragonfly "" "-export-dynamic" #f () ())
++ (m dragonfly "" "-lm" #f () ())
++ (curses dragonfly "" "-lncurses" "/usr/lib/libncurses.a" () ())
++ (regex dragonfly "-I/usr/include/gnu" "-lgnuregex" "" () ())
++ (editline dragonfly "" "-lreadline" "" () ())
++ (dlll dragonfly "-DSUN_DL" "-export-dynamic" "" () ())
++ (nostart dragonfly "" "-e start -dc -dp -Bstatic -lgnumalloc" #f ("pre-crt0.c") ())
++ (dump dragonfly "" "/usr/lib/crt0.o" "" ("unexsunos4.c") ())
+ (curses netbsd "-I/usr/pkg/include" "-lncurses" "-Wl,-rpath -Wl,/usr/pkg/lib -L/usr/pkg/lib" () ())
+ (editline netbsd "-I/usr/pkg/include" "-lreadline" "-Wl,-rpath -Wl,/usr/pkg/lib -L/usr/pkg/lib" () ())
+ (graphics netbsd "-I/usr/X11R6/include -DX11" "-lX11" "-Wl,-rpath -Wl,/usr/X11R6/lib -L/usr/X11R6/lib" () ())
+@@ -1626,6 +1635,62 @@
+ (car (parameter-list-ref parms 'implvic))
+ oname ".so"))))
+
++(defcommand compile-c-files dragonfly
++ (lambda (files parms)
++ (and (batch:try-chopped-command
++ parms
++;;; gcc 3.4.2 for FreeBSD does not allow options other than default i.e. -O0 if NO -DGCC_SPARC_BUG - dai 2004-10-30
++ ;;"cc" "-O3 -pipe -DGCC_SPARC_BUG " "-c"
++ "cc" "-O3 -pipe " "-c"
++ (c-includes parms)
++ (c-flags parms)
++ files)
++ (map c->o files))))
++(defcommand link-c-program dragonfly
++ (lambda (oname objects libs parms)
++ (batch:rename-file parms
++ oname (string-append oname "~"))
++ (and (batch:try-command parms
++ "cc" "-o" oname
++ (must-be-first
++ '("-nostartfiles"
++ "pre-crt0.o" "crt0.o"
++ "/usr/lib/crt0.o")
++ (append objects libs)))
++ oname)))
++(defcommand compile-dll-c-files dragonfly
++ (lambda (files parms)
++ (and (batch:try-chopped-command
++ parms "cc" "-O3 -pipe " "-fPIC" "-c"
++ (c-includes parms) (c-flags parms) files)
++ (let ((fnames (truncate-up-to (map c-> files) #\/)))
++ (and (batch:try-command
++ parms "cc" "-shared"
++ (cond
++ ((equal? (car fnames) "edline") "-lreadline")
++ ((equal? (car fnames) "x") "-L/usr/X11R6/lib -lSM -lICE -lXext -lX11 -lxpg4")
++ (else ""))
++ "-o" (string-append (car fnames) ".so")
++ (map (lambda (fname) (string-append fname ".o")) fnames))
++ (for-each (lambda (fname)
++ (batch:delete-file
++ parms (string-append fname ".o")))
++ fnames)
++ (list (string-append (car fnames) ".so")))))))
++(defcommand make-dll-archive dragonfly
++ (lambda (oname objects libs parms)
++ (and (batch:try-command
++ parms
++ "cc" "-shared" "-o"
++ (string-append
++ (car (parameter-list-ref parms 'implvic))
++ oname ".so")
++ objects)
++ (batch:rebuild-catalog parms)
++ (string-append
++ (car (parameter-list-ref parms 'implvic))
++ oname ".so"))))
++
+ (defcommand compile-c-files darwin
+ (lambda (files parms)
+ (and (batch:try-chopped-command
diff --git a/lang/scm/patches/patch-ah b/lang/scm/patches/patch-ah
new file mode 100644
index 00000000000..d71dab4f4ce
--- /dev/null
+++ b/lang/scm/patches/patch-ah
@@ -0,0 +1,14 @@
+$NetBSD: patch-ah,v 1.1 2006/02/19 17:50:11 joerg Exp $
+
+--- ioext.c.orig 2006-02-19 17:41:00.000000000 +0000
++++ ioext.c
+@@ -70,6 +70,9 @@ SCM stat2scm P((struct stat *stat_temp))
+ #ifdef __FreeBSD__
+ # include <unistd.h>
+ #endif
++#ifdef __DragonFly__
++# include <unistd.h>
++#endif
+ #ifdef __NetBSD__
+ # include <unistd.h>
+ #endif