View | Details | Raw Unified | Return to bug 192287
Collapse All | Expand All

(-)Makefile (-14 / +6 lines)
Lines 2-11 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	tclX
4
PORTNAME=	tclX
5
PORTVERSION=	8.4
5
PORTVERSION=	8.4.1
6
PORTREVISION=	3
7
CATEGORIES=	lang tcl devel
6
CATEGORIES=	lang tcl devel
8
MASTER_SITES=	SF/${PORTNAME:tl}/TclX/${PORTVERSION}.0
7
MASTER_SITES=	SF/${PORTNAME:tl}/TclX/${PORTVERSION}
9
DISTNAME=	tclx${PORTVERSION}
8
DISTNAME=	tclx${PORTVERSION}
10
9
11
MAINTAINER=	mi@aldan.algebra.com
10
MAINTAINER=	mi@aldan.algebra.com
Lines 16-32 Link Here
16
LICENSE_FILE=	${WRKSRC}/license.terms
15
LICENSE_FILE=	${WRKSRC}/license.terms
17
LICENSE_PERMS=	auto-accept dist-mirror dist-sell pkg-mirror pkg-sell
16
LICENSE_PERMS=	auto-accept dist-mirror dist-sell pkg-mirror pkg-sell
18
17
18
WRKSRC=		${WRKDIR}/${PORTNAME:tl}${PORTVERSION:R}
19
19
20
USES=		tcl tar:bzip2
20
USES=		tcl tar:bzip2
21
USE_LDCONFIG=	${PREFIX}/lib/tclx${PORTVERSION}
21
USE_LDCONFIG=	${PREFIX}/lib/tclx${PORTVERSION:R}
22
GNU_CONFIGURE=	yes
22
USE_AUTOTOOLS=	autoconf
23
CPPFLAGS+=	-I${TCL_INCLUDEDIR}/unix\
24
		-I${TCL_INCLUDEDIR}/generic
25
CONFIGURE_ARGS=	--exec-prefix=${PREFIX} \
23
CONFIGURE_ARGS=	--exec-prefix=${PREFIX} \
26
		--enable-shared \
24
		--enable-shared \
27
		--with-help=Help \
25
		--with-help=Help \
28
		--with-tcl="${TCL_LIBDIR}"
26
		--with-tcl="${TCL_LIBDIR}"
29
PLIST_SUB=	TCLX_VER=${PORTVERSION}
27
PLIST_SUB=	TCLX_VER=${PORTVERSION:R}
30
ALL_TARGET=	binaries libraries
28
ALL_TARGET=	binaries libraries
31
INSTALL_TARGET=	install-binaries install-libraries
29
INSTALL_TARGET=	install-binaries install-libraries
32
30
Lines 34-48 Link Here
34
32
35
.if ${TCL_VER} > 8.4
33
.if ${TCL_VER} > 8.4
36
EXTRA_PATCHES+=	${FILESDIR}/tcl85-test-patch
34
EXTRA_PATCHES+=	${FILESDIR}/tcl85-test-patch
37
PLIST_SUB+=	BELOW_85='@comment '
38
.else
39
PLIST_SUB+=	BELOW_85=''
40
.endif
35
.endif
41
36
42
post-configure:
37
post-configure:
43
	${REINPLACE_CMD} -e	\
44
	    's,^TCLSH_PROG.*,TCLSH_PROG=${TCLSH},' \
45
	    -e 's,TCL_LIBRARY=.*,\\,' ${WRKSRC}/Makefile
46
	# Disabling the failing help.test
38
	# Disabling the failing help.test
47
	${MV} ${WRKSRC}/tests/help.test ${WRKSRC}/tests/help.test.dis
39
	${MV} ${WRKSRC}/tests/help.test ${WRKSRC}/tests/help.test.dis
48
40
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (tclx8.4.tar.bz2) = 257591f9dffc21cf3ed541a9ef81a3ff5dd739dff5cebb70c4cec7010e2def66
1
SHA256 (tclx8.4.1.tar.bz2) = a9b41f606ec6c1268b9c78512e6e1cb533bd9ae3e786e650d111fc16ffe758ec
2
SIZE (tclx8.4.tar.bz2) = 313595
2
SIZE (tclx8.4.1.tar.bz2) = 330073
(-)files/patch-configure (-18 lines)
Lines 1-18 Link Here
1
--- configure.orig	Sat Oct  8 01:17:50 2005
2
+++ configure	Sun Mar 25 15:34:58 2007
3
@@ -6917,7 +6917,7 @@
4
         fi
5
     else
6
         # tclConfig.sh is in $INSTALL/lib directory
7
-        REAL_TCL_BIN_DIR=`cd ${TCL_BIN_DIR}/../bin/;pwd`
8
+        REAL_TCL_BIN_DIR=`cd ${TCL_BIN_DIR}/../../bin/;pwd`
9
         if test "$TEA_PLATFORM" = "windows"; then
10
             TCLSH_PROG=${REAL_TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}
11
         else
12
@@ -7000,5 +7000,5 @@
13
 
14
 	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
15
-		system=MP-RAS-`awk '{print }' /etc/.relid'`
16
+		system=MP-RAS-`awk '{print }' /etc/.relid`
17
 	    fi
18
 	    if test "`uname -s`" = "AIX" ; then
(-)files/patch-errorLine (-73 lines)
Lines 1-73 Link Here
1
Index: generic/tclExtdInt.h
2
===================================================================
3
RCS file: /cvsroot/tclx/tclx/generic/tclExtdInt.h,v
4
retrieving revision 1.7
5
retrieving revision 1.8
6
diff -U2 -r1.7 -r1.8
7
--- generic/tclExtdInt.h	12 Jul 2005 19:03:15 -0000	1.7
8
+++ generic/tclExtdInt.h	15 Dec 2008 20:00:27 -0000	1.8
9
@@ -13,5 +13,5 @@
10
  * implied warranty.
11
  *-----------------------------------------------------------------------------
12
- * $Id: tclExtdInt.h,v 1.7 2005/07/12 19:03:15 hobbs Exp $
13
+ * $Id: tclExtdInt.h,v 1.8 2008/12/15 20:00:27 andreas_kupries Exp $
14
  *-----------------------------------------------------------------------------
15
  */
16
@@ -186,4 +186,13 @@
17
 
18
 /*
19
+ * Handle hiding of errorLine in 8.6
20
+ */
21
+#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
22
+#define ERRORLINE(interp) ((interp)->errorLine)
23
+#else
24
+#define ERRORLINE(interp) (Tcl_GetErrorLine(interp))
25
+#endif
26
+
27
+/*
28
  * Callback type for walking directories.
29
  */
30
Index: generic/tclXgeneral.c
31
===================================================================
32
RCS file: /cvsroot/tclx/tclx/generic/tclXgeneral.c,v
33
retrieving revision 1.3
34
retrieving revision 1.4
35
diff -U2 -r1.3 -r1.4
36
--- generic/tclXgeneral.c	4 Apr 2002 06:09:05 -0000	1.3
37
+++ generic/tclXgeneral.c	15 Dec 2008 20:00:27 -0000	1.4
38
@@ -13,5 +13,5 @@
39
  * implied warranty.
40
  *-----------------------------------------------------------------------------
41
- * $Id: tclXgeneral.c,v 1.3 2002/04/04 06:09:05 hobbs Exp $
42
+ * $Id: tclXgeneral.c,v 1.4 2008/12/15 20:00:27 andreas_kupries Exp $
43
  *-----------------------------------------------------------------------------
44
  */
45
@@ -406,5 +406,5 @@
46
 		
47
 		sprintf (buf, "\n    (\"loop\" body line %d)", 
48
-			interp->errorLine);
49
+			ERRORLINE(interp));
50
 		Tcl_AddErrorInfo (interp, buf);
51
 	    }
52
Index: generic/tclXlib.c
53
===================================================================
54
RCS file: /cvsroot/tclx/tclx/generic/tclXlib.c,v
55
retrieving revision 1.4
56
retrieving revision 1.5
57
diff -U2 -r1.4 -r1.5
58
--- generic/tclXlib.c	24 Mar 2005 05:04:38 -0000	1.4
59
+++ generic/tclXlib.c	15 Dec 2008 20:00:27 -0000	1.5
60
@@ -13,5 +13,5 @@
61
  * implied warranty.
62
  *-----------------------------------------------------------------------------
63
- * $Id: tclXlib.c,v 1.4 2005/03/24 05:04:38 hobbs Exp $
64
+ * $Id: tclXlib.c,v 1.5 2008/12/15 20:00:27 andreas_kupries Exp $
65
  *-----------------------------------------------------------------------------
66
  */
67
@@ -240,5 +240,5 @@
68
     buf = ckalloc (strlen (fileName) + 64);
69
     sprintf (buf, "\n    (file \"%s\" line %d)", fileName,
70
-             interp->errorLine);
71
+             ERRORLINE(interp));
72
     Tcl_AddErrorInfo (interp, buf);
73
     ckfree (buf);
(-)files/patch-generic_tclXchmod.c (+10 lines)
Line 0 Link Here
1
--- generic/tclXchmod.c.orig	2014-07-30 17:45:54.000000000 +0200
2
+++ generic/tclXchmod.c	2014-07-30 17:48:09.000000000 +0200
3
@@ -353,6 +353,7 @@
4
 	modeInfo.absMode = modeBits;
5
         modeInfo.symMode = NULL;
6
     } else {
7
+        modeInfo.absMode = 0; // not used, but keeps compilers happy
8
         modeInfo.symMode = modeString;
9
     }
10
 
(-)files/patch-generic_tclXdup.c (+11 lines)
Line 0 Link Here
1
--- generic/tclXdup.c.orig	2014-07-30 16:44:06.000000000 +0200
2
+++ generic/tclXdup.c	2014-07-30 16:45:30.000000000 +0200
3
@@ -128,7 +128,7 @@
4
     char       *targetChannelId;
5
 {
6
     Tcl_Channel srcChannel, newChannel = NULL;
7
-    Tcl_ChannelType *channelType;
8
+    const Tcl_ChannelType *channelType;
9
     int mode;
10
 
11
     srcChannel = Tcl_GetChannel (interp, srcChannelId, &mode);
(-)files/patch-generic_tclXfcntl.c (+12 lines)
Line 0 Link Here
1
--- generic/tclXfcntl.c.orig	2014-07-30 16:45:58.000000000 +0200
2
+++ generic/tclXfcntl.c	2014-07-30 16:46:21.000000000 +0200
3
@@ -162,7 +162,8 @@
4
     int          mode;
5
     int          attrib;
6
 {
7
-    int value, optValue;
8
+    int value = 0;
9
+    int optValue;
10
 
11
     switch (attrib) {
12
       case ATTR_RDONLY:
(-)files/patch-generic_tclXhandles.c (+11 lines)
Line 0 Link Here
1
--- generic/tclXhandles.c.orig	2014-07-30 17:35:38.000000000 +0200
2
+++ generic/tclXhandles.c	2014-07-30 17:35:43.000000000 +0200
3
@@ -567,7 +567,7 @@
4
 
5
     entryHdrPtr = HEADER_AREA (entryPtr);
6
     if (entryHdrPtr->freeLink != ALLOCATED_IDX)
7
-        panic ("Tcl_HandleFree: entry not allocated %x\n", entryHdrPtr);
8
+        panic ("Tcl_HandleFree: entry not allocated %p\n", entryHdrPtr);
9
 
10
     entryHdrPtr->freeLink = tblHdrPtr->freeHeadIdx;
11
     tblHdrPtr->freeHeadIdx =
(-)files/patch-generic_tclXutil.c (+20 lines)
Line 0 Link Here
1
--- generic/tclXutil.c.orig	2014-07-30 16:56:00.000000000 +0200
2
+++ generic/tclXutil.c	2014-07-30 16:56:50.000000000 +0200
3
@@ -870,7 +870,7 @@
4
 TclX_IsNullObj (objPtr)
5
     Tcl_Obj *objPtr;
6
 {
7
-    static Tcl_ObjType *listType = NULL, *stringType = NULL;
8
+    const static Tcl_ObjType *listType = NULL, *stringType = NULL;
9
     int length;
10
     
11
     /*
12
@@ -956,7 +956,7 @@
13
 {
14
     Tcl_Obj **saveObjv;
15
     int saveObjc;
16
-    long flags;
17
+    long flags = 0;
18
 
19
     if ((Tcl_ListObjGetElements (NULL, saveObjPtr, &saveObjc,
20
                                  &saveObjv) != TCL_OK) ||
(-)files/patch-profile (-103 lines)
Lines 1-103 Link Here
1
This first patch fixes a seg-fault at `make test' time -- profile.test crashes
2
without this change.
3
4
Submitted to maintainers:
5
6
https://sourceforge.net/tracker/index.php?func=detail&aid=1925400&group_id=13247&atid=113247
7
8
and committed upstream.
9
10
The second changes TclXOSElapsedTime to better handles clock_t being too
11
narrow (32-bit on FreeBSD).
12
13
Getting it committed upstream...
14
15
	-mi
16
17
--- generic/tclXprofile.c	2004-11-22 19:12:54.000000000 -0500
18
+++ generic/tclXprofile.c	2009-07-31 02:44:11.000000000 -0400
19
@@ -674,5 +674,5 @@
20
     CallFrame  *framePtr;
21
 {
22
-    if (framePtr == NULL)
23
+    if (framePtr == NULL || framePtr->objv == NULL)
24
         return;
25
     InitializeProcStack (infoPtr, framePtr->callerPtr);
26
--- unix/tclXunixOS.c	2005-07-12 15:03:15.000000000 -0400
27
+++ unix/tclXunixOS.c	2009-11-27 02:00:57.000000000 -0500
28
@@ -550,4 +550,10 @@
29
  *   o realTime - Elapsed real time, in milliseconds is returned here.
30
  *   o cpuTime - Elapsed CPU time, in milliseconds is returned here.
31
+ *
32
+ * XXX In some cases, clock_t may not be wide enough, such as when it is
33
+ * XXX a signed 32-bit value, its maximum is 2^31 or 2147483648. There
34
+ * XXX are more milliseconds in 25 days: 25*1000*60*60*24 = 2160000000.
35
+ * XXX If a profile-session is to last longer than that, the API needs
36
+ * XXX to use 64-bit values. -mi Nov 27, 2009
37
  *-----------------------------------------------------------------------------
38
  */
39
@@ -557,4 +563,5 @@
40
     clock_t *cpuTime;
41
 {
42
+    struct tms cpuTimes;
43
 /*
44
  * If times returns elapsed real time, this is easy.  If it returns a status,
45
@@ -562,25 +569,34 @@
46
  */
47
 #ifndef TIMES_RETS_STATUS
48
-    struct tms cpuTimes;
49
+    static clock_t startTime;
50
+    clock_t currentTime;
51
 
52
-    *realTime = TclXOSTicksToMS (times (&cpuTimes));
53
-    *cpuTime = TclXOSTicksToMS (cpuTimes.tms_utime + cpuTimes.tms_stime);
54
+    /*
55
+     * If this is the first call, get base time.
56
+     */
57
+    currentTime = times (&cpuTimes);
58
+    if (startTime == 0) {
59
+	startTime = currentTime;
60
+        *realTime = 0;
61
+    } else
62
+	*realTime = TclXOSTicksToMS (currentTime - startTime);
63
 #else
64
     static struct timeval startTime = {0, 0};
65
     struct timeval currentTime;
66
-    struct tms cpuTimes;
67
 
68
     /*
69
      * If this is the first call, get base time.
70
      */
71
-    if ((startTime.tv_sec == 0) && (startTime.tv_usec == 0))
72
+    if ((startTime.tv_sec == 0) && (startTime.tv_usec == 0)) {
73
         gettimeofday (&startTime, NULL);
74
-    
75
-    gettimeofday (&currentTime, NULL);
76
-    currentTime.tv_sec  = currentTime.tv_sec  - startTime.tv_sec;
77
-    currentTime.tv_usec = currentTime.tv_usec - startTime.tv_usec;
78
-    *realTime = (currentTime.tv_sec  * 1000) + (currentTime.tv_usec / 1000);
79
+	*realTime = 0;
80
+    } else {
81
+	gettimeofday (&currentTime, NULL);
82
+	currentTime.tv_sec  = currentTime.tv_sec  - startTime.tv_sec;
83
+	currentTime.tv_usec = currentTime.tv_usec - startTime.tv_usec;
84
+	*realTime = (currentTime.tv_sec  * 1000) + (currentTime.tv_usec / 1000);
85
+    }
86
     times (&cpuTimes);
87
-    *cpuTime = TclXOSTicksToMS (cpuTimes.tms_utime + cpuTimes.tms_stime);
88
 #endif
89
+    *cpuTime = TclXOSTicksToMS (cpuTimes.tms_utime + cpuTimes.tms_stime);
90
 }
91
--- unix/tclXunixPort.h	2005-10-07 19:30:28.000000000 -0400
92
+++ unix/tclXunixPort.h	2009-11-27 02:31:15.000000000 -0500
93
@@ -66,4 +66,10 @@
94
  * Make sure CLK_TCK is defined.
95
  */
96
+#ifdef __FreeBSD__
97
+#	if defined(CLK_TCK) && CLK_TCK == 128
98
+#		undef CLK_TCK
99
+#		define CLK_TCK	sysconf(_SC_CLK_TCK)
100
+#	endif
101
+#endif
102
 #ifndef CLK_TCK
103
 #    ifdef HZ
(-)files/patch-unix_tclXunixDup.c (+11 lines)
Line 0 Link Here
1
--- unix/tclXunixDup.c.orig	2014-07-30 16:57:13.000000000 +0200
2
+++ unix/tclXunixDup.c	2014-07-30 17:00:42.000000000 +0200
3
@@ -84,7 +84,7 @@
4
     char       *targetChannelId;
5
 {
6
     ClientData handle;
7
-    Tcl_ChannelType *channelType;
8
+    const Tcl_ChannelType *channelType;
9
     Tcl_Channel newChannel = NULL;
10
     int srcFileNum, newFileNum = -1;
11
 

Return to bug 192287