Date: Sun, 15 Mar 2009 06:06:59 GMT From: carl shapiro <carl.shapiro@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/132652: [patch] lang/schemetoc: break dependency on gcc 2.95 Message-ID: <200903150606.n2F66xIs044530@www.freebsd.org> Resent-Message-ID: <200903150610.n2F6A1Sm020291@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 132652 >Category: ports >Synopsis: [patch] lang/schemetoc: break dependency on gcc 2.95 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 15 06:10:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: carl shapiro >Release: 6.4-STABLE >Organization: >Environment: FreeBSD xxx 6.4-STABLE FreeBSD 6.4-STABLE #0: Thu Feb 5 05:25:34 EST 2009 xxx@xxx:/usr/obj/usr/src/sys/XXX amd64 >Description: The schemetoc package currently depends on GCC 2.95 to build. Because the GCC 2.95 package conflicts with newer versions of GCC and is limited to i386 and alpha architectures, this dependency is an onerous one. However, this dependency seems motivated by the use of antiquated C constructs in its source code. With the attached patches applied the aforementioned constructs are removed allowing the USE_GCC statement to be eliminated from the port Makefile. >How-To-Repeat: Try and build lang/schemetoc on a system which cannot install gcc295 or has a recent gcc version installed. >Fix: Update lang/schemetoc using the contents of the attached shar file. Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # files/patch-ak # files/patch-al # files/patch-am # files/patch-an # files/patch-ao # Makefile # echo x - files/patch-ak sed 's/^X//' >files/patch-ak << '1db6f6433b3e53518113df5b0824cc21' X*** scrt/apply.c.orig Mon Feb 22 11:10:06 1993 X--- scrt/apply.c Sat Mar 14 21:49:29 2009 X*************** X*** 50,56 **** X #include "scinit.h" X #include "heap.h" X #include "apply.h" X! #include <varargs.h> X X /* Data structures used by UNKNOWNCALL. These values must be pushed on the X stack and then restored by interrupt handlers or when calling finalization X--- 50,56 ---- X #include "scinit.h" X #include "heap.h" X #include "apply.h" X! #include <stdarg.h> X X /* Data structures used by UNKNOWNCALL. These values must be pushed on the X stack and then restored by interrupt handlers or when calling finalization X*************** X*** 283,290 **** X in the call, or the procedure takes a variable number of arguments. X */ X X! TSCP sc_unknowncall( va_alist ) X! va_dcl X { X va_list argl; /* List of arguments on stack */ X int req; /* # of required arguments */ X--- 283,289 ---- X in the call, or the procedure takes a variable number of arguments. X */ X X! TSCP sc_unknowncall( TSCP arg0, ... ) X { X va_list argl; /* List of arguments on stack */ X int req; /* # of required arguments */ X*************** X*** 293,299 **** X TSCP tail; /* Tail of optional argument list */ X SCP utproc; /* Untagged version of proc */ X X! va_start( argl ); X utproc = T_U( sc_unknownproc[ 1 ] ); X if ((TSCPTAG( sc_unknownproc[ 1 ] ) != EXTENDEDTAG) || X (utproc->procedure.tag != PROCEDURETAG)) X--- 292,298 ---- X TSCP tail; /* Tail of optional argument list */ X SCP utproc; /* Untagged version of proc */ X X! va_start( argl, arg0 ); X utproc = T_U( sc_unknownproc[ 1 ] ); X if ((TSCPTAG( sc_unknownproc[ 1 ] ) != EXTENDEDTAG) || X (utproc->procedure.tag != PROCEDURETAG)) X*************** X*** 304,313 **** X ((utproc->procedure.optional == 0) && (sc_unknownargc != req))) X sc_error( "APPLY", "PROCEDURE requires ~s arguments, ~s supplied", X LIST2( C_FIXED( req ), C_FIXED( sc_unknownargc ) ) ); X! for (i = 0; i < req; i++) sc_arg[ i ] = va_arg( argl, TSCP ); X optl = EMPTYLIST; X! if (i++ < sc_unknownargc) { X! tail = (optl = sc_cons( va_arg( argl, TSCP ), EMPTYLIST )); X while (i++ < sc_unknownargc) X tail = (TP_U( tail )->pair.cdr = sc_cons( va_arg( argl, TSCP ), X EMPTYLIST )); X--- 303,313 ---- X ((utproc->procedure.optional == 0) && (sc_unknownargc != req))) X sc_error( "APPLY", "PROCEDURE requires ~s arguments, ~s supplied", X LIST2( C_FIXED( req ), C_FIXED( sc_unknownargc ) ) ); X! for (i = 0; i < req; i++) sc_arg[ i ] = !i ? arg0 : va_arg( argl, TSCP ); X optl = EMPTYLIST; X! if (i < sc_unknownargc) { X! tail = (optl = sc_cons( !i ? arg0 : va_arg( argl, TSCP ), EMPTYLIST )); X! ++i; X while (i++ < sc_unknownargc) X tail = (TP_U( tail )->pair.cdr = sc_cons( va_arg( argl, TSCP ), X EMPTYLIST )); 1db6f6433b3e53518113df5b0824cc21 echo x - files/patch-al sed 's/^X//' >files/patch-al << '35258fad559e3fc736410ea993f8c6d8' X*** scrt/apply.h.orig Mon Feb 22 11:13:08 1993 X--- scrt/apply.h Sat Mar 14 20:18:50 2009 X*************** X*** 60,63 **** X X extern TSCP sc_apply_2dtwo(); X X! extern TSCP sc_unknowncall(); X--- 60,63 ---- X X extern TSCP sc_apply_2dtwo(); X X! extern TSCP sc_unknowncall( TSCP arg0, ... ); 35258fad559e3fc736410ea993f8c6d8 echo x - files/patch-am sed 's/^X//' >files/patch-am << '291fc69af7767a75b4dfc985ff1c6c0b' X*** scrt/objects.c.orig Mon Feb 22 11:12:04 1993 X--- scrt/objects.c Sat Mar 14 20:28:00 2009 X*************** X*** 48,54 **** X #include "heap.h" X #include "apply.h" X #include "cio.h" X! #include <varargs.h> X X #ifndef NULL X #define NULL 0 X--- 48,54 ---- X #include "heap.h" X #include "apply.h" X #include "cio.h" X! #include <stdarg.h> X X #ifndef NULL X #define NULL 0 X*************** X*** 293,310 **** X allocate variables and is visible within the compiler as MAKECLOSURE. X */ X X! TSCP sc_makeclosure( va_alist ) X! va_dcl X { X va_list argl; X- TSCP prevclosure; X int count; X SCP cp; X PATSCP vars; X X MUTEXON; X! va_start( argl ); X! prevclosure = va_arg( argl, TSCP ); X count = va_arg( argl, int ); X cp = sc_allocateheap( CLOSURESIZE( count ), CLOSURETAG, count ); X cp->closure.closure = prevclosure; X--- 293,307 ---- X allocate variables and is visible within the compiler as MAKECLOSURE. X */ X X! TSCP sc_makeclosure( TSCP prevclosure, ... ) X { X va_list argl; X int count; X SCP cp; X PATSCP vars; X X MUTEXON; X! va_start( argl, prevclosure ); X count = va_arg( argl, int ); X cp = sc_allocateheap( CLOSURESIZE( count ), CLOSURETAG, count ); X cp->closure.closure = prevclosure; 291fc69af7767a75b4dfc985ff1c6c0b echo x - files/patch-an sed 's/^X//' >files/patch-an << '72ca6499b253670041c5c413280017f6' X*** scrt/objects.h.orig Tue Feb 23 18:29:09 1993 X--- scrt/objects.h Sat Mar 14 20:21:00 2009 X*************** X*** 798,804 **** X extern TSCP sc_makeclosure(...); X extern TSCP sc_makeprocedure(...); X #else X! extern TSCP sc_makeclosure(); X extern TSCP sc_makeprocedure(); X #endif X X--- 798,804 ---- X extern TSCP sc_makeclosure(...); X extern TSCP sc_makeprocedure(...); X #else X! extern TSCP sc_makeclosure( TSCP prevclosure, ... ); X extern TSCP sc_makeprocedure(); X #endif X 72ca6499b253670041c5c413280017f6 echo x - files/patch-ao sed 's/^X//' >files/patch-ao << 'ec88ab6c4eef5ae177293ae113ad2019' X*** test/test23.sc.orig Mon Feb 22 11:27:23 1993 X--- test/test23.sc Sat Mar 14 22:05:08 2009 X*************** X*** 330,338 **** X X ;;; Access to an external array. X X! (define-c-external _\i\o\b* ARRAY "_iob") X! (eval-when (load) (define _iob _\i\o\b*)) X! (eval-when (eval) (define _iob 0)) X X ;;; Access to an external procedure pointer. X X--- 330,338 ---- X X ;;; Access to an external array. X X! ;(define-c-external _\i\o\b* ARRAY "_iob") X! ;(eval-when (load) (define _iob _\i\o\b*)) X! ;(eval-when (eval) (define _iob 0)) X X ;;; Access to an external procedure pointer. X X*************** X*** 409,415 **** X X (chk 130 (string-ref "" 0) (integer->char #o21)) X X! (chk 140 (number? _iob) #t) X (chk 141 (number? hypot) #t) X X (chk 150 (letrec ((x 1)) (define x 2) x) 2) X--- 409,415 ---- X X (chk 130 (string-ref "" 0) (integer->char #o21)) X X! ;(chk 140 (number? _iob) #t) X (chk 141 (number? hypot) #t) X X (chk 150 (letrec ((x 1)) (define x 2) x) 2) ec88ab6c4eef5ae177293ae113ad2019 echo x - Makefile sed 's/^X//' >Makefile << 'b67911656ef5d18c4ae36cb6741b7965' X# New ports collection makefile for: Scheme-to-C X# Date created: 28 Dec 1994 X# Whom: jmacd@uclink.berkeley.edu X# X# $FreeBSD: ports/lang/schemetoc/Makefile,v 1.36 2008/04/19 17:51:34 miwi Exp $ X# X XPORTNAME= schemetoc XPORTVERSION= 93.3.15 XPORTREVISION= 2 XCATEGORIES= lang scheme XMASTER_SITES= http://www.cs.indiana.edu/pub/scheme-repository/imp/Scheme-to-C/ XDISTNAME= 15mar93 XEXTRACT_SUFX= .tar.Z X XMAINTAINER= erik@smluc.org XCOMMENT= Scheme-to-C, a compiler and interpreter for compiling scheme into C X XUSE_XORG= x11 xi XUSE_LDCONFIG= yes XNO_WRKSUBDIR= yes XMAN1= scc.1 sci.1 X Xpost-extract: X @${CP} ${FILESDIR}/Makefile ${WRKSRC} X @${CP} ${FILESDIR}/README.FreeBSD ${WRKSRC} X @${MV} ${WRKDIR}/scsc/main.c ${WRKSRC}/scsc/main.c.orig X @${CP} ${FILESDIR}/main.c ${WRKSRC}/scsc/main.c X @${MKDIR} ${WRKDIR}/ports/FREEBSD X.for file in makefile-head options-server.h options.h x86.s X @${CP} ${FILESDIR}/${file} ${WRKSRC}/ports/FREEBSD X.endfor X Xpost-patch: X @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g; \ X s|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/scsc/*.sc X X.include <bsd.port.mk> b67911656ef5d18c4ae36cb6741b7965 exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903150606.n2F66xIs044530>