Subject: pkg/14436: Tcl thread support
To: None <gnats-bugs@gnats.netbsd.org>
From: Anthony Mallet <anthony.mallet@useless-ficus.net>
List: netbsd-bugs
Date: 11/02/2001 14:40:06
>Number:         14436
>Category:       pkg
>Synopsis:       Tcl thread support
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 02 05:41:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Anthony Mallet
>Release:        -current
>Organization:
	
>Environment:
	
System: NetBSD ficus 1.5Y NetBSD 1.5Y (FICUS) #13: Fri Oct 26 23:43:01 CEST 2001 toto@ficus:/home/src/netbsd-current/sys/arch/i386/compile/FICUS i386
Architecture: i386
Machine: i386
>Description:
	I propose the following patch which enable tcl-threads with a
single variable definition. It did not work for me with
'pth' (1.4.0), so I used an explicit dependency on 'unproven-threads'
which seems to work fine.
	To compile tcl with thread support with this patch, simply type
'make install TCL_THREADED=yes' in pkgsrc/lang/tcl.

	I also included a patch for Tk. Maybe other tcl-dependent
packages should be adapted also?

>How-To-Repeat:
	
>Fix:
Index: lang/tcl/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/tcl/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- Makefile	2001/09/27 23:18:20	1.12
+++ Makefile	2001/11/02 13:26:00
@@ -11,7 +11,8 @@
 
 MAINTAINER=		jwise@netbsd.org
 HOMEPAGE=		http://www.tcltk.com/
-COMMENT=		Ousterhout's Tool Command Language, a scripting language
+COMMENT=		Ousterhout's Tool Command Language, a scripting language 
+#' (emacs fontify...)
 
 CONFLICTS+=		tclman80-[0-9]*
 
@@ -30,6 +31,14 @@
 CONFIGURE_ARGS+=	--mandir=${WRKDIR}/man
 
 .include "../../mk/bsd.prefs.mk"
+
+# Enable tcl-threads if needed 
+.if defined(TCL_THREADED)
+DEPENDS+=		unproven-pthreads:../../devel/unproven-pthreads
+
+CONFIGURE_ARGS+=	--enable-threads
+CONFIGURE_ENV+=		CC=${PREFIX}/pthreads/bin/pgcc
+.endif
 
 # NetBSD-1.5.x-m68k platforms apparently have a compiler optimization bug
 # tickled by the Tcl code that manifests in code generation problems.
Index: x11/tk/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/x11/tk/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- Makefile	2001/10/24 22:11:15	1.15
+++ Makefile	2001/11/02 13:26:01
@@ -25,6 +25,14 @@
 #
 CONFIGURE_ARGS+=	--mandir=${WRKDIR}/man
 
+.include "../../mk/bsd.prefs.mk"
+
+# Enable tcl-threads if needed 
+.if defined(TCL_THREADED)
+CONFIGURE_ARGS+=	--enable-threads
+CONFIGURE_ENV+=		CC=${PREFIX}/pthreads/bin/pgcc
+.endif
+
 # Modify mkLinks script to remove the short-filename manpage if it was
 # linked to a longer filename.
 #

>Release-Note:
>Audit-Trail:
>Unformatted: