aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--development/tkman/README5
-rw-r--r--development/tkman/patches/0001-gentoo.patch67
-rw-r--r--development/tkman/patches/0002-tkman-CVE-2008-5137.patch313
-rw-r--r--development/tkman/patches/0003-openbsd-gui_tcl.patch.patch24
-rw-r--r--development/tkman/patches/0004-use-unicode-arrow-characters.patch41
-rw-r--r--development/tkman/slack-desc19
-rw-r--r--development/tkman/tkman.SlackBuild92
-rw-r--r--development/tkman/tkman.info10
-rw-r--r--development/tkman/tkman.sh8
9 files changed, 579 insertions, 0 deletions
diff --git a/development/tkman/README b/development/tkman/README
new file mode 100644
index 0000000000..c8baec926e
--- /dev/null
+++ b/development/tkman/README
@@ -0,0 +1,5 @@
+TkMan is a graphical, hypertext manual page and Texinfo browser
+for UNIX.
+
+TkMan boasts hypertext links, high quality display and a superior
+navigational interface, full text search and much more.
diff --git a/development/tkman/patches/0001-gentoo.patch b/development/tkman/patches/0001-gentoo.patch
new file mode 100644
index 0000000000..ba658fd515
--- /dev/null
+++ b/development/tkman/patches/0001-gentoo.patch
@@ -0,0 +1,67 @@
+From f5bab226a31bdeab53f5fe7abf48cf0311d75cc1 Mon Sep 17 00:00:00 2001
+From: Zhu Qun-Ying <zhu.qunying@gmail.com>
+Date: Fri, 7 Mar 2025 23:02:02 -0800
+Subject: [PATCH 1/4] gentoo
+
+---
+ Makefile | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c38bb22..46030e8 100644
+--- a/Makefile
++++ b/Makefile
+@@ -25,13 +25,13 @@ mintk = 8.4
+
+ ### you need to localize the paths on these lines
+
+-WISH = /usr/local/bin/wish8.4
++WISH = /usr/bin/wish
+ #WISH = /usr/sww/tcl-8.4/bin/wish
+ #WISH = /private/share/bin/wish8.4
+
+ # the executable `tkman' is placed in BINDIR
+ # this should be a directory that's in your bin PATH
+-BINDIR = /usr/local/bin
++BINDIR = ${DESTDIR}/usr/bin
+ #BINDIR = /private/share/bin
+
+
+@@ -203,7 +203,7 @@ shortnames = 0
+ # BY DEFAULT OFF
+ glimpse = ""
+ # Glimpse on, with Boolean scope set to entire file
+-glimpse = "glimpse -W"
++#glimpse = "glimpse -W"
+ # give the full path, if you'd like
+ #glimpse = /usr/sww/bin/glimpse
+ # variations (refer to the Glimpse manual page)
+@@ -228,11 +228,11 @@ glimpse = "glimpse -W"
+ #glimpseindex = "glimpseindex -o -B"
+ # To shorten most index build times by incrementally building index when possible.
+ # For me, this drops indexing time from ~25 minutes to ~3 minutes, depending
+-glimpseindex = "glimpseindex -o -B -f"
++#glimpseindex = "glimpseindex -o -B -f"
+ # -M 8 gives 8MB of main memory instead of default 2, which speeds up indexing, maybe
+ #glimpseindex = "glimpseindex -o -B -f -M 8"
+ # if you don't want give the power to index, disable glimpseindex here
+-#glimpseindex = ""
++glimpseindex = ""
+ #glimpseindex = "/usr/sww/bin/glimpseindex -o -B"
+ # compressed manual pages are handled automatically; don't add -z to above
+
+@@ -289,9 +289,9 @@ vdiff = diff
+ rman = rman
+ #rman = /usr/local/bin/rman
+
+-apropos = {man -k}
++#apropos = {man -k}
+ # Linux uses a shell script instead:
+-#apropos = apropos
++apropos = apropos
+ # if don't have apropos (maybe on Windoze)
+ #apropos = ""
+
+--
+2.46.3
+
diff --git a/development/tkman/patches/0002-tkman-CVE-2008-5137.patch b/development/tkman/patches/0002-tkman-CVE-2008-5137.patch
new file mode 100644
index 0000000000..78a040d598
--- /dev/null
+++ b/development/tkman/patches/0002-tkman-CVE-2008-5137.patch
@@ -0,0 +1,313 @@
+From a374e80b808a1cd4f37b8252aa2d49a8aa925ec5 Mon Sep 17 00:00:00 2001
+From: Zhu Qun-Ying <zhu.qunying@gmail.com>
+Date: Fri, 7 Mar 2025 23:02:27 -0800
+Subject: [PATCH 2/4] tkman CVE-2008-5137
+
+---
+ Makefile | 5 +++--
+ contrib/outline.tcl | 2 +-
+ contrib/remote.tcl | 1 +
+ contrib/tkmanclient | 2 +-
+ database.tcl | 1 +
+ gui.tcl | 8 ++++----
+ manpath.tcl | 1 +
+ prefs.tcl | 4 ++--
+ taputils.tcl | 2 +-
+ tkman.tcl | 21 ++++++++++++++-------
+ tkmandesc.tcl | 1 +
+ version.tcl | 2 +-
+ 12 files changed, 31 insertions(+), 19 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 46030e8..6eca9eb 100644
+--- a/Makefile
++++ b/Makefile
+@@ -97,7 +97,7 @@ printers = ""
+ # at the closest DPI in this list
+ dpis = "75 100"
+
+-
++manxlongtmp = [exec mktemp -p /tmp tkman.XXXXXXXXXX]
+ # # # MACHINE DEPENDENCIES # # #
+
+ #manformat = {tbl | neqn | nroff -man }
+@@ -113,7 +113,7 @@ dpis = "75 100"
+ # Lines are cached in .../man/cat<n>@<line-length>;
+ # that is, the line length is appended to the usual cache directory names
+ #manformat = {groff -te -Tascii -man /tmp/ll -}
+-manformat = {groff -te -Tlatin1 -man /tmp/ll -}
++manformat = "groff -te -Tlatin1 -mandoc $$manx(longtmp) -"
+ # Ultrix users should uncomment the following line (you don't have eqn)
+ #manformat = {tbl | nroff -man }
+ # HP-UX uses a number of macros that groff doesn't define, so use the builtin nroff
+@@ -362,6 +362,7 @@ tkman: $(srcs) $(libs) Makefile
+ echo 'set man(texinfodir) $(texinfodir)' >> tkman
+ echo 'set man(gzgrep) $(gzgrep)' >> tkman
+ echo 'set man(rfcdir) $(rfcdir)' >> tkman
++ echo 'set manx(longtmp) $(manxlongtmp)' >> tkman
+ echo 'set man(format) $(manformat)' >> tkman
+ echo 'set man(printers) $(printers)' >> tkman
+ echo 'set manx(dpis) $(dpis)' >> tkman
+diff --git a/contrib/outline.tcl b/contrib/outline.tcl
+index ba78a66..47dcdee 100755
+--- a/contrib/outline.tcl
++++ b/contrib/outline.tcl
+@@ -71,7 +71,7 @@ proc setup {} {
+
+ text [set t .inv] -font {Times 12 {}} -wrap word -borderwidth 3 -padx 5 -pady 5 -yscrollcommand "[set v .v] set"
+ set finv [expr 1-[catch {$t tag configure invis -elide 1}]]
+- if !$finv { puts "you must apply the elided text patches first"; exit 0 }
++ if !$finv { puts "you must apply the elided text patches first"; CLEANUP; exit 0 }
+
+ scrollbar $v -orient vertical -command "$t yview"
+
+diff --git a/contrib/remote.tcl b/contrib/remote.tcl
+index ee11f9c..43f627c 100644
+--- a/contrib/remote.tcl
++++ b/contrib/remote.tcl
+@@ -26,6 +26,7 @@ proc TkMan {man} {
+ if {$res=="1"} {set ready 1}
+ } elseif {[string match "*insecure*" info]} {
+ puts stderr "can't talk to an insecure server -- see send(n)"
++ CLEANUP
+ exit 1
+ }
+ }
+diff --git a/contrib/tkmanclient b/contrib/tkmanclient
+index 9dec9ea..d8661cf 100755
+--- a/contrib/tkmanclient
++++ b/contrib/tkmanclient
+@@ -60,7 +60,7 @@ proc instNewView {tkman} {
+ }
+
+ set tkman [ check_for_tkman ]
+-if { $tkman == 0 } { puts stderr "couldnt start tkman!"; exit 1; }
++if { $tkman == 0 } { puts stderr "couldnt start tkman!"; CLEANUP; exit 1; }
+
+ set apropos 0
+ set instNew 0
+diff --git a/database.tcl b/database.tcl
+index aa6a072..e7cf7b2 100644
+--- a/database.tcl
++++ b/database.tcl
+@@ -41,6 +41,7 @@ proc manReadSects {{w .man} {force 0} {msg "Building database ..."}} {
+ if {![llength $manx(manList)]} {
+ puts stderr "Can't find any man pages!"
+ puts stderr "MANPATH = $env(MANPATH)"
++ CLEANUP
+ exit 1
+ }
+
+diff --git a/gui.tcl b/gui.tcl
+index 4883aa8..525f437 100644
+--- a/gui.tcl
++++ b/gui.tcl
+@@ -66,7 +66,7 @@ proc TkMan {} {
+ wm protocol $w WM_SAVE_YOURSELF "manSave"
+ wm command $w [concat $argv0 $argv]
+ # aborts without saving .tkman
+- wm protocol $w WM_DELETE_WINDOW {exit 0}
++ wm protocol $w WM_DELETE_WINDOW {CLEANUP; exit 0}
+
+ # some braindead window managers ignore iconposition requests after window is iconified, so special setting here
+ if {[regexp $manx(posnregexp) $manx(iconposition) all x y]} {wm iconposition $w $x $y}
+@@ -221,7 +221,7 @@ if 0 {
+ -command "incr stat(checkpoint); manSave; manWinstdout \$curwin {[bolg $manx(startup) ~] updated}"
+ # if {!$dup} { ... but menu shared!
+ $m add separator
+- $m add command -label "Quit, don't update $manx(startup-short)" -command "exit 0"
++ $m add command -label "Quit, don't update $manx(startup-short)" -command "CLEANUP; exit 0"
+ # }
+ }
+
+@@ -537,8 +537,8 @@ if 0 {
+ "
+
+ ### quit
+- button $w.quit -text "Quit" -command "manSave; exit 0" -padx 4
+- if {!$manx(quit)} {$w.quit configure -command "exit 0"}
++ button $w.quit -text "Quit" -command "manSave; CLEANUP; exit 0" -padx 4
++ if {!$manx(quit)} {$w.quit configure -command "CLEANUP; exit 0"}
+ if {$dup} {
+ $w.quit configure -text "Close" -command "
+ destroy $w; incr manx(outcnt) -1; manOutput
+diff --git a/manpath.tcl b/manpath.tcl
+index a89951b..5c70d35 100644
+--- a/manpath.tcl
++++ b/manpath.tcl
+@@ -138,6 +138,7 @@ proc manManpathCheck {} {
+ if {![llength $manx(paths)]} {
+ if {$manx(manpath-warnings) ne ""} {puts stderr $manx(manpath-warnings)}
+ puts stderr "NO VALID DIRECTORIES IN MANPATH!\a"
++ CLEANUP
+ exit 1
+ }
+ }
+diff --git a/prefs.tcl b/prefs.tcl
+index 6d980d6..ab6b04c 100644
+--- a/prefs.tcl
++++ b/prefs.tcl
+@@ -365,7 +365,7 @@ proc manPreferencesMake {{w0 ""}} {
+ pack $g.nroffsave $g.columns $g.fsstnd-always $g.texinfodir $g.recentdays $g.preferTexinfo $g.tryfuzzy $g.preferGNU \
+ $g.maxglimpse $g.maxglimpseexcerpt $g.indexglimpse $g.glimpsestrays $g.indexalso \
+ -fill x -pady 3 -padx 4
+- if {![string match "*groff*/tmp/ll -*" $man(format)]} {pack forget $g.columns}
++ if {![string match "*groff*$manx(longtmp) -*" $man(format)]} {pack forget $g.columns}
+
+
+
+@@ -791,7 +791,7 @@ proc spec2font {{family "times"} {style "normal"} {points "medium"} {size "m"}}
+ bold {set weight "bold"}
+ italics {set slant "italic"}
+ bold-italics {set weight "bold"; set slant "italic"}
+- default {puts stderr "nonexistent style: $style"; exit 1}
++ default {puts stderr "nonexistent style: $style"; CLEANUP; exit 1}
+ }
+
+ # specify s,m,l within small,medium,large; or set absolute point size
+diff --git a/taputils.tcl b/taputils.tcl
+index 586ce89..82be528 100644
+--- a/taputils.tcl
++++ b/taputils.tcl
+@@ -98,7 +98,7 @@ proc pipeexp {p} {
+ proc assert {bool msg {boom 0}} {
+ if {!$bool} {
+ puts stderr $msg
+- if {$boom} {exit 1}
++ if {$boom} {CLEANUP; exit 1}
+ }
+ }
+
+diff --git a/tkman.tcl b/tkman.tcl
+index 1f2ccd4..e2cd0ad 100644
+--- a/tkman.tcl
++++ b/tkman.tcl
+@@ -539,7 +539,7 @@ proc manSetSect {w n} {
+ proc manMenuFit {m} {
+ global man manx
+
+- if {[winfo class $m]!="Menu"} {puts stderr "$m not of Menu class"; exit 1}
++ if {[winfo class $m]!="Menu"} {puts stderr "$m not of Menu class"; CLEANUP; exit 1}
+ if {[$m index last] eq "none"} return
+
+ set sh [winfo screenheight $m]
+@@ -1827,7 +1827,7 @@ DEBUG { puts "$bin => $fullpath" }
+ if {$inx<[llength $manx(binvars)]} {
+ after 1000 manBinCheck $inx $err
+ } else {
+- if {$err} {exit 1}
++ if {$err} {CLEANUP; exit 1}
+ .occ entryconfigure "Statistics*" -state normal
+ }
+
+@@ -1850,6 +1850,7 @@ proc manParseCommandline {} {
+ }
+ puts -nonewline "tkman"
+ foreach line [split [textmanip::linebreak $helptxt 70] "\n"] { puts "\t$line" }
++ CLEANUP
+ exit 0
+ }
+ -M {set env(MANPATH) $val; incr i}
+@@ -1868,11 +1869,11 @@ proc manParseCommandline {} {
+ -start* {set manx(startup) $val; incr i}
+ -data* {puts stderr "-database option obsolete: database kept in memory"; incr i}
+ --v* -
+- -v* {puts stdout "TkMan v$manx(version) of $manx(date)"; exit 0}
++ -v* {puts stdout "TkMan v$manx(version) of $manx(date)"; CLEANUP; exit 0}
+ -t* {set manx(title) $val; incr i}
+ -d* {set manx(debug) 1; set manx(quit) 0; set manx(iconify) 0}
+ -nod* {set manx(debug) 0}
+- -* {puts stdout "[file tail $argv0]: unrecognized option: $arg"; exit 1}
++ -* {puts stdout "[file tail $argv0]: unrecognized option: $arg"; CLEANUP; exit 1}
+ default {
+ after 2000 manShowMan $arg {{}} .man
+ # permit several??? add extras to History?
+@@ -1888,6 +1889,7 @@ proc manParseCommandline {} {
+ proc ASSERT {args} {
+ if {![uplevel 1 eval $args]} {
+ puts "ASSERTION VIOLATED: $args"
++ CLEANUP
+ exit 1
+ }
+ }
+@@ -1906,7 +1908,10 @@ proc PROFILE {msg} {
+ set manx(lastclick) $clicknow
+ }
+
+-
++proc CLEANUP {} {
++ global manx
++ if { [file exists $manx(longtmp)] == 1 } { file delete $manx(longtmp) }
++}
+
+
+ ##################################################
+@@ -1919,6 +1924,7 @@ proc PROFILE {msg} {
+ if {[package vcompare [info tclversion] $manx(mintcl)]==-1 || [package vcompare $tk_version $manx(mintk)]==-1} {
+ puts -nonewline stderr "Tcl $manx(mintcl)/Tk $manx(mintk) minimum versions required. "
+ puts stderr "You have Tcl [info tclversion]/Tk $tk_version"
++ CLEANUP
+ exit 1
+ } elseif {int([info tclversion])-int($manx(mintcl))>=1 || int($tk_version)-int($manx(mintk))>=1} {
+ puts stderr "New major versions of Tcl and/or Tk may have introduced\nincompatibilies in TkMan.\nCheck the TkMan home site for a possible new version.\n"
+@@ -2111,7 +2117,6 @@ set man(lengthchunk) "line"; set manx(lengthchunk-v) {line screen page ""}; set
+ set manx(line-scale) 1; set manx(screen-scale) 45; set manx(page-scale) [expr int(60*1.5)]
+ set man(error-effect) "bell & flash"; set manx(error-effect-v) [set manx(error-effect-t) {"bell & flash" "bell" "flash" "none"}]
+ set man(columns) 65; set manx(columns-v) {65 90 130 5000}; set manx(columns-t) {"65 (most compatible)" 90 130 "wrap to screen width"}; # no one would want shorter lines
+-set manx(longtmp) /tmp/ll
+ set man(volcol) 4.0c; set manx(volcol-v) {0 1.5c 2.0c 2.5c 3.0c 3.5c 4.0c 4.5c 5.0c 7.5c 10.0c}; set manx(volcol-t) {"no columns" "1.5 cm" "2 cm" "2.5 cm/~1 inch" "3 cm" "3.5 cm" "4 cm" "4.5 cm" "5.0 cm/~2 inches" "7.5 cm" "10 cm"}
+ set man(apropostab) "4.5c"; set manx(apropostab-v) {0 3.0c 4.0c 4.5c 5.0c 5.5c 6.0c 7.5c 10.0c}; set manx(apropostab-t) {"none" "3 cm" "4 cm" "4.5 cm" "5 cm" "5.5 cm" "6 cm" "7.5 cm" "10 cm"}
+ #set man(showoutsub) ""
+@@ -2258,7 +2263,7 @@ set manx(title) "TkMan"
+ regexp {(\d\d\d\d)/(\d\d)/(\d\d)} {$Date: 2003/04/01 23:02:52 $} manx(date) y m d
+ set manx(mtime) [clock scan "$m/$d/$y"]
+ set manx(stray-warnings) ""
+-if {[catch {set default(manList) 0}]} {puts "\aBLT conflicts with TkMan."; exit 1}
++if {[catch {set default(manList) 0}]} {puts "\aBLT conflicts with TkMan."; CLEANUP; exit 1}
+ set manx(manList) $man(manList)
+ set manx(manTitleList) $man(manTitleList)
+ set manx(userconfig) "### your additions go below"
+@@ -2385,6 +2390,7 @@ if {$manx(startup)!="" && [file readable $manx(startup)]} {
+ if {[string match "#!*" [gets $fid line]]} {
+ puts stderr "$manx(startup) looks like an executable."
+ puts stderr "You should delete it, probably."
++ CLEANUP
+ exit 1
+ }
+
+@@ -2613,6 +2619,7 @@ after 1500 manBinCheck
+
+ if {[llength $man(manList)]!=[llength $man(manTitleList)]} {
+ puts stderr "Length of section abbreviations differs from length of section titles:\n\nlength [llength $man(manList)]:\t$man(manList)\n\nlength [llength $man(manTitleList)]:\t$man(manTitleList)"
++ CLEANUP
+ exit 1
+ }
+
+diff --git a/tkmandesc.tcl b/tkmandesc.tcl
+index 72275b5..603a14a 100644
+--- a/tkmandesc.tcl
++++ b/tkmandesc.tcl
+@@ -152,6 +152,7 @@ proc manDesc {cmd from to dirs} {
+ foreach n [concat $from $to] {
+ if {[lsearch $mani(manList) $n]==-1} {
+ puts stderr "$cmd: Section letter `$n' doesn't exist."
++ CLEANUP
+ exit 1
+ }
+ }
+diff --git a/version.tcl b/version.tcl
+index 7e3f841..c71af50 100644
+--- a/version.tcl
++++ b/version.tcl
+@@ -80,7 +80,7 @@ proc manVersionDiff {f w} {
+
+ ### collect diffs
+ # diff needs at least one of them to be a real file. want text of previous version around anyhow
+- set tmpf /tmp/tkman[pid]
++ set tmpf [exec mktemp -p /tmp tkman.XXXXXXXXXX]
+ # $man(changeleft) $man(zaphy) -- obsolete options
+ set format "$man(format) | $manx(rman) -f ASCII -N"
+ #puts "creating $tmpf (old)"
+--
+2.46.3
+
diff --git a/development/tkman/patches/0003-openbsd-gui_tcl.patch.patch b/development/tkman/patches/0003-openbsd-gui_tcl.patch.patch
new file mode 100644
index 0000000000..f06138f375
--- /dev/null
+++ b/development/tkman/patches/0003-openbsd-gui_tcl.patch.patch
@@ -0,0 +1,24 @@
+From d7c3cd90d72b47ce766af7da1c8e555c103def91 Mon Sep 17 00:00:00 2001
+From: Zhu Qun-Ying <zhu.qunying@gmail.com>
+Date: Fri, 7 Mar 2025 23:03:18 -0800
+Subject: [PATCH 3/4] openbsd-gui_tcl.patch
+
+---
+ gui.tcl | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gui.tcl b/gui.tcl
+index 525f437..200ba53 100644
+--- a/gui.tcl
++++ b/gui.tcl
+@@ -746,6 +746,7 @@ proc manManTabSet {w} {
+ set repstr "ETRNIOASM aaabcdeeeefghiijklmnnooprrsttuy"; set replen [string length $repstr]
+
+ set rm [expr {[winfo width $t]-2*[$t cget -padx]-10}]
++ if {$rm <= 150} { set rm 151 }
+ $t tag configure info -tabs [list 0.3i $rm right]
+ $t tag configure census -tabs [list [expr {$rm-150}] right $rm right]
+ $t tag configure high -tabs [list $rm right]
+--
+2.46.3
+
diff --git a/development/tkman/patches/0004-use-unicode-arrow-characters.patch b/development/tkman/patches/0004-use-unicode-arrow-characters.patch
new file mode 100644
index 0000000000..50f0372f06
--- /dev/null
+++ b/development/tkman/patches/0004-use-unicode-arrow-characters.patch
@@ -0,0 +1,41 @@
+From ed02c6538a758b92efb433f3d79746dd5a38c989 Mon Sep 17 00:00:00 2001
+From: Zhu Qun-Ying <zhu.qunying@gmail.com>
+Date: Sat, 8 Mar 2025 21:50:30 -0800
+Subject: [PATCH 4/4] use unicode arrow characters
+
+---
+ gui.tcl | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gui.tcl b/gui.tcl
+index 200ba53..349d644 100644
+--- a/gui.tcl
++++ b/gui.tcl
+@@ -480,7 +480,7 @@ if 0 {
+ searchboxNext search $t $wi 0
+ "
+ set manx(hitlist$t) {}
+- button $w.search.next -text "\xdf" -font guisymbol -command "
++ button $w.search.next -text "⇓" -command "
+ incr stat(page-regexp-next)
+ # just before start to page through hits, open all sections with hits.
+ # subsequently abide by user's outlining changes
+@@ -491,13 +491,13 @@ if 0 {
+ } else {searchboxNext search $t $wi}
+ catch {$t see hit}
+ "
+- button $w.search.prev -text "\xdd" -font guisymbol -command "
++ button $w.search.prev -text "⇑" -command "
+ incr stat(page-regexp-prev)
+ searchboxPrev search $t $wi
+ manOutline $t 0 \$manx(hitlist$t); set manx(hitlist$t) {}
+ catch {$t see hit}
+ "
+- menubutton [set mb $w.search.tags] -text "\xdf" -font guisymbol -menu [set m $mb.m]; menu $m -tearoff no
++ menubutton [set mb $w.search.tags] -text "⇓" -menu [set m $mb.m]; menu $m -tearoff no
+ foreach {name val} $manx(searchtags) {
+ $m add command -label $name -command "set manx(search,string$w) \"TAG:$val\"; $w.search.t icursor end"
+ #"$w.search.t insert insert TAG:$val"
+--
+2.46.3
+
diff --git a/development/tkman/slack-desc b/development/tkman/slack-desc
new file mode 100644
index 0000000000..efd36db55d
--- /dev/null
+++ b/development/tkman/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+tkman: tkman (man page and info file browser)
+tkman:
+tkman: TkMan is a graphical, hypertext manual page and Texinfo browser
+tkman: for UNIX.
+tkman:
+tkman: TkMan boasts hypertext links, high quality display and a superior
+tkman: navigational interface, full text search and much more.
+tkman:
+tkman:
+tkman:
+tkman:
diff --git a/development/tkman/tkman.SlackBuild b/development/tkman/tkman.SlackBuild
new file mode 100644
index 0000000000..143e801bb2
--- /dev/null
+++ b/development/tkman/tkman.SlackBuild
@@ -0,0 +1,92 @@
+#!/bin/bash
+
+# Slackware build script for tkman
+# It borrows patches from Arch AUR https://aur.archlinux.org/packages/tkman
+# Copyright 2025 Zhu, Qun-Ying
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=tkman
+VERSION=${VERSION:-2.2}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+ARCH=noarch
+SRCNAM="$(printf $PRGNAM | cut -d- -f2-)"
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+dos2unix * contrib/*.tcl
+patch -p1 < $CWD/patches/0001-gentoo.patch
+patch -p1 < $CWD/patches/0002-tkman-CVE-2008-5137.patch
+patch -p1 < $CWD/patches/0003-openbsd-gui_tcl.patch.patch
+patch -p1 < $CWD/patches/0004-use-unicode-arrow-characters.patch
+
+mv -v -- README-tkman README
+mv -v -- ANNOUNCE-tkman.txt ANNOUNCE
+cp -v -- $CWD/tkman.sh .
+
+sed -i '${s|$| sh /usr/share/tkman/tkman.tcl|}' tkman.sh
+
+make WISH="/usr/bin/wish" BINDIR="/usr/bin"
+sed -i 's|/bin/sh|/usr/bin/sh|' $PRGNAM
+
+mkdir -p $PKG/usr/bin
+install -m755 tkman.sh $PKG/usr/bin/tkman
+
+mkdir -p $PKG/usr/share/pixmaps
+install -m644 contrib/TkMan.gif $PKG/usr/share/pixmaps
+
+mkdir -p $PKG/usr/share/$PRGNAM
+install -m644 tkman $PKG/usr/share/$PRGNAM/tkman.tcl
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CHANGES MANIFEST README manual.html $PKG/usr/doc/$PRGNAM-$VERSION
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/development/tkman/tkman.info b/development/tkman/tkman.info
new file mode 100644
index 0000000000..c683396a97
--- /dev/null
+++ b/development/tkman/tkman.info
@@ -0,0 +1,10 @@
+PRGNAM="tkman"
+VERSION="2.2"
+HOMEPAGE="https://sourceforge.net/projects/tkman/"
+DOWNLOAD="https://sourceforge.net/projects/tkman/files/tkman/2.2/tkman-2.2.tar.gz"
+MD5SUM="0e81735c93ab2500d6105ff33095c3e8"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="polyglotman dos2unix"
+MAINTAINER="Zhu, Qun-Ying"
+EMAIL="zhu.qunying@gmail.com"
diff --git a/development/tkman/tkman.sh b/development/tkman/tkman.sh
new file mode 100644
index 0000000000..be83777496
--- /dev/null
+++ b/development/tkman/tkman.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/bash
+_MANPATH=/usr/man
+
+if [[ $MANPATH != *"$_MANPATH"* ]]; then
+ MANPATH=/usr/man:$MANPATH
+fi
+
+MANPATH="$_MANPATH" sh /usr/share/tkman/tkman.tcl