From 607f30f101e5024ee1c78ad536baf4cb59b37ac5 Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Tue, 30 Apr 2013 14:21:22 +0000 Subject: [PATCH] - Update to 3.4.1 - Manpages have an .itcl suffix to avoid conflicts with Tcl PR: 175162 (based on) Submitted by: gahr@FreeBSD.org Approved by: maintainer (timeout > 2 months) --- lang/itcl/Makefile | 57 ++++++----- lang/itcl/distinfo | 4 +- lang/itcl/files/Makefile.lib | 50 --------- lang/itcl/files/patch-Makefile.in | 28 +++++ lang/itcl/files/patch-test | 26 ----- lang/itcl/files/patch-warnings | 164 ------------------------------ lang/itcl/pkg-plist | 22 ++-- 7 files changed, 73 insertions(+), 278 deletions(-) delete mode 100644 lang/itcl/files/Makefile.lib create mode 100644 lang/itcl/files/patch-Makefile.in delete mode 100644 lang/itcl/files/patch-test delete mode 100644 lang/itcl/files/patch-warnings diff --git a/lang/itcl/Makefile b/lang/itcl/Makefile index e25f3a3f5d25..eb9c64322392 100644 --- a/lang/itcl/Makefile +++ b/lang/itcl/Makefile @@ -1,15 +1,11 @@ -# New ports collection makefile for: itcl -# Date created: Aug 17 1996 -# Whom: chuckr -# +# Created by: chuckr # $FreeBSD$ -# PORTNAME= itcl -PORTVERSION= 3.4b1 -PORTREVISION= 1 +PORTVERSION= 3.4.1 +PORTEPOCH= 1 CATEGORIES= lang tcl -MASTER_SITES= SF/incrtcl/%5BIncr%20Tcl_Tk%5D-source/3.4 +MASTER_SITES= SF/incrtcl/%5BIncr%20Tcl_Tk%5D-source/3.4.1 DISTNAME= itcl${PORTVERSION} MAINTAINER= erik@bz.bzflag.bz @@ -17,36 +13,45 @@ COMMENT= Object-oriented extension to Tcl [incr Tcl] USE_TCL= 84+ -USE_LDCONFIG= yes -MAKE_ENV+= ${PLIST_SUB} \ - SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR} \ - USE_TCL=${USE_TCL} TCL_INCLUDEDIR=${TCL_INCLUDEDIR} +USE_LDCONFIG= ${PREFIX}/lib/itcl${PORTVERSION:R} MAKE_JOBS_SAFE= yes -SHLIB_MAJOR= ${MAJOR} -SHLIB_MINOR= ${MINOR} -MAJOR= ${PORTVERSION:R} -MINOR= ${PORTVERSION:E:C/[a-z].*//} -PLIST_SUB+= MAJOR=${MAJOR} MINOR=${MINOR} -ITCL_LIB= libitcl.so -MAKEFILE= ${FILESDIR}/Makefile.lib -WRKSRC= ${WRKDIR}/itcl3.4 +WRKSRC= ${WRKDIR}/${PORTNAME}${PORTVERSION} + +GNU_CONFIGURE= yes +CFLAGS+= -I${TCL_INCLUDEDIR}/generic +CONFIGURE_ARGS= --with-tcl=${TCL_LIBDIR} \ + --with-tclinclude=${TCL_INCLUDEDIR} \ + --prefix=${PREFIX} \ + --exec-prefix=${PREFIX} +CONFIGURE_ENV+= ac_cv_c_tclh=${TCL_INCLUDEDIR}/unix +PLIST_SUB+= PORTVERSION=${PORTVERSION} \ + VERSION=${PORTVERSION:R} \ + MAJOR=${PORTVERSION:R:R} \ + SHORT=${PORTVERSION:R:S/.//} MANCOMPRESSED= no -MANN= body.n class.n code.n configbody.n delete.n ensemble.n find.n -MANN+= is.n itcl.n itclvars.n local.n scope.n +MANN= body.itcl class.itcl code.itcl configbody.itcl delete.itcl ensemble.itcl find.itcl \ + is.itcl itcl.itcl itclvars.itcl local.itcl scope.itcl MAN3= Itcl_RegisterC.3 Itcl_Stack.3 Itcl_Class.3 Itcl_List.3 Itcl_Object.3 Itcl_Preserve.3 -ITCL_LIB_FILE= ${ITCL_LIB}.${SHLIB_MAJOR} - .include +post-patch: + ${REINPLACE_CMD} -r '/^includedir/s|/include|/include/itcl${PORTVERSION:R}|' \ + ${WRKSRC}/${CONFIGURE_SCRIPT} + post-build test: cd ${WRKSRC} && ${SETENV} ITCL_LIBRARY=${WRKSRC}/library \ - ${TCLSH} tests/all.tcl -load "load ./${ITCL_LIB}" + ${TCLSH} tests/all.tcl -load "load ./libitcl.so.1" post-install: - ${INSTALL_DATA} ${WRKSRC}/doc/*.n ${PREFIX}/man/mann/ + ${LN} -sf ${PREFIX}/lib/${PORTNAME}${PORTVERSION:R}/libitcl.so.1 \ + ${PREFIX}/lib/libitcl.so.${PORTVERSION:R:R} + ${LN} -sf ${PREFIX}/lib/${PORTNAME}${PORTVERSION:R}/libitcl.so.1 \ + ${PREFIX}/lib/${PORTNAME}${PORTVERSION:R}/libitcl${PORTVERSION:R:S/.//}.so + ${LN} -sf ${PREFIX}/lib/${PORTNAME}${PORTVERSION:R}/libitcl.so.1 \ + ${PREFIX}/lib/libitcl.so .for FILE in ${MAN3} ${INSTALL_DATA} ${WRKSRC}/doc/${FILE:S/Itcl_//} ${PREFIX}/man/man3/${FILE} .endfor diff --git a/lang/itcl/distinfo b/lang/itcl/distinfo index d1d7262ba072..598c038cee9e 100644 --- a/lang/itcl/distinfo +++ b/lang/itcl/distinfo @@ -1,2 +1,2 @@ -SHA256 (itcl3.4b1.tar.gz) = dc99fcf6c00b00774dbfb94ccc437ea3e6315a198645b6d2acf8acba8fdb4608 -SIZE (itcl3.4b1.tar.gz) = 306342 +SHA256 (itcl3.4.1.tar.gz) = 5330832ce72da97610497a58eca904287d0ff91f9ec741a4e4810d5b933c8568 +SIZE (itcl3.4.1.tar.gz) = 263316 diff --git a/lang/itcl/files/Makefile.lib b/lang/itcl/files/Makefile.lib deleted file mode 100644 index 7c669fa80f19..000000000000 --- a/lang/itcl/files/Makefile.lib +++ /dev/null @@ -1,50 +0,0 @@ -NO_PROFILE= yes -LIB= itcl -ITCL_LIBRARY= ${PREFIX}/lib/itcl${MAJOR}.${MINOR} -CFLAGS+= -I. -I./../generic \ - -I${TCL_INCLUDEDIR}/generic \ - -DHAVE_GETCWD=1 -DNO_VALUES_H=1 -DHAVE_UNISTD_H=1 -DUSE_TERMIOS=1\ - -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1\ - -DHAVE_TM_GMTOFF=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1\ - -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1\ - -DTCL_SHLIB_EXT=\".so\" \ - -DHAVE_SYS_FILIO_H=1 \ - -DRETSIGTYPE=void \ - -DITCL_LIBRARY=\"${ITCL_LIBRARY}\" -CFLAGS+= -Werror -LDADD+= -L${PREFIX}/lib -ltcl${USE_TCL} - -.if ${USE_TCL} >= 85 -LDADD+= -ltclstub${USE_TCL} -.endif - -.PATH: ${.CURDIR}/unix ${.CURDIR}/generic ${.CURDIR}/man - -SRCS= itcl_bicmds.c itcl_class.c itcl_cmds.c itcl_ensemble.c \ - itcl_linkage.c itcl_methods.c itcl_migrate.c itcl_objects.c \ - itcl_parse.c itcl_util.c itclStubInit.c itclStubLib.c - -pkgIndex.tcl: pkgIndex.tcl.in - sed -e 's#"@PKG_LIB_FILE@"#.. ${SHLIB_NAME}#' -e "s#@PACKAGE_VERSION@#${MAJOR}.${MINOR}#" \ - < $> > $@ - -itclConfig.sh: itclConfig.sh.in - sed -e 's#@itcl_LIB_FILE@#${SHLIB_NAME}#g' \ - -e "s#@PACKAGE_VERSION@#${MAJOR}.${MINOR}#" \ - -e 's#@itcl_BUILD_LIB_SPEC@#-L${LIBDIR} -litcl#' \ - -e 's#@itcl_LIB_SPEC@#-L${LIBDIR} -litcl#' < $> > $@ - -SCRIPTDIR= lib/itcl${MAJOR}.${MINOR} -SCRIPTPATH= ${PREFIX}/${SCRIPTDIR} -LIBDIR= ${PREFIX}/lib -INCDIR= ${PREFIX}/include/itcl${MAJOR}.${MINOR} - -${SCRIPTPATH} ${INCDIR}: - mkdir -p ${.TARGET} - -beforeinstall: pkgIndex.tcl itclConfig.sh ${SCRIPTPATH} ${INCDIR} - ${BSD_INSTALL_DATA} pkgIndex.tcl itclConfig.sh ${.CURDIR}/library/itcl.tcl \ - ${SCRIPTPATH} - ${BSD_INSTALL_DATA} ${.CURDIR}/generic/*.h ${INCDIR} - -.include diff --git a/lang/itcl/files/patch-Makefile.in b/lang/itcl/files/patch-Makefile.in new file mode 100644 index 000000000000..1aa5a5f4681a --- /dev/null +++ b/lang/itcl/files/patch-Makefile.in @@ -0,0 +1,28 @@ +--- Makefile.in.orig 2011-07-15 20:30:52.000000000 +0200 ++++ Makefile.in 2013-04-30 15:46:51.000000000 +0200 +@@ -199,11 +199,12 @@ + @$(INSTALL_DATA_DIR) $(DESTDIR)$(mandir)/mann + @echo "Installing man pages in $(DESTDIR)$(mandir)" + @cd $(srcdir)/doc; for i in *.n; do \ +- echo "Installing $$i"; \ +- rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \ ++ sfxname=`basename $$i | sed -e 's|.n$$|.itcl|'`; \ ++ echo "Installing $$i as $(DESTDIR)$(mandir)/mann/$$sfxname"; \ ++ rm -f $(DESTDIR)$(mandir)/mann/$$sfxname; \ + sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \ +- $$i > $(DESTDIR)$(mandir)/mann/$$i; \ +- chmod 444 $(DESTDIR)$(mandir)/mann/$$i; \ ++ $$i > $(DESTDIR)$(mandir)/mann/$$sfxname; \ ++ chmod 444 $(DESTDIR)$(mandir)/mann/$$sfxname; \ + done + + test: binaries libraries +@@ -378,7 +379,7 @@ + fi; \ + done + $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir) +- $(INSTALL_DATA) itclConfig.sh $(DESTDIR)$(libdir) ++ $(INSTALL_DATA) itclConfig.sh $(DESTDIR)$(pkglibdir) + + #======================================================================== + # Install binary executables (e.g. .exe files) diff --git a/lang/itcl/files/patch-test b/lang/itcl/files/patch-test deleted file mode 100644 index 4f8554bbfd81..000000000000 --- a/lang/itcl/files/patch-test +++ /dev/null @@ -1,26 +0,0 @@ ---- tests/ensemble.test 2004-02-12 13:09:50.000000000 -0500 -+++ tests/ensemble.test 2010-01-24 14:57:20.000000000 -0500 -@@ -97,12 +97,19 @@ - "itcl::ensemble test_numbers {part foo}"}} - --test ensemble-1.11 {part argument errors are handled gracefully} { -- list [catch "itcl::ensemble test_numbers {part foo {{}} {}}" msg] $msg $errorInfo --} {1 {procedure "foo" has argument with no name} {procedure "foo" has argument with no name -+if {$tcl_version < 8.5} { -+ set errmsg111 {procedure "foo" has argument with no name} -+} else { -+ set errmsg111 {argument with no name} -+} -+set errmsg111 [format {1 {%s} {%s - while executing - "part foo {{}} {}" - ("ensemble" body line 1) - invoked from within --"itcl::ensemble test_numbers {part foo {{}} {}}"}} -+"itcl::ensemble test_numbers {part foo {{}} {}}"}} $errmsg111 $errmsg111] -+ -+test ensemble-1.11 {part argument errors are handled gracefully} { -+ list [catch "itcl::ensemble test_numbers {part foo {{}} {}}" msg] $msg $errorInfo -+} $errmsg111 - - test ensemble-2.0 {defining subensembles} { diff --git a/lang/itcl/files/patch-warnings b/lang/itcl/files/patch-warnings deleted file mode 100644 index f313a078d9dc..000000000000 --- a/lang/itcl/files/patch-warnings +++ /dev/null @@ -1,164 +0,0 @@ ---- generic/itcl_bicmds.c 2008-10-04 11:22:39.000000000 -0400 -+++ generic/itcl_bicmds.c 2010-01-24 14:39:45.000000000 -0500 -@@ -1022,5 +1022,5 @@ - Tcl_Obj *objPtr = NULL; - -- static char *options[] = { -+ static const char *options[] = { - "-args", "-body", "-name", "-protection", "-type", - (char*)NULL -@@ -1213,9 +1213,9 @@ - Tcl_Obj *CONST objv[]; /* argument objects */ - { -- char *varName = NULL; -+ const char *varName = NULL; - Tcl_Obj *resultPtr = NULL; - Tcl_Obj *objPtr = NULL; - -- static char *options[] = { -+ static const char *options[] = { - "-config", "-init", "-name", "-protection", "-type", - "-value", (char*)NULL ---- generic/itcl_cmds.c 2008-12-15 15:02:58.000000000 -0500 -+++ generic/itcl_cmds.c 2010-01-24 14:41:33.000000000 -0500 -@@ -30,4 +30,5 @@ - */ - #include "itclInt.h" -+#include - - /* -@@ -883,5 +884,5 @@ - Tcl_Obj *CONST objv[]; /* argument objects */ - { -- int pLevel = (int)clientData; -+ int pLevel = (intptr_t)clientData; - - int result; ---- generic/itcl_ensemble.c 2008-12-15 15:02:58.000000000 -0500 -+++ generic/itcl_ensemble.c 2010-01-24 14:47:49.000000000 -0500 -@@ -103,5 +103,5 @@ - - static int CreateEnsemble _ANSI_ARGS_((Tcl_Interp *interp, -- Ensemble *parentEnsData, char *ensName)); -+ Ensemble *parentEnsData, const char *ensName)); - - static int AddEnsemblePart _ANSI_ARGS_((Tcl_Interp *interp, -@@ -112,5 +112,5 @@ - static void DeleteEnsemble _ANSI_ARGS_((ClientData clientData)); - --static int FindEnsemble _ANSI_ARGS_((Tcl_Interp *interp, char **nameArgv, -+static int FindEnsemble _ANSI_ARGS_((Tcl_Interp *interp, const char **nameArgv, - int nameArgc, Ensemble** ensDataPtr)); - -@@ -212,5 +212,5 @@ - CONST char* ensName; /* name of the new ensemble */ - { -- char **nameArgv = NULL; -+ const char **nameArgv = NULL; - int nameArgc; - Ensemble *parentEnsData; -@@ -319,5 +319,5 @@ - Tcl_CmdDeleteProc *deleteProc; /* procedure used to destroy client data */ - { -- char **nameArgv = NULL; -+ const char **nameArgv = NULL; - int nameArgc; - Ensemble *ensData; -@@ -396,5 +396,5 @@ - Tcl_CmdInfo *infoPtr; /* returns: info associated with part */ - { -- char **nameArgv = NULL; -+ const char **nameArgv = NULL; - int nameArgc; - Ensemble *ensData; -@@ -508,5 +508,5 @@ - Tcl_Obj *objPtr; /* returns: summary of usage info */ - { -- char **nameArgv = NULL; -+ const char **nameArgv = NULL; - int nameArgc; - Ensemble *ensData; -@@ -752,5 +752,5 @@ - Tcl_Interp *interp; /* interpreter to be updated */ - Ensemble *parentEnsData; /* parent ensemble or NULL */ -- char *ensName; /* name of the new ensemble */ -+ const char *ensName; /* name of the new ensemble */ - { - Ensemble *ensData; -@@ -957,5 +957,5 @@ - FindEnsemble(interp, nameArgv, nameArgc, ensDataPtr) - Tcl_Interp *interp; /* interpreter containing the ensemble */ -- char **nameArgv; /* path of names leading to ensemble */ -+ const char **nameArgv; /* path of names leading to ensemble */ - int nameArgc; /* number of strings in nameArgv */ - Ensemble** ensDataPtr; /* returns: ensemble data */ ---- generic/itcl_methods.c 2008-12-15 15:02:58.000000000 -0500 -+++ generic/itcl_methods.c 2010-01-24 14:50:55.000000000 -0500 -@@ -981,6 +981,6 @@ - } - else if ((mcode->flags & ITCL_IMPLEMENT_ARGCMD) != 0) { -- char **argv; -- argv = (char**)ckalloc( (unsigned)(objc*sizeof(char*)) ); -+ const char *argv[objc]; -+ - for (i=0; i < objc; i++) { - argv[i] = Tcl_GetStringFromObj(objv[i], (int*)NULL); -@@ -989,6 +989,4 @@ - result = (*mcode->cfunc.argCmd)(mcode->clientData, - interp, objc, argv); -- -- ckfree((char*)argv); - } - else if ((mcode->flags & ITCL_IMPLEMENT_TCL) != 0) { -@@ -1050,5 +1048,5 @@ - - int i, argc, fargc; -- char **argv, **fargv; -+ const char **argv, **fargv; - CompiledLocal *localPtr, *last; - -@@ -1825,5 +1823,5 @@ - - int defargc; -- char **defargv = NULL; -+ const char **defargv = NULL; - Tcl_Obj **defobjv = NULL; - int configc = 0; ---- generic/itcl_objects.c 2007-08-07 16:05:30.000000000 -0400 -+++ generic/itcl_objects.c 2010-01-24 14:52:10.000000000 -0500 -@@ -1155,5 +1155,5 @@ - { - int namec; -- char **namev; -+ const char **namev; - Tcl_Interp *errs; - Tcl_CmdInfo cmdInfo; ---- generic/itcl_util.c 2007-08-07 16:05:30.000000000 -0400 -+++ generic/itcl_util.c 2010-01-24 14:54:01.000000000 -0500 -@@ -1274,5 +1274,5 @@ - CONST char *pos; - int listc, result; -- char **listv; -+ const char **listv; - - cmdName = ckalloc((unsigned)strlen(name)+1); ---- generic/itclInt.h.orig 2008-12-15 21:02:58.000000000 +0100 -+++ generic/itclInt.h 2012-08-31 16:07:23.000000000 +0200 -@@ -63,7 +63,7 @@ - #if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6) - #define ERRORLINE(interp) ((interp)->errorLine) - #else --#define ERRORLINE(interp) (Tcl_GetErrorLine(interp)) -+#define ERRORLINE(interp) (Tcl_GetErrorLine((Tcl_Interp *)interp)) - #endif - - #define ITCL_TCL_PRE_8_5 (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 5) -@@ -206,7 +206,7 @@ - Tcl_HashEntry entry; - } ItclVarInHash; - --#define ItclOffset(type, field) ((int) ((char *) &((type *) 0)->field)) -+#define ItclOffset(type, field) ((intptr_t)((char *) &((type *) 0)->field)) - - #define itclOldRuntime (itclVarFlagOffset!=0) - diff --git a/lang/itcl/pkg-plist b/lang/itcl/pkg-plist index 4aaa8e02c4dd..01b9055b915e 100644 --- a/lang/itcl/pkg-plist +++ b/lang/itcl/pkg-plist @@ -1,12 +1,14 @@ -include/itcl%%MAJOR%%.%%MINOR%%/itcl.h -include/itcl%%MAJOR%%.%%MINOR%%/itclInt.h -include/itcl%%MAJOR%%.%%MINOR%%/itclDecls.h -include/itcl%%MAJOR%%.%%MINOR%%/itclIntDecls.h +include/itcl%%VERSION%%/itcl.h +include/itcl%%VERSION%%/itclInt.h +include/itcl%%VERSION%%/itclDecls.h +include/itcl%%VERSION%%/itclIntDecls.h lib/libitcl.so.%%MAJOR%% lib/libitcl.so -lib/libitcl.a -lib/itcl%%MAJOR%%.%%MINOR%%/itcl.tcl -lib/itcl%%MAJOR%%.%%MINOR%%/itclConfig.sh -lib/itcl%%MAJOR%%.%%MINOR%%/pkgIndex.tcl -@dirrm include/itcl%%MAJOR%%.%%MINOR%% -@dirrm lib/itcl%%MAJOR%%.%%MINOR%% +lib/itcl%%VERSION%%/libitcl.so.1 +lib/itcl%%VERSION%%/libitcl%%SHORT%%.so +lib/itcl%%VERSION%%/itcl.tcl +lib/itcl%%VERSION%%/itclConfig.sh +lib/itcl%%VERSION%%/libitclstub.a +lib/itcl%%VERSION%%/pkgIndex.tcl +@dirrm include/itcl%%VERSION%% +@dirrm lib/itcl%%VERSION%%