diff options
author | gahr <gahr@FreeBSD.org> | 2013-05-13 15:35:58 +0800 |
---|---|---|
committer | gahr <gahr@FreeBSD.org> | 2013-05-13 15:35:58 +0800 |
commit | e39769dc333c3b0269ddc9b8e0f47b6f9cd2b6b1 (patch) | |
tree | 26ecce2e9c832552b6a468be6a91added45d9e20 | |
parent | a8c0a7482f32dd4b77986c9818c693d1d5e73cfe (diff) | |
download | freebsd-ports-gnome-e39769dc333c3b0269ddc9b8e0f47b6f9cd2b6b1.tar.gz freebsd-ports-gnome-e39769dc333c3b0269ddc9b8e0f47b6f9cd2b6b1.tar.zst freebsd-ports-gnome-e39769dc333c3b0269ddc9b8e0f47b6f9cd2b6b1.zip |
- 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)
-rw-r--r-- | devel/tclcl/Makefile | 17 | ||||
-rw-r--r-- | devel/tclcl/files/patch-Tcl.cc | 13 | ||||
-rw-r--r-- | devel/tclcl/files/patch-Tcl2.cc | 11 | ||||
-rw-r--r-- | devel/tclcl/files/patch-rate-variable.cc | 20 | ||||
-rw-r--r-- | devel/tclcl/files/patch-rate-variable.h | 11 | ||||
-rw-r--r-- | devel/tclcl/files/patch-tclcl.h | 11 |
6 files changed, 68 insertions, 15 deletions
diff --git a/devel/tclcl/Makefile b/devel/tclcl/Makefile index 76423c07d8d3..c94fe6923d25 100644 --- a/devel/tclcl/Makefile +++ b/devel/tclcl/Makefile @@ -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}-${PORTVERSION} 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> diff --git a/devel/tclcl/files/patch-Tcl.cc b/devel/tclcl/files/patch-Tcl.cc index f478ab00ca46..146515dbdf3f 100644 --- a/devel/tclcl/files/patch-Tcl.cc +++ b/devel/tclcl/files/patch-Tcl.cc @@ -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; diff --git a/devel/tclcl/files/patch-Tcl2.cc b/devel/tclcl/files/patch-Tcl2.cc new file mode 100644 index 000000000000..5b463dd70f58 --- /dev/null +++ b/devel/tclcl/files/patch-Tcl2.cc @@ -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, ...) diff --git a/devel/tclcl/files/patch-rate-variable.cc b/devel/tclcl/files/patch-rate-variable.cc new file mode 100644 index 000000000000..8bb6f5d31321 --- /dev/null +++ b/devel/tclcl/files/patch-rate-variable.cc @@ -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; diff --git a/devel/tclcl/files/patch-rate-variable.h b/devel/tclcl/files/patch-rate-variable.h new file mode 100644 index 000000000000..e8a16f008e8d --- /dev/null +++ b/devel/tclcl/files/patch-rate-variable.h @@ -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); diff --git a/devel/tclcl/files/patch-tclcl.h b/devel/tclcl/files/patch-tclcl.h new file mode 100644 index 000000000000..5311c1144c74 --- /dev/null +++ b/devel/tclcl/files/patch-tclcl.h @@ -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, |