summaryrefslogtreecommitdiff
path: root/x11/tkman/patches/patch-ab
blob: e145cbee3414f83f665c4a7965847564a934405b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$NetBSD: patch-ab,v 1.4 2000/08/31 03:58:14 fredb Exp $

--- manpath.tcl.orig	Thu Jun 22 17:39:42 2000
+++ manpath.tcl	Thu Aug 17 19:48:41 2000
@@ -19,8 +19,13 @@
 	# doesn't that's OK (it's got a good whatis organization)
 
 	# BSDI concatenates all whatis information into single file
-	# share fBSDI with manualpage.tcl to find xxx.0 files
+	# share fBSDI with manualpage.tcl to find xxx.0 files,
+	# but NetBSD uses multiple whatis.db files.
+	if {![file executable "/usr/libexec/makewhatis"]} {
 	set manx(fBSDI) [file readable [set whatis "/usr/share/man/whatis.db"]]
+	} else {
+		set manx(fBSDI) 0
+	}
 	set fDebian [expr {[file readable [set whatis "/usr/man/index.bt"]] || [file readable [set whatis "/var/catman/index.bt"]]}]
 	# HPUX concatenates all whatis information into single file
 	set fHPUX 0; if {!$manx(fBSDI) && !$fDebian} { set fHPUX [file readable [set whatis "/usr/lib/whatis"]] }
@@ -79,10 +84,12 @@
 			lappend manx(pathstat) $man($root)
 			set manx($root,latest) [lfirst [manLatestMan $root]]
 
-			# check for apropos index (called windex on Solaris)
+			# check for apropos index (called windex on Solaris, whatis.db on NetBSD)
 			if {!$manx(fBSDI) && !$fDebian && !$fHPUX} {
 				if {![file exists [set whatis [file join $root "windex"]]]} {
+					if ![file exists [set whatis $root/whatis.db]] {
 					set whatis $root/whatis
+					}
 				}
 			}