Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/lang/tclX/Makefile,v
retrieving revision 1.64
diff -U 2 -r1.64 Makefile
--- Makefile	27 Nov 2009 07:35:40 -0000	1.64
+++ Makefile	29 Nov 2009 01:24:14 -0000
@@ -62,4 +62,12 @@
 .if ${TCL_VER} > 8.4
 EXTRA_PATCHES+=	${FILESDIR}/tcl85-test-patch
+PLIST_SUB+=	BELOW_85='@comment '
+.else
+PLIST_SUB+=	BELOW_85=''
+.endif
+.if ${TCL_VER} > 8.3
+PLIST_SUB+=	ABOVE_83=''
+.else
+PLIST_SUB+=	ABOVE_83='@comment '
 .endif
 
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/lang/tclX/pkg-plist,v
retrieving revision 1.19
diff -U 2 -r1.19 pkg-plist
--- pkg-plist	27 Jun 2006 23:23:19 -0000	1.19
+++ pkg-plist	29 Nov 2009 01:24:14 -0000
@@ -82,5 +82,5 @@
 %%PORTDOCS%%lib/tclx%%TCLX_VER%%/help/tcl/files/recursive_glob
 %%PORTDOCS%%lib/tclx%%TCLX_VER%%/help/tcl/files/registry
-%%PORTDOCS%%lib/tclx%%TCLX_VER%%/help/tcl/files/resource
+%%PORTDOCS%%%%BELOW_85%%lib/tclx%%TCLX_VER%%/help/tcl/files/resource
 %%PORTDOCS%%lib/tclx%%TCLX_VER%%/help/tcl/files/seek
 %%PORTDOCS%%lib/tclx%%TCLX_VER%%/help/tcl/files/select
@@ -133,5 +133,5 @@
 %%PORTDOCS%%lib/tclx%%TCLX_VER%%/help/tcl/lists/lrmdups
 %%PORTDOCS%%lib/tclx%%TCLX_VER%%/help/tcl/lists/lsearch
-%%PORTDOCS%%lib/tclx%%TCLX_VER%%/help/tcl/lists/lset
+%%PORTDOCS%%%%ABOVE_83%%lib/tclx%%TCLX_VER%%/help/tcl/lists/lset
 %%PORTDOCS%%lib/tclx%%TCLX_VER%%/help/tcl/lists/lsort
 %%PORTDOCS%%lib/tclx%%TCLX_VER%%/help/tcl/lists/lvarcat
Index: files/patch-af
===================================================================
RCS file: /home/pcvs/ports/lang/tclX/files/patch-af,v
retrieving revision 1.4
diff -U 2 -r1.4 patch-af
--- files/patch-af	26 Mar 2007 17:11:37 -0000	1.4
+++ files/patch-af	29 Nov 2009 01:24:14 -0000
@@ -1,4 +1,4 @@
---- ./unix/tools/bldmanhelp.tcl.orig	Thu Dec  2 21:33:05 2004
-+++ ./unix/tools/bldmanhelp.tcl	Sun Mar 25 17:07:36 2007
+--- unix/tools/bldmanhelp.tcl	2004-12-02 15:33:05.000000000 -0500
++++ unix/tools/bldmanhelp.tcl	2009-11-28 16:41:13.000000000 -0500
 @@ -11,10 +11,9 @@
  #
@@ -13,7 +13,9 @@
  #      entries describing manual pages to convert.  Each entry is a list
  #      of manual file and the path of the help file to generate.
-@@ -69,17 +68,32 @@
+@@ -68,18 +67,41 @@
+ 
  proc CopyManPage {manPage outFH} {
      global skipSection
++    global tcl_version
  
 -    set stat [catch {
@@ -25,5 +27,12 @@
 +    }
 +    set manPage [file rootname $manPage]
-+    set manPage [split [exec man -w $section $manPage] ":)"]
++    if {[catch {exec man -w $section $manPage} page] &&
++	[catch {exec man -w $section $manPage$tcl_version} page]} {
++        global gotErrors
++        set gotErrors 1
++	puts stderr "can't find man-page for \"$manPage\": $page"
++	return
++    }
++    set manPage [split $page ":)"]
 +    if {[llength $manPage] > 1} { # Get the source, not from cat
 +	set manPage [string trim [lindex $manPage 1]]
@@ -50,5 +59,5 @@
                  CopyManPage [lindex $line 1] $outFH
              }
-@@ -119,11 +133,10 @@
+@@ -119,11 +141,10 @@
  # for input to buildhelp.
  #
@@ -63,5 +72,5 @@
     foreach ent $manInfoTbl {
         puts stdout "    preprocessing $ent"
-@@ -144,13 +157,12 @@
+@@ -144,13 +165,12 @@
  
  set tmpFile "bldmanhelp.tmp"