From owner-freebsd-ports Wed Nov 15 18:20:14 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 04FEC37B4D7 for ; Wed, 15 Nov 2000 18:20:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id SAA29417; Wed, 15 Nov 2000 18:20:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from privatecube.privatelabs.com (unknown [63.114.185.254]) by hub.freebsd.org (Postfix) with ESMTP id 4217737B479 for ; Wed, 15 Nov 2000 18:15:06 -0800 (PST) Received: from misha.privatelabs.com (root@misha.plten [10.0.0.106]) by privatecube.privatelabs.com (8.9.3/8.9.2) with ESMTP id VAA09005; Wed, 15 Nov 2000 21:34:20 -0500 Received: (from mi@localhost) by misha.privatelabs.com (8.11.0/8.9.3) id eAG2Edg02871; Wed, 15 Nov 2000 21:14:39 -0500 (EST) (envelope-from mi) Message-Id: <200011160214.eAG2Edg02871@misha.privatelabs.com> Date: Wed, 15 Nov 2000 21:14:39 -0500 (EST) From: Mikhail Teterin Reply-To: mi@aldan.algebra.com To: FreeBSD-gnats-submit@freebsd.org Cc: Steve.Ball@zveno.com X-Send-Pr-Version: 3.2 Subject: ports/22879: new port: textproc/TclExpat Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 22879 >Category: ports >Synopsis: new port: textproc/TclExpat >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Nov 15 18:20:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: Mikhail Teterin >Release: FreeBSD 4.1.1-STABLE i386 >Organization: Virtual Estates, Inc. >Environment: >Description: This is the TCL interface to the Expat library. I updated it to link against the modern Expat, as installed by the expat2 port. I find the test target to be important -- it helped me find bugs in what seemed like a perfect build... The included patch ensures proper prototyping and the return values to enable compilations with -Wall -Werror. >How-To-Repeat: >Fix: # 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: # # tclExpat # tclExpat/pkg-plist # tclExpat/pkg-descr # tclExpat/pkg-comment # tclExpat/distinfo # tclExpat/Makefile # tclExpat/files # tclExpat/files/Makefile # tclExpat/files/pkgIndex.tcl.in # tclExpat/files/patch-aa # echo c - tclExpat mkdir -p tclExpat > /dev/null 2>&1 echo x - tclExpat/pkg-plist sed 's/^X//' >tclExpat/pkg-plist << 'END-of-tclExpat/pkg-plist' Xlib/tcl%%TCL_VERSION%%/TclExpat/pkgIndex.tcl X@dirrm lib/tcl%%TCL_VERSION%%/TclExpat Xlib/libtclexpat.so.1.1 Xlib/libtclexpat.so X%%DOC%%share/doc/TclExpat/README X%%DOC%%@dirrm share/doc/TclExpat END-of-tclExpat/pkg-plist echo x - tclExpat/pkg-descr sed 's/^X//' >tclExpat/pkg-descr << 'END-of-tclExpat/pkg-descr' XFrom the README: X A Tcl interface to expat. X X Steve Ball, Zveno Pty Ltd. X XThis package provides a Tcl interface to James Clark's expat library. XIt creates a Tcl package, called "expat", which defines a single Xnew Tcl command "expat". X XWWW: http://www.zveno.com/zm.cgi/in-tclxml/ X XThis port ignores the old expat distribution bundled with the software Xand links the library against the latest installed by the expat2 port. X X -mi END-of-tclExpat/pkg-descr echo x - tclExpat/pkg-comment sed 's/^X//' >tclExpat/pkg-comment << 'END-of-tclExpat/pkg-comment' XThe TCL interface to Expat library END-of-tclExpat/pkg-comment echo x - tclExpat/distinfo sed 's/^X//' >tclExpat/distinfo << 'END-of-tclExpat/distinfo' XMD5 (TclExpat-1.1.tar.gz) = 8f736513ddad94b58e07b564679151fa END-of-tclExpat/distinfo echo x - tclExpat/Makefile sed 's/^X//' >tclExpat/Makefile << 'END-of-tclExpat/Makefile' X# Ports collection Makefile for: TclExpat X# Date created: Nov 16 2000 X# Whom: mi@aldan.algebra.com X# X# $FreeBSD$ X# X XPORTNAME= TclExpat XPORTVERSION= 1.1 XCATEGORIES= textproc tcl83 XMASTER_SITES= http://www.zveno.com/in-tclxml/ X XMAINTAINER= mi@aldan.algebra.com X XLIB_DEPENDS= tcl${TCL_DVER}:${PORTSDIR}/lang/tcl${TCL_DVER} \ X expat:${PORTSDIR}/textproc/expat2 X XTCL_VERSION= 8.3 XTCL_DVER= ${TCL_VERSION:S/.//} XPLIST_SUB+= TCL_VERSION=${TCL_VERSION} X XMAKEFILE= ${FILESDIR}/Makefile X X# Remove the old version of expat bundled with the package: Xpost-extract: X ${RM} -rf ${WRKSRC}/expat X Xpost-patch: X ${PERL} -pi -e 's/TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0/TCL_MAJOR_VERSION >= 8/;' \ X -e 's/xmlparse.h/expat.h/;' ${WRKSRC}/tclexpat.c X Xtest: build X ${LN} -sf libtclexpat.so ${WRKSRC}/tclexpat.so X cd ${WRKSRC} && tclsh${TCL_VERSION} test-break.tcl X cd ${WRKSRC} && tclsh${TCL_VERSION} test-continue.tcl X cd ${WRKSRC} && tclsh${TCL_VERSION} test-error.tcl X Xpost-install: X ${MKDIR} ${LOCALBASE}/lib/tcl${TCL_VERSION}/${PORTNAME} X ${SED} 's|PREFIX|${PREFIX}|' < ${FILESDIR}/pkgIndex.tcl.in > \ X ${LOCALBASE}/lib/tcl${TCL_VERSION}/${PORTNAME}/pkgIndex.tcl X.if !defined(NOPORTDOCS) X ${MKDIR} ${LOCALBASE}/share/doc/${PORTNAME} X ${INSTALL_DATA} ${WRKSRC}/README ${LOCALBASE}/share/doc/${PORTNAME}/ X XPLIST_SUB+= DOC='' X.else XPLIST_SUB+= DOC='@comment ' X.endif X X.include END-of-tclExpat/Makefile echo c - tclExpat/files mkdir -p tclExpat/files > /dev/null 2>&1 echo x - tclExpat/files/Makefile sed 's/^X//' >tclExpat/files/Makefile << 'END-of-tclExpat/files/Makefile' XSRCS= tclexpat.c X XLIB= tclexpat XSHLIB_MAJOR?= 1 XSHLIB_MINOR?= 1 XINTERNALLIB= static library is useless XLIBDIR= ${LOCALBASE}/lib X XTCL_VERSION?= 8.3 XTCL_DVER?= ${TCL_VERSION:S/.//} X XCFLAGS= -I${LOCALBASE}/include/tcl${TCL_VERSION} -I${LOCALBASE}/include -Wall -Werror XLDADD+= -L${LOCALBASE}/lib -lexpat X XUSE_STUBS!= . ${LOCALBASE}/lib/tcl${TCL_VERSION}/tclConfig.sh; echo $$TCL_SUPPORTS_STUBS X X.if ${USE_STUBS} == "1" XLDADD+= -ltclstub${TCL_DVER} XCFLAGS+=-DUSE_TCL_STUBS X.else XLDADD+= -ltcl${TCL_DVER} X.endif X X.include END-of-tclExpat/files/Makefile echo x - tclExpat/files/pkgIndex.tcl.in sed 's/^X//' >tclExpat/files/pkgIndex.tcl.in << 'END-of-tclExpat/files/pkgIndex.tcl.in' Xpackage ifneeded expat 1.1 {load "PREFIX/lib/libtclexpat.so"} END-of-tclExpat/files/pkgIndex.tcl.in echo x - tclExpat/files/patch-aa sed 's/^X//' >tclExpat/files/patch-aa << 'END-of-tclExpat/files/patch-aa' XThis are mostly fixes for warnings, which show up when built with -Wall... X X -mi X X--- tclexpat.c Wed Nov 15 20:13:35 2000 X+++ tclexpat.c Wed Nov 15 20:53:43 2000 X@@ -74,14 +74,14 @@ X X-static void * (TclExpatElementStartHandler) _ANSI_ARGS_((void *userdata, X+static void (TclExpatElementStartHandler) _ANSI_ARGS_((void *userdata, X const XML_Char *name, X const XML_Char **atts)); X-static void * (TclExpatElementEndHandler) _ANSI_ARGS_((void *userData, X+static void (TclExpatElementEndHandler) _ANSI_ARGS_((void *userData, X const XML_Char *name)); X-static void * (TclExpatCharacterDataHandler) _ANSI_ARGS_((void *userData, X+static void (TclExpatCharacterDataHandler) _ANSI_ARGS_((void *userData, X const XML_Char *s, X int len)); X-static void * (TclExpatProcessingInstructionHandler) _ANSI_ARGS_((void *userData, X+static void (TclExpatProcessingInstructionHandler) _ANSI_ARGS_((void *userData, X const XML_Char *target, X const XML_Char *data)); X-static void * (TclExpatExternalEntityRefHandler) _ANSI_ARGS_((XML_Parser parser, X+static int (TclExpatExternalEntityRefHandler) _ANSI_ARGS_((XML_Parser parser, X const XML_Char *openEntityNames, X@@ -90,6 +90,6 @@ X const XML_Char *publicId)); X-static void * (TclExpatDefaultHandler) _ANSI_ARGS_ ((void *userData, X+static void (TclExpatDefaultHandler) _ANSI_ARGS_ ((void *userData, X const XML_Char *s, X int len)); X-static void * (TclExpatUnparsedDeclHandler) _ANSI_ARGS_ ((void *userData, X+static void (TclExpatUnparsedDeclHandler) _ANSI_ARGS_ ((void *userData, X const XML_Char *entityname, X@@ -99,3 +99,3 @@ X const XML_Char *notationName)); X-static void * (TclExpatNotationDeclHandler) _ANSI_ARGS_ ((void *userData, X+static void (TclExpatNotationDeclHandler) _ANSI_ARGS_ ((void *userData, X const XML_Char *notationName, X@@ -108,3 +108,3 @@ X X-#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) X+#if (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0) && !defined(Tcl_GetString) X X@@ -269,3 +269,2 @@ X { X- int len; X X@@ -286,18 +285,18 @@ X XML_SetElementHandler(expat->parser, X- (XML_StartElementHandler) TclExpatElementStartHandler, X- (XML_EndElementHandler) TclExpatElementEndHandler); X+ TclExpatElementStartHandler, X+ TclExpatElementEndHandler); X XML_SetCharacterDataHandler(expat->parser, X- (XML_CharacterDataHandler) TclExpatCharacterDataHandler); X+ TclExpatCharacterDataHandler); X XML_SetProcessingInstructionHandler(expat->parser, X- (XML_ProcessingInstructionHandler) TclExpatProcessingInstructionHandler); X+ TclExpatProcessingInstructionHandler); X XML_SetDefaultHandler(expat->parser, X- (XML_DefaultHandler) TclExpatDefaultHandler); X+ TclExpatDefaultHandler); X XML_SetUnparsedEntityDeclHandler(expat->parser, X- (XML_UnparsedEntityDeclHandler) TclExpatUnparsedDeclHandler); X+ TclExpatUnparsedDeclHandler); X XML_SetNotationDeclHandler(expat->parser, X- (XML_NotationDeclHandler) TclExpatNotationDeclHandler); X+ TclExpatNotationDeclHandler); X XML_SetExternalEntityRefHandler(expat->parser, X- (XML_ExternalEntityRefHandler) TclExpatExternalEntityRefHandler); X+ TclExpatExternalEntityRefHandler); X XML_SetUnknownEncodingHandler(expat->parser, X- (XML_UnknownEncodingHandler) TclExpatUnknownEncodingHandler, X+ TclExpatUnknownEncodingHandler, X (void *) expat); X@@ -329,3 +328,2 @@ X { X- int len; X X@@ -359,3 +357,3 @@ X TclExpatInfo *expat = (TclExpatInfo *) clientData; X- char *method, *data; X+ char *data; X int len, index, result = TCL_OK; X@@ -797,3 +795,3 @@ X X-static void * X+static void X TclExpatElementStartHandler(userData, name, atts) X@@ -879,3 +877,3 @@ X X-static void * X+static void X TclExpatElementEndHandler(userData, name) X@@ -949,3 +947,3 @@ X X-static void * X+static void X TclExpatCharacterDataHandler(userData, s, len) X@@ -1008,3 +1006,3 @@ X X-static void * X+static void X TclExpatProcessingInstructionHandler(userData, target, data) X@@ -1068,3 +1066,3 @@ X X-static void * X+static void X TclExpatDefaultHandler(userData, s, len) X@@ -1127,3 +1125,3 @@ X X-static void * X+static void X TclExpatUnparsedDeclHandler(userData, entityname, base, systemId, publicId, notationName) X@@ -1201,3 +1199,3 @@ X X-static void * X+static void X TclExpatNotationDeclHandler(userData, notationName, base, systemId, publicId) X@@ -1281,11 +1279,14 @@ X TclExpatInfo *expat = (TclExpatInfo *) encodingHandlerData; X+#if 0 X Tcl_Obj *cmdPtr; X int result; X+#endif X X Tcl_SetResult(expat->interp, "not implemented", NULL); X- return 0; X+ return 1; X X+#if 0 X if (expat->unknownencodingcommand == NULL || X expat->status != TCL_OK) { X- return; X+ return 1; X } X@@ -1319,3 +1320,4 @@ X X- return; X+ return 0; X+#endif X } X@@ -1338,3 +1340,3 @@ X X-static void * X+static int X TclExpatExternalEntityRefHandler(parser, openEntityNames, base, systemId, publicId) X@@ -1352,3 +1354,3 @@ X expat->status != TCL_OK) { X- return; X+ return 0; X } X@@ -1383,3 +1385,3 @@ X X- return; X+ return 1; X } END-of-tclExpat/files/patch-aa exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message