From owner-freebsd-ports Sat Feb 12 14:51:42 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by builder.freebsd.org (Postfix) with ESMTP id 1A24A41B6 for ; Sat, 12 Feb 2000 14:50:06 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id OAA78649; Sat, 12 Feb 2000 14:50:08 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from mailgw3.prontomail.com (mailgw3.prontomail.com [209.185.149.199]) by builder.freebsd.org (Postfix) with ESMTP id E102F40E9 for ; Sat, 12 Feb 2000 14:47:57 -0800 (PST) Received: from mail46.prontomail.com (209.185.149.146) by mailgw3.prontomail.com (NPlex 2.0.123) for FreeBSD-gnats-submit@freebsd.org; Sat, 12 Feb 2000 14:36:32 -0800 Received: from web04 (209.185.149.204) by mail46.prontomail.com (NPlex 2.0.123) for FreeBSD-gnats-submit@freebsd.org; Sat, 12 Feb 2000 14:41:48 -0800 Message-Id: Date: Sun, 13 Feb 2000 07:41:57 +0900 From: tkato@prontomail.ne.jp To: FreeBSD-gnats-submit@freebsd.org Subject: ports/16677: Update port: lang/schemetoc Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 16677 >Category: ports >Synopsis: Update port: lang/schemetoc >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Feb 12 14:50:08 PST 2000 >Closed-Date: >Last-Modified: >Originator: KATO Tsuguru >Release: FreeBSD 3.4-RELEASE i386 >Organization: >Environment: >Description: - Convert to ELF - Support CC/CFLAGS/PREFIX properly New file: patches/patch-aa patches/patch-ab patches/patch-ac patches/patch-ad patches/patch-ae patches/patch-af patches/patch-ag patches/patch-ah patches/patch-ai patches/patch-aj Remove file: patches/patch-a patches/patch-b patches/patch-c patches/patch-d patches/patch-e patches/patch-f patches/patch-h >How-To-Repeat: >Fix: diff -urN /usr/ports/lang/schemetoc/Makefile lang/schemetoc/Makefile --- /usr/ports/lang/schemetoc/Makefile Tue Aug 31 19:15:51 1999 +++ lang/schemetoc/Makefile Thu Feb 3 05:51:41 2000 @@ -1,25 +1,38 @@ -# New ports collection makefile for: Scheme-to-C -# Version required: 15mar93 -# Date created: 28 Dec 1994 -# Whom: jmacd@uclink.berkeley.edu +# New ports collection makefile for: Scheme-to-C +# Version required: 15mar93 +# Date created: 28 Dec 1994 +# Whom: jmacd@uclink.berkeley.edu # # $FreeBSD: ports/lang/schemetoc/Makefile,v 1.14 1999/08/31 06:47:03 mharo Exp $ # -DISTNAME= schemetoc-93.3.15 -PKGNAME= schemetoc-93.3.15 +DISTNAME= 15mar93 +PKGNAME= schemetoc-93.3.15 CATEGORIES= lang MASTER_SITES= ftp://gatekeeper.dec.com/pub/DEC/Scheme-to-C/ -DISTFILES= 15mar93.tar.Z +EXTRACT_SUFX= .tar.Z MAINTAINER= jmacd@FreeBSD.org -BROKEN_ELF= yes - USE_XLIB= yes NO_WRKSUBDIR= yes +MAN1= scc.1 sci.1 + +post-extract: + @${CP} ${FILESDIR}/Makefile ${WRKSRC} + @${CP} ${FILESDIR}/README.FreeBSD ${WRKSRC} + @${MV} ${WRKDIR}/scsc/main.c ${WRKSRC}/scsc/main.c.orig + @${CP} ${FILESDIR}/main.c ${WRKSRC}/scsc/main.c + @${MKDIR} ${WRKDIR}/ports/FREEBSD +.for file in makefile-head options-server.h options.h x86.s + @${CP} ${FILESDIR}/${file} ${WRKSRC}/ports/FREEBSD +.endfor + +post-patch: + @${PERL} -pi -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/scsc/*.sc + @${PERL} -pi -e 's|%%X11BASE%%|${X11BASE}|g' ${WRKSRC}/scsc/*.sc post-install: - ${LDCONFIG} -m ${PREFIX}/lib + ${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/lib .include diff -urN /usr/ports/lang/schemetoc/files/Makefile lang/schemetoc/files/Makefile --- /usr/ports/lang/schemetoc/files/Makefile Mon Jan 30 18:39:01 1995 +++ lang/schemetoc/files/Makefile Thu Feb 3 03:58:08 2000 @@ -6,32 +6,28 @@ SCHEME_DIR = ${LIB_DIR}/schemetoc all: - make -f makefile forFREEBSD - (cd FREEBSD;make port) - (cd FREEBSD/cdecl; make all) - (cd FREEBSD/xlib; make all) + ${MAKE} -f makefile forFREEBSD + (cd FREEBSD; ${MAKE} port) + (cd FREEBSD/cdecl; ${MAKE} all) + (cd FREEBSD/xlib; ${MAKE} all) install: mkdir -p ${SCHEME_DIR}/doc - (cd FREEBSD/scrt; make "LIBDIR = ${LIB_DIR}" \ + (cd FREEBSD/scrt; ${MAKE} "LIBDIR = ${LIB_DIR}" \ "BINDIR = ${BIN_DIR}" install) - (cd FREEBSD/scsc; make "LIBDIR = ${LIB_DIR}" \ + (cd FREEBSD/scsc; ${MAKE} "LIBDIR = ${LIB_DIR}" \ "BINDIR = ${BIN_DIR}" install) - (cd FREEBSD/xlib; make "LIBDIR = ${LIB_DIR}" \ + (cd FREEBSD/xlib; ${MAKE} "LIBDIR = ${LIB_DIR}" \ "BINDIR = ${BIN_DIR}" install) - (cd doc; install -c -m 444 index.psf \ + (cd doc; ${BSD_INSTALL_DATA} index.psf \ embedded.psf \ intro.psf \ r4rs.psf \ smithnotes.psf \ ${SCHEME_DIR}/doc) - cp test/test51.sc ${SCHEME_DIR}/doc/test.sc - cp xlib/hello.sc ${SCHEME_DIR}/doc - cp xlib/puzzle.sc ${SCHEME_DIR}/doc - cp README.FreeBSD ${SCHEME_DIR}/doc - cp doc/scc.l ${MAN_DIR}/scc.1 - cp doc/sci.l ${MAN_DIR}/sci.1 - gzip -f ${MAN_DIR}/sci.1 ${MAN_DIR}/scc.1 - chmod 444 ${LIB_DIR}/libsc.so.1.0 ${LIB_DIR}/libscxl.so.1.0 - chown -R bin:bin ${SCHEME_DIR} - strip ${BIN_DIR}/sccomp ${BIN_DIR}/sci ${BIN_DIR}/scixl + ${BSD_INSTALL_DATA} test/test51.sc ${SCHEME_DIR}/doc/test.sc + ${BSD_INSTALL_DATA} xlib/hello.sc ${SCHEME_DIR}/doc + ${BSD_INSTALL_DATA} xlib/puzzle.sc ${SCHEME_DIR}/doc + ${BSD_INSTALL_DATA} README.FreeBSD ${SCHEME_DIR}/doc + ${BSD_INSTALL_DATA} doc/scc.l ${MAN_DIR}/scc.1 + ${BSD_INSTALL_DATA} doc/sci.l ${MAN_DIR}/sci.1 diff -urN /usr/ports/lang/schemetoc/files/README.FreeBSD lang/schemetoc/files/README.FreeBSD --- /usr/ports/lang/schemetoc/files/README.FreeBSD Mon Jan 30 18:39:03 1995 +++ lang/schemetoc/files/README.FreeBSD Sat Feb 5 09:39:53 2000 @@ -4,7 +4,7 @@ was very limited and as a result I'm not sure if I've got it right. Instead of using having the compiler link the library archives libsc.a (the standard schemetoc library) or scxl.a (the x library), two shared -libraries are included, libsc.so.1.0 and libscxl.so.1.0. +libraries are included, libsc.so.1 and libscxl.so.1. The syntax of the scc compiler has been extended to automatically use dynamic linking unless the -static flag is specified on the scc @@ -22,8 +22,8 @@ Those not wishing to use the X library support can delete the following files: -libscxl.so.1.0 The shared lib. -schemetoc/scxl.a The library archive. +libscxl.so.1 The shared lib. +schemetoc/libscxl.a The library archive. bin/scixl The X lib interpreter. Each is about 1.4 megabytes. diff -urN /usr/ports/lang/schemetoc/files/makefile-head lang/schemetoc/files/makefile-head --- /usr/ports/lang/schemetoc/files/makefile-head Fri Mar 31 06:36:35 1995 +++ lang/schemetoc/files/makefile-head Thu Feb 3 05:46:07 2000 @@ -4,8 +4,8 @@ # Default flags to use when invoking the C compiler. -CFLAGS = -O2 -CC = gcc +CFLAGS ?= -O2 +CC ?= gcc # Assembly language object files. @@ -24,7 +24,7 @@ # X library -XLIB = -L/usr/X11R6/lib -lX11 +XLIB = -L${X11BASE}/lib -lX11 XLIBCFLAGS = PICFLAGS = -fpic -DPIC diff -urN /usr/ports/lang/schemetoc/files/x86.s lang/schemetoc/files/x86.s --- /usr/ports/lang/schemetoc/files/x86.s Fri Dec 30 08:35:46 1994 +++ lang/schemetoc/files/x86.s Thu Feb 3 04:53:46 2000 @@ -13,9 +13,9 @@ #else .align 2 #endif -.globl _sc_geti386regs +.globl sc_geti386regs -_sc_geti386regs: +sc_geti386regs: pushl %ebp movl %esp,%ebp pushl %ecx diff -urN /usr/ports/lang/schemetoc/patches/patch-a lang/schemetoc/patches/patch-a --- /usr/ports/lang/schemetoc/patches/patch-a Fri Dec 30 08:35:47 1994 +++ lang/schemetoc/patches/patch-a Thu Jan 1 09:00:00 1970 @@ -1,223 +0,0 @@ -*** scrt/cio.c.ORIG Tue Feb 23 18:26:41 1993 ---- scrt/cio.c Tue Jun 28 14:33:50 1994 -*************** -*** 143,148 **** ---- 143,152 ---- - #define HAVE_RUSAGE - #endif - -+ #ifdef FREEBSD -+ #define HAVE_RUSAGE -+ #endif -+ - #ifdef SYSV - #define HAVE_TIMES - #else -*************** -*** 467,473 **** ---- 471,481 ---- - struct timeval timeout; - - stream = (FILE*)TSCP_POINTER( file ); -+ #ifdef FREEBSD -+ if (((stream)->_r) <= 0) { -+ #else - if (((stream)->_cnt) <= 0) { -+ #endif - FD_ZERO( &readfds ); - FD_SET( fileno( stream ), &readfds ); - timeout.tv_sec = 0; -*************** -*** 549,555 **** - break; - - case 3: -! #ifdef MAC - sprintf( format, "%%.%lilg", (long)TSCP_S2CINT( length ) ); - sprintf( buffer, format, TSCP_DOUBLE( number ) ); - #else ---- 557,563 ---- - break; - - case 3: -! #if defined(MAC) || defined(FREEBSD) - sprintf( format, "%%.%lilg", (long)TSCP_S2CINT( length ) ); - sprintf( buffer, format, TSCP_DOUBLE( number ) ); - #else -*** scrt/heap.c.ORIG Mon Feb 22 11:11:16 1993 ---- scrt/heap.c Mon Jun 27 23:26:15 1994 -*************** -*** 66,71 **** ---- 66,74 ---- - #ifdef VAX - extern sc_r2tor11( ); - #endif -+ #ifdef FREEBSD -+ extern sc_geti386regs( S2CINT* a ); -+ #endif - - /* Forward declarations */ - -*************** -*** 368,373 **** ---- 371,401 ---- - S2CINT r2tor11[10], *pp; - - sc_r2tor11( r2tor11 ); -+ STACKPTR( pp ); -+ while (pp != sc_stackbase) move_continuation_ptr( ((SCP)*pp++) ); -+ } -+ #endif -+ -+ #ifdef FREEBSD -+ /* The following code is used to read the stack pointer. The register -+ number is passed in to force an argument to be on the stack, which in -+ turn can be used to find the address of the top of stack. -+ */ -+ -+ S2CINT *sc_processor_register( S2CINT reg ) -+ { -+ return( ® ); -+ } -+ -+ /* All processor registers which might contain pointers are traced by the -+ following procedure. -+ */ -+ -+ static trace_stack_and_registers() -+ { -+ S2CINT i386regs[6], *pp; -+ -+ sc_geti386regs( i386regs ); - STACKPTR( pp ); - while (pp != sc_stackbase) move_continuation_ptr( ((SCP)*pp++) ); - } -*** scrt/options.h.ORIG Mon Feb 22 11:14:23 1993 ---- scrt/options.h Tue Jun 28 15:25:37 1994 -*************** -*** 71,76 **** ---- 71,77 ---- - MC680X0 HP 9000/300, Sun 3, Next - MIPS DECstation, SGI, Sony News - VAX Vax ULTRIX -+ FREEBSD x86 FreeBSD - WIN16 Microsoft Windows 3.1 - */ - -*************** -*** 80,85 **** ---- 81,87 ---- - #define MC680X0 1 - #define MIPS 1 - #define VAX 1 -+ #define FREEBSD 1 - #define WIN16 1 - - /* Attributes of the selected architecture: -*************** -*** 369,374 **** ---- 371,404 ---- - */ - - #define STACKPTR( x ) x = sc_processor_register( 14 ) -+ #endif -+ -+ /***************/ -+ /* FREEBSD */ -+ /***************/ -+ -+ #ifdef FREEBSD -+ #define IMPLEMENTATION_MACHINE "Generic PC" -+ #define IMPLEMENTATION_CPU "Intelx86" -+ #define IMPLEMENTATION_OS "FreeBSD" -+ #undef IMPLEMENTATION_FS -+ -+ typedef int S2CINT; /* Signed pointer size integer */ -+ typedef unsigned S2CUINT; /* Unsigned pointer size interger */ -+ -+ typedef int PAGELINK; /* 32-bit sc_pagelink values */ -+ #define MAXS2CINT 0x7fffffff /* Maximum value of an S2CINT */ -+ #define MSBS2CUINT 0x80000000 /* S2CUINT with 1 in the MSB */ -+ -+ #define STACKPTR( x ) x = sc_processor_register( 0 ) -+ -+ #include -+ typedef jmp_buf sc_jmp_buf; -+ -+ /* Horrid kludge. See callcc.c for the full story: */ -+ #define LAZY_STACK_POP 1 -+ #define LAZY_STACK_INCREMENT 4 -+ - #endif - - /***************/ -*** scrt/callcc.c.ORIG Tue Feb 23 18:25:24 1993 ---- scrt/callcc.c Tue Jun 28 03:25:04 1994 -*************** -*** 91,96 **** ---- 91,101 ---- - #define SETJMP( x ) sc_setjmp( x ) - #endif - -+ #ifdef FREEBSD -+ #define LONGJMP( x, y ) longjmp( x, y ) -+ #define SETJMP( x ) setjmp( x ) -+ #endif -+ - TSCP sc_clink; /* Pointer to inner most continuation on stack. */ - - /* Static declarations for data structures internal to the module. These -*************** -*** 192,197 **** ---- 197,213 ---- - STACKPTR( tos ); - count = (((STACK_BYTES (bfp, tos)) + ((sizeof (S2CINT)) - 1)) - / (sizeof (S2CINT))); -+ #ifdef LAZY_STACK_POP -+ /* NOTE WELL! -+ * For machines that must pop arguments after a function call, -+ * the compiler may let arguments accumulate on the stack for several -+ * function calls and pop them all at once. -+ * If your compiler uses this optimization, 'count' must be incremented -+ * by the number of S2CINTs pushed as arguments between this point and -+ * the point where 'bcount' is computed. -+ */ -+ count += LAZY_STACK_INCREMENT; -+ #endif - save_fp = (S2CINT*)bfp; - cp = sc_allocateheap( NULLCONTINUATIONSIZE+count+2+sc_maxdisplay, - CONTINUATIONTAG, -*************** -*** 199,204 **** ---- 215,227 ---- - STACKPTR( tos ); - fp = save_fp; - bcount = (STACK_BYTES (fp, tos)); -+ if (bcount > count*sizeof(S2CINT)) -+ /* If you get this error, look above at LAZY_STACK_POP */ -+ sc_error( "CALL-WITH-CURRENT-CONTINUATION", -+ "internal error: want to write ~s bytes of stack, " -+ "but only ~s bytes allocated.", -+ LIST2( C_FIXED( bcount ), -+ C_FIXED( count*sizeof(S2CINT) ) ) ); - cp->continuation.continuation = sc_clink; - cp->continuation.stackbytes = bcount; - cp->continuation.stacktrace = sc_stacktrace; -*** makefile.ORIG Tue Feb 16 14:19:52 1993 ---- makefile Mon Jun 27 22:52:48 1994 -*************** -*** 92,97 **** ---- 92,104 ---- - cp ports/VAX/vax.s VAX/server - cp ports/VAX/options-server.h VAX/server/options.h - -+ forFREEBSD: -+ make "CPU=FREEBSD" forANY -+ cp ports/FREEBSD/x86.s FREEBSD/scrt -+ cp ports/FREEBSD/options.h FREEBSD/scrt -+ cp ports/FREEBSD/x86.s FREEBSD/server -+ cp ports/FREEBSD/options-server.h FREEBSD/server/options.h -+ - forWIN16: - make "CPU=WIN16" forANY - rm -r WIN16/scsc diff -urN /usr/ports/lang/schemetoc/patches/patch-aa lang/schemetoc/patches/patch-aa --- /usr/ports/lang/schemetoc/patches/patch-aa Thu Jan 1 09:00:00 1970 +++ lang/schemetoc/patches/patch-aa Thu Feb 3 20:47:09 2000 @@ -0,0 +1,16 @@ +--- makefile.orig Wed Feb 17 04:20:09 1993 ++++ makefile Wed Feb 2 22:22:22 2000 +@@ -92,6 +92,13 @@ + cp ports/VAX/vax.s VAX/server + cp ports/VAX/options-server.h VAX/server/options.h + ++forFREEBSD: ++ make "CPU=FREEBSD" forANY ++ cp ports/FREEBSD/x86.s FREEBSD/scrt ++ cp ports/FREEBSD/options.h FREEBSD/scrt ++ cp ports/FREEBSD/x86.s FREEBSD/server ++ cp ports/FREEBSD/options-server.h FREEBSD/server/options.h ++ + forWIN16: + make "CPU=WIN16" forANY + rm -r WIN16/scsc diff -urN /usr/ports/lang/schemetoc/patches/patch-ab lang/schemetoc/patches/patch-ab --- /usr/ports/lang/schemetoc/patches/patch-ab Thu Jan 1 09:00:00 1970 +++ lang/schemetoc/patches/patch-ab Thu Feb 3 20:47:09 2000 @@ -0,0 +1,14 @@ +--- doc/scc.l.orig Tue Jan 12 10:43:14 1993 ++++ doc/scc.l Wed Feb 2 22:22:22 2000 +@@ -66,6 +66,11 @@ + .B -Ot + Optimize code by omitting type error checks. + .TP 18 ++.B -static ++Use static linking instead of shared libraries. This will result in an executable ++which is about 300k larger than the dynamic executable. For xlib programs the ++executable will be about 1400k larger. ++.TP 18 + .B -pg + Produce profiled code for run-time measurement using + .I gprof(1). diff -urN /usr/ports/lang/schemetoc/patches/patch-ac lang/schemetoc/patches/patch-ac --- /usr/ports/lang/schemetoc/patches/patch-ac Thu Jan 1 09:00:00 1970 +++ lang/schemetoc/patches/patch-ac Thu Feb 3 20:47:09 2000 @@ -0,0 +1,46 @@ +--- scrt/callcc.c.orig Wed Feb 24 08:25:41 1993 ++++ scrt/callcc.c Wed Feb 2 22:22:22 2000 +@@ -91,6 +91,11 @@ + #define SETJMP( x ) sc_setjmp( x ) + #endif + ++#ifdef FREEBSD ++#define LONGJMP( x, y ) longjmp( x, y ) ++#define SETJMP( x ) setjmp( x ) ++#endif ++ + TSCP sc_clink; /* Pointer to inner most continuation on stack. */ + + /* Static declarations for data structures internal to the module. These +@@ -192,6 +197,17 @@ + STACKPTR( tos ); + count = (((STACK_BYTES (bfp, tos)) + ((sizeof (S2CINT)) - 1)) + / (sizeof (S2CINT))); ++#ifdef LAZY_STACK_POP ++ /* NOTE WELL! ++ * For machines that must pop arguments after a function call, ++ * the compiler may let arguments accumulate on the stack for several ++ * function calls and pop them all at once. ++ * If your compiler uses this optimization, 'count' must be incremented ++ * by the number of S2CINTs pushed as arguments between this point and ++ * the point where 'bcount' is computed. ++ */ ++ count += LAZY_STACK_INCREMENT; ++#endif + save_fp = (S2CINT*)bfp; + cp = sc_allocateheap( NULLCONTINUATIONSIZE+count+2+sc_maxdisplay, + CONTINUATIONTAG, +@@ -199,6 +215,13 @@ + STACKPTR( tos ); + fp = save_fp; + bcount = (STACK_BYTES (fp, tos)); ++ if (bcount > count*sizeof(S2CINT)) ++ /* If you get this error, look above at LAZY_STACK_POP */ ++ sc_error( "CALL-WITH-CURRENT-CONTINUATION", ++ "internal error: want to write ~s bytes of stack, " ++ "but only ~s bytes allocated.", ++ LIST2( C_FIXED( bcount ), ++ C_FIXED( count*sizeof(S2CINT) ) ) ); + cp->continuation.continuation = sc_clink; + cp->continuation.stackbytes = bcount; + cp->continuation.stacktrace = sc_stacktrace; diff -urN /usr/ports/lang/schemetoc/patches/patch-ad lang/schemetoc/patches/patch-ad --- /usr/ports/lang/schemetoc/patches/patch-ad Thu Jan 1 09:00:00 1970 +++ lang/schemetoc/patches/patch-ad Thu Feb 3 20:47:09 2000 @@ -0,0 +1,34 @@ +--- scrt/cio.c.orig Wed Feb 24 08:26:58 1993 ++++ scrt/cio.c Wed Feb 2 22:22:22 2000 +@@ -143,6 +143,10 @@ + #define HAVE_RUSAGE + #endif + ++#ifdef FREEBSD ++#define HAVE_RUSAGE ++#endif ++ + #ifdef SYSV + #define HAVE_TIMES + #else +@@ -467,7 +471,11 @@ + struct timeval timeout; + + stream = (FILE*)TSCP_POINTER( file ); ++#ifdef FREEBSD ++ if (((stream)->_r) <= 0) { ++#else + if (((stream)->_cnt) <= 0) { ++#endif + FD_ZERO( &readfds ); + FD_SET( fileno( stream ), &readfds ); + timeout.tv_sec = 0; +@@ -549,7 +557,7 @@ + break; + + case 3: +-#ifdef MAC ++#if defined(MAC) || defined(FREEBSD) + sprintf( format, "%%.%lilg", (long)TSCP_S2CINT( length ) ); + sprintf( buffer, format, TSCP_DOUBLE( number ) ); + #else diff -urN /usr/ports/lang/schemetoc/patches/patch-ae lang/schemetoc/patches/patch-ae --- /usr/ports/lang/schemetoc/patches/patch-ae Thu Jan 1 09:00:00 1970 +++ lang/schemetoc/patches/patch-ae Thu Feb 3 20:47:09 2000 @@ -0,0 +1,44 @@ +--- scrt/heap.c.orig Tue Feb 23 01:11:33 1993 ++++ scrt/heap.c Wed Feb 2 22:22:22 2000 +@@ -66,6 +66,9 @@ + #ifdef VAX + extern sc_r2tor11( ); + #endif ++#ifdef FREEBSD ++extern sc_geti386regs( S2CINT* a ); ++#endif + + /* Forward declarations */ + +@@ -368,6 +371,31 @@ + S2CINT r2tor11[10], *pp; + + sc_r2tor11( r2tor11 ); ++ STACKPTR( pp ); ++ while (pp != sc_stackbase) move_continuation_ptr( ((SCP)*pp++) ); ++} ++#endif ++ ++#ifdef FREEBSD ++/* The following code is used to read the stack pointer. The register ++ number is passed in to force an argument to be on the stack, which in ++ turn can be used to find the address of the top of stack. ++*/ ++ ++S2CINT *sc_processor_register( S2CINT reg ) ++{ ++ return( ® ); ++} ++ ++/* All processor registers which might contain pointers are traced by the ++ following procedure. ++*/ ++ ++static trace_stack_and_registers() ++{ ++ S2CINT i386regs[6], *pp; ++ ++ sc_geti386regs( i386regs ); + STACKPTR( pp ); + while (pp != sc_stackbase) move_continuation_ptr( ((SCP)*pp++) ); + } diff -urN /usr/ports/lang/schemetoc/patches/patch-af lang/schemetoc/patches/patch-af --- /usr/ports/lang/schemetoc/patches/patch-af Thu Jan 1 09:00:00 1970 +++ lang/schemetoc/patches/patch-af Fri Feb 4 05:51:52 2000 @@ -0,0 +1,131 @@ +--- scrt/makefile.orig Wed Feb 17 10:55:48 1993 ++++ scrt/makefile Wed Feb 2 22:22:22 2000 +@@ -5,7 +5,9 @@ + # + + .SUFFIXES: +-.SUFFIXES: .o .c .sc .s ++.SUFFIXES: .o .c .sc .s .so ++ ++SOVER = 1 + + SCC = ../scsc/scc + SCCFLAGS = +@@ -14,6 +16,8 @@ + + Cruntime = scinit.o apply.o callcc.o cio.o heap.o objects.o mtraps.o + ++SCruntime = scinit.so apply.so callcc.so cio.so heap.so objects.so mtraps.so ++ + Cruntimec = scinit.c apply.c callcc.c cio.c heap.c objects.c mtraps.c + + Chfiles = scinit.h apply.h callcc.h cio.h heap.h objects.h options.h +@@ -22,6 +26,11 @@ + scqquote.o screp.o \ + scrt1.o scrt2.o scrt3.o scrt4.o scrt5.o scrt6.o scrt7.o scrtuser.o + ++SSruntime = scdebug.so sceval.so scexpand.so scexpnd1.so scexpnd2.so \ ++ scqquote.so screp.so \ ++ scrt1.so scrt2.so scrt3.so scrt4.so scrt5.so scrt6.so scrt7.so \ ++ scrtuser.so ++ + Sruntimec = scdebug.c sceval.c scexpand.c scexpnd1.c scexpnd2.c \ + scqquote.c screp.c \ + scrt1.c scrt2.c scrt3.c scrt4.c scrt5.c scrt6.c scrt7.c scrtuser.c +@@ -43,17 +52,27 @@ + ${SCC} -C ${SCCFLAGS} $*.sc + + .c.o: +- ${CC} -c ${CFLAGS} -I. $*.c ++ ${CC} ${CFLAGS} -c ${.IMPSRC} -I. -o ${.TARGET} ++ ++.c.so: ++ ${CC} ${PICFLAGS} ${CFLAGS} -c ${.IMPSRC} -I. -o ${.TARGET} + + .s.o: + ${CC} -c $*.s + ++.s.so: ++ ${CPP} -E -DPIC ${CFLAGS:M-[ID]*} ${.IMPSRC} | \ ++ ${AS} -k -o ${.TARGET} ++ + sc-to-c: ${Sruntimec} sci.c + + c-to-o: ${Sruntimec} ${Sruntime} ${Cruntime} + + s-to-o: ${Aruntime} + ++OBJS = ${Sruntime} ${Cruntime} ${Aruntime} ++SHAREDOBJS = ${OBJS:.o=.so} ++ + Xlibsc.a: ${Sruntimec} ${Sruntime} ${Cruntime} ${Aruntime} + rm -f Xlibsc.a + ar q Xlibsc.a ${Cruntime} ${Sruntime} ${Aruntime} +@@ -75,36 +94,42 @@ + Xmv: Xsci Xlibsc.a + mv Xsci sci + mv Xlibsc.a libsc.a +- ++ + port: +- make "CC = ${CC}" "CFLAGS = ${CFLAGS}" "SCC = echo" \ +- Xlibsc.a Xsci Xmv ${Plib} ++ ${MAKE} "CC = ${CC}" "CFLAGS = ${CFLAGS}" "SCC = echo" \ ++ Xlibsc.a Xsci Xmv ${Plib} libsc.so.${SOVER} + + libsc_p.a: libsc.a + mkdir saveobj + mv ${Sruntime} ${Cruntime} ${Aruntime} saveobj + rm -f libsc_p.a +- make "CC = ${CC}" "CFLAGS = ${CFLAGS} -pg" ${Sruntime} ${Cruntime} \ ++ ${MAKE} "CC = ${CC}" "CFLAGS = ${CFLAGS} -pg" ${Sruntime} ${Cruntime} \ + ${Aruntime} + ar q libsc_p.a ${Cruntime} ${Sruntime} ${Aruntime} + ${RANLIB} libsc_p.a + mv saveobj/* . + rmdir saveobj + ++libsc.so.${SOVER}: ${SCruntime} ${SSruntime} ${SAruntime} ++ rm -f libsc.so.${SOVER} ++ ${CC} -shared -Wl,-x -Wl,-assert -Wl,pure-text -Wl,-soname,$@ -o $@ \ ++ ${SCruntime} ${SSruntime} ${SAruntime} ++ + install-private: +- make "LIBDIR = ${DESTDIR}" "BINDIR = ${DESTDIR}" \ ++ ${MAKE} "LIBDIR = ${DESTDIR}" "BINDIR = ${DESTDIR}" \ + "OWNER = -o `whoami`" install + + install: +- -mkdir ${LIBDIR}/schemetoc +- cp libsc.a ${LIBDIR}/schemetoc/libsc.a +- ${RANLIB} ${LIBDIR}/schemetoc/libsc.a +- -cp libsc_p.a ${LIBDIR}/schemetoc/libsc_p.a +- -${RANLIB} ${LIBDIR}/schemetoc/libsc_p.a +- cp objects.h ${LIBDIR}/schemetoc +- cp options.h ${LIBDIR}/schemetoc +- cp predef.sc ${LIBDIR}/schemetoc +- cp sci ${BINDIR}/sci ++ ${BSD_INSTALL_DATA} libsc.a ${LIBDIR} ++ -${RANLIB} ${LIBDIR}/libsc.a ++ ${BSD_INSTALL_DATA} libsc_p.a ${LIBDIR} ++ -${RANLIB} ${LIBDIR}/libsc_p.a ++ ${BSD_INSTALL_DATA} objects.h ${LIBDIR}/schemetoc ++ ${BSD_INSTALL_DATA} options.h ${LIBDIR}/schemetoc ++ ${BSD_INSTALL_DATA} predef.sc ${LIBDIR}/schemetoc ++ ${BSD_INSTALL_PROGRAM} sci ${BINDIR} ++ ${BSD_INSTALL_DATA} libsc.so.${SOVER} ${LIBDIR} ++ ln -sf libsc.so.${SOVER} ${LIBDIR}/libsc.so + + clean: + rm -f ${Sruntime} ${Cruntime} ${Aruntime} sci.o embedded.o \ +@@ -124,8 +149,8 @@ + libsc.a ${Plib} sci ${destdir} + + all: +- make "CC = ${CC}" "CFLAGS = ${CFLAGS}" "SCC = ${SCC}" \ +- "SCCFLAGS = ${SCCFLAGS}" Xlibsc.a Xsci Xmv ${Plib} ++ ${MAKE} "CC = ${CC}" "CFLAGS = ${CFLAGS}" "SCC = ${SCC}" \ ++ "SCCFLAGS = ${SCCFLAGS}" Xlibsc.a Xsci Xmv ${Plib} libsc.so.${SOVER} + + srclinks: + for x in ${Cruntimec} ${Chfiles} ${Sruntimec} ${Sruntimesc} ${Smisc}; \ diff -urN /usr/ports/lang/schemetoc/patches/patch-ag lang/schemetoc/patches/patch-ag --- /usr/ports/lang/schemetoc/patches/patch-ag Thu Jan 1 09:00:00 1970 +++ lang/schemetoc/patches/patch-ag Thu Feb 3 20:47:09 2000 @@ -0,0 +1,53 @@ +--- scrt/options.h.orig Tue Feb 23 01:14:40 1993 ++++ scrt/options.h Wed Feb 2 22:22:22 2000 +@@ -71,6 +71,7 @@ + MC680X0 HP 9000/300, Sun 3, Next + MIPS DECstation, SGI, Sony News + VAX Vax ULTRIX ++ FREEBSD x86 FreeBSD + WIN16 Microsoft Windows 3.1 + */ + +@@ -80,6 +81,7 @@ + #define MC680X0 1 + #define MIPS 1 + #define VAX 1 ++#define FREEBSD 1 + #define WIN16 1 + + /* Attributes of the selected architecture: +@@ -369,6 +371,34 @@ + */ + + #define STACKPTR( x ) x = sc_processor_register( 14 ) ++#endif ++ ++/***************/ ++/* FREEBSD */ ++/***************/ ++ ++#ifdef FREEBSD ++#define IMPLEMENTATION_MACHINE "Generic PC" ++#define IMPLEMENTATION_CPU "Intelx86" ++#define IMPLEMENTATION_OS "FreeBSD" ++#undef IMPLEMENTATION_FS ++ ++typedef int S2CINT; /* Signed pointer size integer */ ++typedef unsigned S2CUINT; /* Unsigned pointer size interger */ ++ ++typedef int PAGELINK; /* 32-bit sc_pagelink values */ ++#define MAXS2CINT 0x7fffffff /* Maximum value of an S2CINT */ ++#define MSBS2CUINT 0x80000000 /* S2CUINT with 1 in the MSB */ ++ ++#define STACKPTR( x ) x = sc_processor_register( 0 ) ++ ++#include ++typedef jmp_buf sc_jmp_buf; ++ ++/* Horrid kludge. See callcc.c for the full story: */ ++#define LAZY_STACK_POP 1 ++#define LAZY_STACK_INCREMENT 4 ++ + #endif + + /***************/ diff -urN /usr/ports/lang/schemetoc/patches/patch-ah lang/schemetoc/patches/patch-ah --- /usr/ports/lang/schemetoc/patches/patch-ah Thu Jan 1 09:00:00 1970 +++ lang/schemetoc/patches/patch-ah Fri Feb 4 02:50:01 2000 @@ -0,0 +1,126 @@ +--- scsc/main.sc.orig Tue Feb 23 00:59:07 1993 ++++ scsc/main.sc Wed Feb 2 22:22:22 2000 +@@ -59,7 +59,9 @@ + readtext + transform)) + +-(define SCC-VERSION "15mar93jfb") ++(define scheme_dir "%%PREFIX%%/lib/schemetoc/") ++ ++(define SCC-VERSION "15mar93-FreeBSD") + ; Compiler version string. + + (define FORCE-LD-OF-REP read-eval-print) +@@ -69,23 +71,28 @@ + ;;; The following top-level variables define the implementation dependent + ;;; information: + +-(define PREDEF-DEFAULT "../scrt/predef.sc") ++(define PREDEF-DEFAULT (string-append scheme_dir "predef.sc")) ++ + ; File holding the declarations for predefined + ; functions. + + (define C-INCLUDE-FILE "objects.h") + ; #include file for the predefined functions. + +-(define C-INCLUDE-DIR "../scrt") ++(define C-INCLUDE-DIR scheme_dir) + ; directory containing #include file for + ; predefined functions. + +-(define SC-LIBRARY "../scrt/libsc.a") ++(define SC-LIBRARY (string-append scheme_dir "libsc.a")) + ; Scheme->C library file. + +-(define SC-LIBRARY_P "../scrt/libsc_p.a") ++(define SCXL-LIBRARY (string-append scheme_dir "scxl.a")) ++ ++(define SC-LIBRARY_P (string-append scheme_dir "libsc_p.a")) + ; Scheme->C profiled library file. + ++(define compile-static #f) ++ + ;;; When the compiler is invoked directly from the shell, the following + ;;; function is invoked to control compilation. It will interprete the flags, + ;;; invoke the compiler and then exit. Any compilation errors or Scheme errors +@@ -123,6 +130,8 @@ + ;;; + ;;; -Ot optimize C code by omitting type checks. + ;;; ++;;; -static compile static executable. ++;;; + ;;; -pg compile for gprof profiling. + ;;; + ;;; -LIBDIR directory +@@ -161,13 +170,9 @@ + (c-flags '()) + (sc-to-c.c "SC-TO-C.c") + (sc-to-c.o "SC-TO-C.o") +- (directory-separator +- (if (equal? (list-ref (implementation-information) 5) +- "Microsoft Windows 3.x") +- "\\" +- "/")) ++ (directory-separator "/") + (log '()) +- (cc "cc")) ++ (cc "gcc")) + + ;;; 1. Pick up the command line arguments. + +@@ -233,6 +238,9 @@ + (cons "(define-constant *type-check* #f)" + flags)) + (loop (cdr args))) ++ ((equal? arg "-static") ++ (set! compile-static #t) ++ (loop (cdr args))) + ((equal? arg "-Ob") + (set! flags + (cons "(define-constant *bounds-check* #f)" +@@ -295,20 +303,27 @@ + ;;; C compiler to do the rest. + + (unless (eq? 0 +- (system (apply string-append +- `(,cc " -I" ,c-include-dir +- ,@(map (lambda (x) +- (string-append " " x)) +- (append (reverse c-flags) +- (if (member "-pg" +- c-flags) +- `(,sc-library_p +- "-lm") +- `(,sc-library +- "-lm")))))))) ++ (system (apply string-append ++ `(,cc " -I" ,c-include-dir ++ ,@(map (lambda (x) ++ (string-append " " x)) ++ (append (reverse c-flags) ++ (if compile-static ++ (if (member "-pg" c-flags) ++ (list sc-library_p "-lm") ++ (if (member "-c" c-flags) ++ '() ++ (if (member "xlib" with-modules) ++ (list "-lm" sc-library scxl-library "-L%%X11BASE%%/lib -lX11") ++ (list "-lm" sc-library)))) ++ (if (member "-c" c-flags) ++ '() ++ (if (member "xlib" with-modules) ++ (list "-L%%X11BASE%%/lib -lm -lsc -lscxl -lX11") ++ (list "-lm -lsc")))))))))) + (reset)) + (catch-error +- (lambda () ++ (lambda () + (remove-file sc-to-c.c) + (remove-file sc-to-c.o))))) + +@@ -351,3 +366,4 @@ + root.c) + ;;; Pass argument to C. + (else arg)))) ++ diff -urN /usr/ports/lang/schemetoc/patches/patch-ai lang/schemetoc/patches/patch-ai --- /usr/ports/lang/schemetoc/patches/patch-ai Thu Jan 1 09:00:00 1970 +++ lang/schemetoc/patches/patch-ai Thu Feb 3 20:47:09 2000 @@ -0,0 +1,11 @@ +--- scsc/makefile.orig Sat Jan 30 08:17:02 1993 ++++ scsc/makefile Wed Feb 2 22:22:22 2000 +@@ -82,7 +82,7 @@ + done + echo '#! /bin/csh -f' > scc + echo `pwd`'/sccomp -scl ${SCL} -scmh ${SCMH} \ +- -cc ${CC} -LIBDIR ' `pwd`'/${RTDIR} $$argv' >> scc ++ -cc ${CC} -static -LIBDIR ' `pwd`'/${RTDIR} $$argv' >> scc + chmod +x scc + echo '#! /bin/csh -f' > Xscc + echo `pwd`'/Xsccomp -scl ${SCL} -scmh ${SCMH} \ diff -urN /usr/ports/lang/schemetoc/patches/patch-aj lang/schemetoc/patches/patch-aj --- /usr/ports/lang/schemetoc/patches/patch-aj Thu Jan 1 09:00:00 1970 +++ lang/schemetoc/patches/patch-aj Fri Feb 4 05:48:44 2000 @@ -0,0 +1,121 @@ +--- xlib/makefile.orig Tue Mar 2 02:24:36 1993 ++++ xlib/makefile Wed Feb 2 22:22:22 2000 +@@ -1,5 +1,7 @@ + .SUFFIXES: +-.SUFFIXES: .sc .cdecl .o .c ++.SUFFIXES: .sc .cdecl .o .c .so ++ ++SOVER = 1 + + CDECL = ../cdecl/cdecl + SIZEOF = ../cdecl/sizeof +@@ -58,6 +60,16 @@ + xvisualinfo.o xwindowattributes.o xwindowchanges.o xwmhints.o \ + xpixmapformatvalues.o xtextproperty.o + ++sxdo = depth.so screen.so visual.so xarc.so xchar2b.so xcharstruct.so \ ++ xclasshint.so xcomposestatus.so xcolor.so xlibCONSTANTS.so xevent.so \ ++ xfontprop.so xfontstruct.so xgcvalues.so xhostaddress.so xiconsize.so \ ++ ximage.so xkeyboardcontrol.so xkeyboardstate.so xmodifierkeymap.so \ ++ xpoint.so xrectangle.so xrmoptiondescrec.so xrmvalue.so xsegment.so \ ++ xsetwindowattributes.so xsizehints.so xstandardcolormap.so \ ++ xlibSTUBS.so xtextitem.so xtextitem16.so xtimecoord.so xlibTYPES.so \ ++ xvisualinfo.so xwindowattributes.so xwindowchanges.so xwmhints.so \ ++ xpixmapformatvalues.so xtextproperty.so ++ + xdpsc = xws2.sc xws3.sc xws4.sc xws5.sc xws6.sc xws7.sc \ + xws8.sc xws9.sc xws10.sc xwsr4.sc + +@@ -76,6 +88,10 @@ + xwso = xwss.o xws2.o xws3.o xws4.o xws5.o xws6.o xws7.o xws8.o xws9.o xws10.o \ + xlib.o xwsr4.o + ++sxwso = xwss.so xws2.so xws3.so xws4.so xws5.so xws6.so xws7.so xws8.so \ ++ xws9.so xws10.so xlib.so xwsr4.so ++ ++ + sizeof.cdecl: + ${SIZEOF} > sizeof.cdecl + +@@ -101,28 +117,52 @@ + .c.o: + ${SCC} -c ${XLIBCFLAGS} $*.c + ++.c.so: ++ ${CC} ${PICFLAGS} ${CFLAGS} -c ${XLIBCFLAGS} -I../scrt ${.IMPSRC} -o ${.TARGET} ++ + scixl: xlibTYPES.o ${xwssc} ${xwsc} ${xwso} + ${SCC} -o scixl -i -m xlib ${xwso} ${xdo} ${XLIB} +- +-scxl.a: xlibTYPES.o ${xwssc} ${xwsc} ${xwso} +- rm -f scxl.a +- ar q scxl.a ${xdo} ${xwso} +- ${RANLIB} scxl.a ++ ++libscxl.a: xlibTYPES.o ${xwssc} ${xwsc} ${xwso} ++ rm -f libscxl.a ++ mv -f xmodifierkeymap.o xmodifier.o ++ mv -f xstandardcolormap.o xstandard.o ++ mv -f xwindowattributes.o xwindowatt.o ++ mv -f xpixmapformatvalues.o xpixmap.o ++ ar q libscxl.a depth.o screen.o visual.o xarc.o xchar2b.o xcharstruct.o \ ++ xclasshint.o xcomposestatus.o xcolor.o xlibCONSTANTS.o xevent.o \ ++ xfontprop.o xfontstruct.o xgcvalues.o xhostaddress.o xiconsize.o \ ++ ximage.o xkeyboardcontrol.o xkeyboardstate.o xmodifier.o \ ++ xpoint.o xrectangle.o xrmoptiondescrec.o xrmvalue.o xsegment.o \ ++ xsetwindowattributes.o xsizehints.o xstandard.o \ ++ xlibSTUBS.o xtextitem.o xtextitem16.o xtimecoord.o xlibTYPES.o \ ++ Sent by Japanese ProntoMail >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message