From bc087374d35aa9c841dd63d44e9c9697702921ed Mon Sep 17 00:00:00 2001
From: Steve Price <steve@FreeBSD.org>
Date: Sun, 28 Nov 1999 18:32:45 +0000
Subject: Update to use Tcl/Tk version 8.2.

Submitted by:	Ade Lovett <ade@lovett.com>
---
 games/tvp/Makefile       | 19 +++++++++++--------
 games/tvp/files/patch-aa | 32 +++++++++++++++++++++++++-------
 games/tvp/files/patch-ab | 11 +++++++++++
 3 files changed, 47 insertions(+), 15 deletions(-)
 create mode 100644 games/tvp/files/patch-ab

(limited to 'games/tvp')

diff --git a/games/tvp/Makefile b/games/tvp/Makefile
index f8f7e9ea6922..89addc832f67 100644
--- a/games/tvp/Makefile
+++ b/games/tvp/Makefile
@@ -7,19 +7,22 @@
 #
 
 DISTNAME=	tvp-0.9.7.1
-CATEGORIES=	games tk80
+CATEGORIES=	games tk82
 MASTER_SITES=	http://www3.sympatico.ca/john.vanderhoek/tim/src/president/
 
 MAINTAINER=	hoek@FreeBSD.org
 
 # Comment-out this (and CFLAGS) to compile only the CLI and ansi interfaces
-LIB_DEPENDS=	tk80.1:${PORTSDIR}/x11-toolkits/tk80
-
-GNU_CONFIGURE=		yes
-CONFIGURE_ARGS=		--enable-carddir=${PREFIX}/share/games/tvp
-# Comment-out this (and LIB_DEPENDS) to compile only the CLI and ansi interfaces
-CFLAGS+=		-lX11 -lm -ltcl80 -ltk80 \
-			-L ${LOCALBASE}/lib -L ${X11BASE}/lib
+LIB_DEPENDS=	tk82.1:${PORTSDIR}/x11-toolkits/tk82
+
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--enable-carddir=${PREFIX}/share/games/tvp
+CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include/tcl8.2 \
+			  -I${LOCALBASE}/include/tk8.2" \
+		LIBS="-L${LOCALBASE}/lib -L${X11BASE}/lib \
+		      -ltcl82 -ltk82 -lX11 -lm"
+#CFLAGS+=		-lX11 -lm -ltcl82 -ltk82 \
+#			-L${LOCALBASE}/lib -L${X11BASE}/lib
 
 MAN6=	tvp.6
 MLINKS=	tvp.6 xprez.6 - aprez.6 - prez.6
diff --git a/games/tvp/files/patch-aa b/games/tvp/files/patch-aa
index 59f93db9d802..9dfeeecaee08 100644
--- a/games/tvp/files/patch-aa
+++ b/games/tvp/files/patch-aa
@@ -1,20 +1,38 @@
---- configure.orig	Thu Oct 23 08:34:26 1997
-+++ configure	Thu Oct 23 08:36:34 1997
-@@ -1306,7 +1306,7 @@
+--- configure.orig	Tue Aug 19 20:57:12 1997
++++ configure	Wed Nov  3 17:33:31 1999
+@@ -1306,10 +1306,10 @@
  
  WINDLL=true
  TCLTK=""
 -for tkver in 42 4.2 41 4.1 80 8.0
-+for tkver in 80 8.0 42 4.2 41 4.1
++for tkver in 82
  do
- 	echo $ac_n "checking for Tk_Main in -ltk${tkver}""... $ac_c" 1>&6
- echo "configure:1313: checking for Tk_Main in -ltk${tkver}" >&5
+-	echo $ac_n "checking for Tk_Main in -ltk${tkver}""... $ac_c" 1>&6
+-echo "configure:1313: checking for Tk_Main in -ltk${tkver}" >&5
++	echo $ac_n "checking for Tk_MainEx in -ltk${tkver}""... $ac_c" 1>&6
++echo "configure:1313: checking for Tk_MainEx in -ltk${tkver}" >&5
+ ac_lib_var=`echo tk${tkver}'_'Tk_Main | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+@@ -1322,10 +1322,10 @@
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+-char Tk_Main();
++char Tx_MainEx();
+ 
+ int main() {
+-Tk_Main()
++Tk_MainEx()
+ ; return 0; }
+ EOF
+ if { (eval echo configure:1332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
 @@ -1345,7 +1345,7 @@
    echo "$ac_t""yes" 1>&6
    
  		WINDLL=false
 -		for tclver in 76 7.6 75 7.5 80 8.0
-+		for tclver in 80 8.0 76 7.6 75 7.5
++		for tclver in 82
  		do
  			echo $ac_n "checking for Tcl_Main in -ltcl${tclver}""... $ac_c" 1>&6
  echo "configure:1352: checking for Tcl_Main in -ltcl${tclver}" >&5
diff --git a/games/tvp/files/patch-ab b/games/tvp/files/patch-ab
new file mode 100644
index 000000000000..7fb1a6f40f19
--- /dev/null
+++ b/games/tvp/files/patch-ab
@@ -0,0 +1,11 @@
+--- xprez/xpwish.c.orig	Sat Jun 28 17:38:35 1997
++++ xprez/xpwish.c	Wed Nov  3 17:45:12 1999
+@@ -37,7 +37,7 @@
+ 
+ int
+ main (int argc, char **argv) {
+-	Tk_Main (argc, argv, Tcl_AppInit);
++	Tk_MainEx (argc, argv, Tcl_AppInit, Tcl_CreateInterp());
+ 
+ 	return 0;
+ }
-- 
cgit v1.2.3