Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 May 2013 07:35:58 +0000 (UTC)
From:      Pietro Cerutti <gahr@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r318002 - in head/devel/tclcl: . files
Message-ID:  <201305130735.r4D7ZwO5098259@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gahr
Date: Mon May 13 07:35:58 2013
New Revision: 318002
URL: http://svnweb.freebsd.org/changeset/ports/318002

Log:
  - Fix build with Tcl/Tk 86
  - While at it, trim Makefile header and s/PORTDOCS/PORT_OPTIONS:MDOCS/
  
  Reported by:	miwi (Tcl/Tk 86 exp-run)

Added:
  head/devel/tclcl/files/patch-Tcl2.cc   (contents, props changed)
  head/devel/tclcl/files/patch-rate-variable.cc   (contents, props changed)
  head/devel/tclcl/files/patch-rate-variable.h   (contents, props changed)
  head/devel/tclcl/files/patch-tclcl.h   (contents, props changed)
Modified:
  head/devel/tclcl/Makefile
  head/devel/tclcl/files/patch-Tcl.cc   (contents, props changed)

Modified: head/devel/tclcl/Makefile
==============================================================================
--- head/devel/tclcl/Makefile	Mon May 13 07:00:47 2013	(r318001)
+++ head/devel/tclcl/Makefile	Mon May 13 07:35:58 2013	(r318002)
@@ -1,9 +1,5 @@
-# New ports collection makefile for: tclcl
-# Date created:		23 April 1999
-# Whom:			obonilla@fisicc-ufm.edu
-#
+# Created by: obonilla@fisicc-ufm.edu
 # $FreeBSD$
-#
 
 PORTNAME=	tclcl
 PORTVERSION=	1.20
@@ -23,12 +19,9 @@ WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVER
 USE_XORG=	x11
 USE_AUTOTOOLS=	autoconf
 GNU_CONFIGURE=	yes
-
-.if !defined(NOPORTDOCS)
 PORTDOCS=	CHANGES.html TODO.html
-.endif
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 # We have to link against the same Tcl/Tk version as OTcl does
 .if exists(${LOCALBASE}/bin/otclsh)
@@ -38,8 +31,6 @@ USE_TK=		${OTCL_TCLVER:S/.//}
 USE_TK=		84+
 .endif
 
-.include "${PORTSDIR}/Mk/bsd.tcl.mk"
-
 CONFIGURE_ARGS=	--with-tcl-ver=${TCL_VER} --with-tk-ver=${TK_VER}
 
 post-patch:
@@ -58,11 +49,11 @@ do-install:
 	@${LN} -sf ${PREFIX}/lib/libtclcl.a ${PREFIX}/lib/libTcl.a
 
 post-install:
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
 	@${MKDIR} ${DOCSDIR}
 .for FILE in ${PORTDOCS}
 	@${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
 .endfor
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/devel/tclcl/files/patch-Tcl.cc
==============================================================================
--- head/devel/tclcl/files/patch-Tcl.cc	Mon May 13 07:00:47 2013	(r318001)
+++ head/devel/tclcl/files/patch-Tcl.cc	Mon May 13 07:35:58 2013	(r318002)
@@ -1,5 +1,14 @@
---- Tcl.cc.orig	Sun Apr 29 16:21:14 2007
-+++ Tcl.cc	Sun Apr 29 16:21:26 2007
+--- Tcl.cc.orig	2007-02-04 02:46:43.000000000 +0100
++++ Tcl.cc	2013-05-13 09:19:37.000000000 +0200
+@@ -213,7 +213,7 @@
+ 	if (strlen(s) > MAX_CODE_TO_DUMP) {
+ 		s = "\n[code omitted because of length]\n";
+ 	};
+-	fprintf(stderr, "%s: \"%s\": %s\n", application_, s, tcl_->result);
++	fprintf(stderr, "%s: \"%s\": %s\n", application_, s, Tcl_GetStringResult(tcl_));
+ 	exit(1);
+ }
+ 
 @@ -546,7 +546,7 @@
  			need_parse = 1;
  			continue;

Added: head/devel/tclcl/files/patch-Tcl2.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/tclcl/files/patch-Tcl2.cc	Mon May 13 07:35:58 2013	(r318002)
@@ -0,0 +1,11 @@
+--- Tcl2.cc.orig	2013-05-13 09:23:36.000000000 +0200
++++ Tcl2.cc	2013-05-13 09:25:20.000000000 +0200
+@@ -88,7 +88,7 @@
+ 	va_list ap;
+ 	va_start(ap, fmt);
+ 	vsprintf(bp_, fmt, ap);
+-	tcl_->result = bp_;
++	Tcl_SetResult(tcl_, (char *)bp_, NULL);
+ }
+ 
+ void Tcl::add_errorf(const char* fmt, ...)

Added: head/devel/tclcl/files/patch-rate-variable.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/tclcl/files/patch-rate-variable.cc	Mon May 13 07:35:58 2013	(r318002)
@@ -0,0 +1,20 @@
+--- rate-variable.cc.orig	2013-05-13 09:26:02.000000000 +0200
++++ rate-variable.cc	2013-05-13 09:26:47.000000000 +0200
+@@ -65,7 +65,7 @@
+ 	(void)new RateVariable;
+ }
+ 
+-char* RateVariable::update_rate_var(ClientData clientData, Tcl_Interp* tcl,
++const char* RateVariable::update_rate_var(ClientData clientData, Tcl_Interp* tcl,
+ 				    CONST84 char* name1, 
+ 				    CONST84 char* name2, int flags)
+ {
+@@ -82,7 +82,7 @@
+ 		flags &= TCL_GLOBAL_ONLY;
+ 		CONST char* cv = (char *) Tcl_GetVar2(tcl, name1, name2, flags);
+ 		if (cv == NULL)
+-			return (tcl->result);
++			return (Tcl_GetStringResult(tcl));
+ 		int curval = atoi(cv);
+ 		double rate = 0.;
+ 		timeval tv;

Added: head/devel/tclcl/files/patch-rate-variable.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/tclcl/files/patch-rate-variable.h	Mon May 13 07:35:58 2013	(r318002)
@@ -0,0 +1,11 @@
+--- rate-variable.h.orig	2013-05-13 09:26:59.000000000 +0200
++++ rate-variable.h	2013-05-13 09:27:45.000000000 +0200
+@@ -41,7 +41,7 @@
+ 	RateVariable() : TclCommand("rate_variable") {}
+ 	static void init();
+ protected:
+-	static char* update_rate_var(ClientData, Tcl_Interp*, 
++	static const char* update_rate_var(ClientData, Tcl_Interp*, 
+ 				     CONST84 char* name1,	
+ 				     CONST84 char* name2, 
+ 				     int flags);

Added: head/devel/tclcl/files/patch-tclcl.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/tclcl/files/patch-tclcl.h	Mon May 13 07:35:58 2013	(r318002)
@@ -0,0 +1,11 @@
+--- tclcl.h.orig	2013-05-13 09:20:07.000000000 +0200
++++ tclcl.h	2013-05-13 09:23:19.000000000 +0200
+@@ -85,7 +85,7 @@
+ 	/* may not work at all! */
+ 	inline char* result() const { return (tcl_->result); }
+ #endif  /* TCL_MAJOR_VERSION >= 8 */
+-	inline void result(const char* p) { tcl_->result = (char*)p; }
++	inline void result(const char* p) {Tcl_SetResult (tcl_, (char *)p, NULL);}
+ 	void resultf(const char* fmt, ...);
+ 	inline void CreateCommand(const char* cmd, Tcl_CmdProc* cproc,
+ 				  ClientData cd = 0,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305130735.r4D7ZwO5098259>