diff options
author | mi <mi@FreeBSD.org> | 2006-08-15 03:11:05 +0800 |
---|---|---|
committer | mi <mi@FreeBSD.org> | 2006-08-15 03:11:05 +0800 |
commit | f20cdca487b8219ee1735e0571b5299e80f1d05b (patch) | |
tree | 204159cad39a246af6e354ef48d41a0b6e409134 /textproc/tclExpat | |
parent | 0af7217ad0778a9bf8ba24a8b435145dda239185 (diff) | |
download | freebsd-ports-gnome-f20cdca487b8219ee1735e0571b5299e80f1d05b.tar.gz freebsd-ports-gnome-f20cdca487b8219ee1735e0571b5299e80f1d05b.tar.zst freebsd-ports-gnome-f20cdca487b8219ee1735e0571b5299e80f1d05b.zip |
Default to using Tcl-8.4. Fix up all warnings triggered by WARNS=3. Remove the
extraneous blank space in PLIST, which prevented package from building. Make
vendor's tests run automatically after build. Bump PORTREVISION.
Diffstat (limited to 'textproc/tclExpat')
-rw-r--r-- | textproc/tclExpat/Makefile | 13 | ||||
-rw-r--r-- | textproc/tclExpat/files/Makefile | 5 | ||||
-rw-r--r-- | textproc/tclExpat/files/patch-aa | 222 | ||||
-rw-r--r-- | textproc/tclExpat/pkg-plist | 2 |
4 files changed, 199 insertions, 43 deletions
diff --git a/textproc/tclExpat/Makefile b/textproc/tclExpat/Makefile index 23702e6bebb8..7c13a25bf7c8 100644 --- a/textproc/tclExpat/Makefile +++ b/textproc/tclExpat/Makefile @@ -7,7 +7,7 @@ PORTNAME= TclExpat PORTVERSION= 1.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= textproc tcl83 MASTER_SITES= http://people.tecnik93.com/~itetcu/FreeBSD/others_ports/${PORTNAME}/sources/ @@ -15,25 +15,22 @@ MAINTAINER= mi@aldan.algebra.com COMMENT= The TCL interface to Expat library LIB_DEPENDS= tcl${TCL_DVER}:${PORTSDIR}/lang/tcl${TCL_DVER} \ - expat.6:${PORTSDIR}/textproc/expat2 + expat:${PORTSDIR}/textproc/expat2 INSTALLS_SHLIB= yes -TCL_VERSION= 8.3 +TCL_VERSION?= 8.4 TCL_DVER= ${TCL_VERSION:S/.//} PLIST_SUB+= TCL_VERSION=${TCL_VERSION} MAKEFILE= ${FILESDIR}/Makefile +MAKE_ENV+= TCL_VERSION=${TCL_VERSION} # Remove the old version of expat bundled with the package: post-extract: ${RM} -rf ${WRKSRC}/expat -post-patch: - ${REINPLACE_CMD} -e 's/TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 0/TCL_MAJOR_VERSION >= 8/;' \ - -e 's/xmlparse.h/expat.h/;' ${WRKSRC}/tclexpat.c - -test: build +post-build test: ${LN} -sf libtclexpat.so ${WRKSRC}/tclexpat.so cd ${WRKSRC} && tclsh${TCL_VERSION} test-break.tcl cd ${WRKSRC} && tclsh${TCL_VERSION} test-continue.tcl diff --git a/textproc/tclExpat/files/Makefile b/textproc/tclExpat/files/Makefile index 10566440ecce..fcc323833835 100644 --- a/textproc/tclExpat/files/Makefile +++ b/textproc/tclExpat/files/Makefile @@ -6,10 +6,11 @@ SRCS= tclexpat.c SHLIB_NAME= libtclexpat.so.1 LIBDIR= ${LOCALBASE}/lib -TCL_VERSION?= 8.3 +TCL_VERSION?= 8.4 TCL_DVER?= ${TCL_VERSION:S/.//} -CFLAGS+= -I${LOCALBASE}/include/tcl${TCL_VERSION} -I${LOCALBASE}/include -Wall +CFLAGS+= -I${LOCALBASE}/include/tcl${TCL_VERSION} -I${LOCALBASE}/include +WARNS= 3 LDADD+= -L${LOCALBASE}/lib -lexpat USE_STUBS!= . ${LOCALBASE}/lib/tcl${TCL_VERSION}/tclConfig.sh; echo $$TCL_SUPPORTS_STUBS diff --git a/textproc/tclExpat/files/patch-aa b/textproc/tclExpat/files/patch-aa index 43398217cc00..df560ea6eb50 100644 --- a/textproc/tclExpat/files/patch-aa +++ b/textproc/tclExpat/files/patch-aa @@ -1,5 +1,5 @@ ---- tclexpat.c.orig Sat Aug 22 00:35:44 1998 -+++ tclexpat.c Fri Aug 23 14:18:22 2002 +--- tclexpat.c Sat Aug 22 03:35:44 1998 ++++ tclexpat.c Mon Aug 14 14:58:38 2006 @@ -18,8 +18,9 @@ * */ @@ -7,11 +7,20 @@ +#include <string.h> #include <tcl.h> -#include "xmlparse.h" -+#include "expat.h" ++#include <expat.h> /* * The structure below is used to refer to an expat parser object. -@@ -72,32 +73,32 @@ +@@ -53,6 +54,8 @@ + * Prototypes for procedures defined later in this file: + */ + ++int Tclexpat_Init (Tcl_Interp *); ++static void TclExpatHandlerResult(TclExpatInfo *, int result); + static Tcl_ObjCmdProc TclExpatObjCmd; + static Tcl_ObjCmdProc TclExpatInstanceCmd; + static Tcl_CmdDeleteProc TclExpatDeleteCmd; +@@ -72,32 +75,32 @@ int objc, Tcl_Obj *CONST objv[])); @@ -52,7 +61,7 @@ const XML_Char *notationName, const XML_Char *base, const XML_Char *systemId, -@@ -106,7 +107,7 @@ +@@ -106,7 +109,7 @@ const XML_Char *name, XML_Encoding *info)); @@ -61,7 +70,7 @@ /* *---------------------------------------------------------------------------- -@@ -134,7 +135,7 @@ +@@ -134,7 +137,7 @@ s = Tcl_GetStringFromObj(obj, &i); return s; } @@ -70,7 +79,7 @@ /* *---------------------------------------------------------------------------- -@@ -267,7 +268,6 @@ +@@ -267,7 +270,6 @@ Tcl_Interp *interp; TclExpatInfo *expat; { @@ -78,7 +87,7 @@ if (!(expat->parser = XML_ParserCreate(NULL))) { Tcl_SetResult(interp, "unable to create expat parser", NULL); -@@ -284,22 +284,22 @@ +@@ -284,22 +286,22 @@ */ XML_SetElementHandler(expat->parser, @@ -110,7 +119,7 @@ (void *) expat); XML_SetUserData(expat->parser, (void *) expat); -@@ -327,7 +327,6 @@ +@@ -327,7 +329,6 @@ TclExpatFreeParser(expat) TclExpatInfo *expat; { @@ -118,16 +127,59 @@ XML_ParserFree(expat->parser); expat->parser = NULL; -@@ -357,7 +356,7 @@ +@@ -357,9 +358,9 @@ Tcl_Obj *CONST objv[]; { TclExpatInfo *expat = (TclExpatInfo *) clientData; - char *method, *data; + char *data; int len, index, result = TCL_OK; - static char *options[] = { +- static char *options[] = { ++ static CONST char * options[] = { "configure", "cget", "parse", "reset", NULL -@@ -795,7 +794,7 @@ + }; + enum options { +@@ -464,10 +465,10 @@ + + if (!result) { + Tcl_ResetResult(interp); +- sprintf(s, "%d", XML_GetCurrentLineNumber(expat->parser)); ++ sprintf(s, "%ld", (long)XML_GetCurrentLineNumber(expat->parser)); + Tcl_AppendResult(interp, "error \"", XML_ErrorString(XML_GetErrorCode(expat->parser)), + "\" at line ", s, " character ", NULL); +- sprintf(s, "%d", XML_GetCurrentColumnNumber(expat->parser)); ++ sprintf(s, "%ld", (long)XML_GetCurrentColumnNumber(expat->parser)); + Tcl_AppendResult(interp, s, NULL); + + return TCL_ERROR; +@@ -514,7 +515,7 @@ + int objc; + Tcl_Obj *CONST objv[]; + { +- static char *switches[] = { ++ static CONST char *switches[] = { + "-final", + "-baseurl", + "-elementstartcommand", +@@ -688,7 +689,7 @@ + } + + if (doParse) { +- return TclExpatParse(interp, expat->parser, "", 0); ++ return TclExpatParse(interp, expat, "", 0); + } else { + return TCL_OK; + } +@@ -739,7 +740,7 @@ + *---------------------------------------------------------------------------- + */ + +-void ++static void + TclExpatHandlerResult(expat, result) + TclExpatInfo *expat; + int result; +@@ -795,7 +796,7 @@ *---------------------------------------------------------------------------- */ @@ -136,7 +188,26 @@ TclExpatElementStartHandler(userData, name, atts) void *userData; const char *name; -@@ -847,7 +846,7 @@ +@@ -828,8 +829,8 @@ + + atList = Tcl_NewListObj(0, NULL); + for (atPtr = atts; atPtr[0] && atPtr[1]; atPtr += 2) { +- Tcl_ListObjAppendElement(expat->interp, atList, Tcl_NewStringObj((char *)atPtr[0], strlen(atPtr[0]))); +- Tcl_ListObjAppendElement(expat->interp, atList, Tcl_NewStringObj((char *)atPtr[1], strlen(atPtr[1]))); ++ Tcl_ListObjAppendElement(expat->interp, atList, Tcl_NewStringObj(atPtr[0], -1)); ++ Tcl_ListObjAppendElement(expat->interp, atList, Tcl_NewStringObj(atPtr[1], -1)); + } + + /* +@@ -840,14 +841,14 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)name, strlen(name))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(name, -1)); + Tcl_ListObjAppendElement(expat->interp, cmdPtr, atList); + + /* * It would be desirable to be able to terminate parsing * if the return result is TCL_ERROR or TCL_BREAK. */ @@ -145,7 +216,7 @@ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); #else result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -877,7 +876,7 @@ +@@ -877,7 +878,7 @@ *---------------------------------------------------------------------------- */ @@ -154,7 +225,14 @@ TclExpatElementEndHandler(userData, name) void *userData; CONST char *name; -@@ -917,7 +916,7 @@ +@@ -911,13 +912,13 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)name, strlen(name))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(name, -1)); + + /* * It would be desirable to be able to terminate parsing * if the return result is TCL_ERROR or TCL_BREAK. */ @@ -163,7 +241,7 @@ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); #else result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -947,7 +946,7 @@ +@@ -947,7 +948,7 @@ *---------------------------------------------------------------------------- */ @@ -172,7 +250,14 @@ TclExpatCharacterDataHandler(userData, s, len) void *userData; CONST char *s; -@@ -976,7 +975,7 @@ +@@ -970,13 +971,13 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)s, len)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(s, len)); + + /* * It would be desirable to be able to terminate parsing * if the return result is TCL_ERROR or TCL_BREAK. */ @@ -181,7 +266,7 @@ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); #else result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -1006,7 +1005,7 @@ +@@ -1006,7 +1007,7 @@ *---------------------------------------------------------------------------- */ @@ -190,7 +275,16 @@ TclExpatProcessingInstructionHandler(userData, target, data) void *userData; CONST char *target; -@@ -1036,7 +1035,7 @@ +@@ -1029,14 +1030,14 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)target, strlen(target))); +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)data, strlen(data))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(target, -1)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(data, -1)); + + /* * It would be desirable to be able to terminate parsing * if the return result is TCL_ERROR or TCL_BREAK. */ @@ -199,7 +293,7 @@ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); #else result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -1066,7 +1065,7 @@ +@@ -1066,7 +1067,7 @@ *---------------------------------------------------------------------------- */ @@ -208,7 +302,14 @@ TclExpatDefaultHandler(userData, s, len) void *userData; CONST char *s; -@@ -1095,7 +1094,7 @@ +@@ -1089,13 +1090,13 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)s, len)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(s, len)); + + /* * It would be desirable to be able to terminate parsing * if the return result is TCL_ERROR or TCL_BREAK. */ @@ -217,7 +318,7 @@ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); #else result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -1125,7 +1124,7 @@ +@@ -1125,7 +1126,7 @@ *---------------------------------------------------------------------------- */ @@ -226,7 +327,30 @@ TclExpatUnparsedDeclHandler(userData, entityname, base, systemId, publicId, notationName) void *userData; CONST char *entityname; -@@ -1169,7 +1168,7 @@ +@@ -1151,25 +1152,25 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)entityname, strlen(entityname))); +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)base, strlen(base))); +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)systemId, strlen(systemId))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(entityname, -1)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(base, -1)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(systemId, -1)); + if (publicId == NULL) { + Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewListObj(0, NULL)); + } else { +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)publicId, strlen(publicId))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(publicId, -1)); + } + if (notationName == NULL) { + Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewListObj(0, NULL)); + } else { +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)notationName, strlen(notationName))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(notationName, -1)); + } + + /* * It would be desirable to be able to terminate parsing * if the return result is TCL_ERROR or TCL_BREAK. */ @@ -235,7 +359,7 @@ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); #else result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -1199,7 +1198,7 @@ +@@ -1199,7 +1200,7 @@ *---------------------------------------------------------------------------- */ @@ -244,7 +368,28 @@ TclExpatNotationDeclHandler(userData, notationName, base, systemId, publicId) void *userData; CONST char *notationName; -@@ -1241,7 +1240,7 @@ +@@ -1224,24 +1225,24 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)notationName, strlen(notationName))); +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)base, strlen(base))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(notationName, -1)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(base, -1)); + if (systemId == NULL) { + Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewListObj(0, NULL)); + } else { +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)systemId, strlen(systemId))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(systemId, -1)); + } + if (publicId == NULL) { + Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewListObj(0, NULL)); + } else { +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)publicId, strlen(publicId))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(publicId, -1)); + } + + /* * It would be desirable to be able to terminate parsing * if the return result is TCL_ERROR or TCL_BREAK. */ @@ -253,7 +398,7 @@ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); #else result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -1279,15 +1278,18 @@ +@@ -1279,15 +1280,18 @@ XML_Encoding *info; { TclExpatInfo *expat = (TclExpatInfo *) encodingHandlerData; @@ -274,7 +419,7 @@ } /* -@@ -1306,7 +1308,7 @@ +@@ -1306,7 +1310,7 @@ * It would be desirable to be able to terminate parsing * if the return result is TCL_ERROR or TCL_BREAK. */ @@ -283,7 +428,7 @@ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); #else result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -1317,7 +1319,8 @@ +@@ -1317,7 +1321,8 @@ TclExpatHandlerResult(expat, result); @@ -293,7 +438,7 @@ } /* -@@ -1336,7 +1339,7 @@ +@@ -1336,7 +1341,7 @@ *---------------------------------------------------------------------------- */ @@ -302,7 +447,7 @@ TclExpatExternalEntityRefHandler(parser, openEntityNames, base, systemId, publicId) XML_Parser parser; CONST char *openEntityNames; -@@ -1350,7 +1353,7 @@ +@@ -1350,7 +1355,7 @@ if (expat->externalentitycommand == NULL || expat->status != TCL_OK) { @@ -311,7 +456,20 @@ } /* -@@ -1370,7 +1373,7 @@ +@@ -1361,16 +1366,16 @@ + Tcl_IncrRefCount(cmdPtr); + Tcl_Preserve((ClientData) expat->interp); + +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)openEntityNames, strlen(openEntityNames))); +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)base, strlen(base))); +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)systemId, strlen(systemId))); +- Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj((char *)publicId, strlen(publicId))); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(openEntityNames, -1)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(base, -1)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(systemId, -1)); ++ Tcl_ListObjAppendElement(expat->interp, cmdPtr, Tcl_NewStringObj(publicId, -1)); + + /* * It would be desirable to be able to terminate parsing * if the return result is TCL_ERROR or TCL_BREAK. */ @@ -320,7 +478,7 @@ result = Tcl_GlobalEvalObj(expat->interp, cmdPtr); #else result = Tcl_EvalObj(expat->interp, cmdPtr, TCL_EVAL_GLOBAL); -@@ -1381,7 +1384,7 @@ +@@ -1381,7 +1386,7 @@ TclExpatHandlerResult(expat, result); diff --git a/textproc/tclExpat/pkg-plist b/textproc/tclExpat/pkg-plist index 10edc39113a9..638a1bd2df6d 100644 --- a/textproc/tclExpat/pkg-plist +++ b/textproc/tclExpat/pkg-plist @@ -2,5 +2,5 @@ lib/tcl%%TCL_VERSION%%/TclExpat/pkgIndex.tcl @dirrm lib/tcl%%TCL_VERSION%%/TclExpat lib/libtclexpat.so.1.1 lib/libtclexpat.so -%%PORTDOCS%% %%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/README %%PORTDOCS%%@dirrm %%DOCSDIR%% |