Install as many extensions as easily possible as Tcl Modules.

This commit is contained in:
stu 2014-10-21 05:10:34 +00:00
parent 1146eb19c9
commit 857c04b8fe
5 changed files with 85 additions and 52 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.12 2014/08/30 17:32:34 stu Exp $
# $OpenBSD: Makefile,v 1.13 2014/10/21 05:10:34 stu Exp $
COMMENT = Tk Standard Library
DISTNAME = tklib-0.6pl1
REVISION = 0
CATEGORIES = devel x11/tk
HOMEPAGE = http://core.tcl.tk/tklib/home
MAINTAINER = Stuart Cassoff <stwo@users.sourceforge.net>
@ -33,6 +34,7 @@ do-install:
-pkg-path ${DESTDIR}${MODTCL_TCLDIR} \
-nroff-path ${PREFIX}/man/mann \
-example-path ${PREFIX}/share/examples/tklib \
-mp ${DESTDIR}${MODTCL_MODDIR}/85 \
-app-path ${PREFIX}/share/examples/tklib/apps \
-csb ${PREFIX}/share/doc \
-tclsh ${MODTCL_BIN} \

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-installer_tcl,v 1.4 2014/09/10 23:10:04 stu Exp $
$OpenBSD: patch-installer_tcl,v 1.5 2014/10/21 05:10:34 stu Exp $
Install everything nicely.
Generate tcllib.n.
--- installer.tcl.orig Wed Oct 30 14:44:52 2013
+++ installer.tcl Fri Nov 8 15:44:59 2013
--- installer.tcl.orig Mon Aug 11 01:25:55 2014
+++ installer.tcl Tue Sep 16 17:20:00 2014
@@ -84,16 +84,24 @@ if {![package vsatisfies [package provide Tcl] 8.0]} {
proc xcopyfile {src dest} {
@ -46,7 +46,7 @@ Generate tcllib.n.
return
}
@@ -209,12 +217,16 @@ proc ainstall {} {
@@ -209,18 +217,23 @@ proc ainstall {} {
set aexe [file join $distribution apps $a]
set adst [file join $config(app,path) ${a}$ext]
@ -68,7 +68,22 @@ Generate tcllib.n.
}
return
}
@@ -236,20 +248,27 @@ proc doinstall {} {
proc doinstall {} {
global config package_version distribution package_name modules excluded
+ global pkgs
if {!$config(no-exclude)} {
foreach p $excluded {
@@ -230,26 +243,35 @@ proc doinstall {} {
}
}
+ array set pkgs [exec [info nameofexecutable] [file join $distribution sak.tcl] provided]
+
if {$config(doc,nroff)} {
set config(man.macros) [string trim [get_input \
[file join $distribution support installation man.macros]]]
}
if {$config(pkg)} {
xinstall pkg $config(pkg,path)
@ -99,18 +114,18 @@ Generate tcllib.n.
log ""
return
}
@@ -511,6 +530,10 @@ proc processargs {} {
@@ -511,6 +533,10 @@ proc processargs {} {
set config(exa,path) [lindex $argv 1]
set argv [lrange $argv 1 end]
}
+ -csb - -tclsh - -descr {
+ -csb - -descr - -mp - -tclsh {
+ set config([string range [lindex $argv 0] 1 end]) [lindex $argv 1]
+ set argv [lrange $argv 1 end]
+ }
-help -
default {
puts stderr "usage: $argv0 ?-dry-run/-simulate? ?-no-wait? ?-no-gui? ?-html|-no-html? ?-nroff|-no-nroff? ?-examples|-no-examples? ?-pkgs|-no-pkgs? ?-pkg-path path? ?-apps|-no-apps? ?-app-path path? ?-nroff-path path? ?-html-path path? ?-example-path path?"
@@ -566,6 +589,40 @@ proc wait {} {
@@ -566,6 +592,40 @@ proc wait {} {
exit 0
}
return

View File

@ -1,11 +1,11 @@
$OpenBSD: patch-support_installation_actions_tcl,v 1.2 2014/09/10 23:10:04 stu Exp $
$OpenBSD: patch-support_installation_actions_tcl,v 1.3 2014/10/21 05:10:34 stu Exp $
Retrieve module info from man pages.
Perform shebang adjustments.
--- support/installation/actions.tcl.orig Wed Oct 30 14:44:52 2013
+++ support/installation/actions.tcl Fri Nov 8 15:05:31 2013
@@ -108,15 +108,98 @@ proc _tci {module libdir} {
--- support/installation/actions.tcl.orig Mon Aug 11 01:25:55 2014
+++ support/installation/actions.tcl Tue Sep 16 17:25:20 2014
@@ -108,15 +108,106 @@ proc _tci {module libdir} {
return
}
@ -46,7 +46,14 @@ Perform shebang adjustments.
- [file join $distribution examples $module] \
- [file join $exadir $module] \
- 1
- return
+proc _tcm {module libdir} {
+ global distribution config pkgs
+ file mkdir $config(mp)
+ xcopyfile [file join $distribution modules $module $module.tcl] \
+ [file join $config(mp) $module-$pkgs($module).tm]
return
+}
+
+proc _exafile {fn dfn tclsh} {
+ set f [open $fn]
+ set d [read $f 2]

View File

@ -1,12 +1,41 @@
$OpenBSD: patch-support_installation_modules_tcl,v 1.1 2013/11/14 09:43:09 stu Exp $
--- support/installation/modules.tcl.orig Wed Oct 30 14:44:52 2013
+++ support/installation/modules.tcl Wed Nov 6 21:47:52 2013
@@ -32,7 +32,7 @@ array set guide {}
$OpenBSD: patch-support_installation_modules_tcl,v 1.2 2014/10/21 05:10:34 stu Exp $
--- support/installation/modules.tcl.orig Mon Aug 11 01:25:55 2014
+++ support/installation/modules.tcl Tue Sep 16 17:49:55 2014
@@ -31,26 +31,26 @@ array set guide {}
# @@ Registration START
# name pkg doc example
Module autoscroll _tcl _man _null
-Module autoscroll _tcl _man _null
-Module canvas _tcl _man _null
-Module chatwidget _tcl _man _null
+Module autoscroll _tcm _man _null
+Module canvas _tcl _man _exa
Module chatwidget _tcl _man _null
+Module chatwidget _tcm _man _null
Module controlwidget _tcl _man _exa
Module ctext _ctxt _man _null
-Module ctext _ctxt _man _null
-Module cursor _tcl _man _null
-Module crosshair _tcl _man _null
-Module datefield _tcl _man _null
+Module ctext _tcm _man _null
+Module cursor _tcm _man _null
+Module crosshair _tcm _man _null
+Module datefield _tcm _man _null
Module diagrams _tcl _man _null
Module getstring _tcl _man _null
-Module history _tcl _man _null
+Module history _tcm _man _null
Module ico _tcl _man _null
-Module ipentry _tcl _man _null
+Module ipentry _tcm _man _null
Module khim _tclm _man _null
Module mentry _tab _null _exa
Module menubar _tcl _man _exa
-Module ntext _tcl _man _exa
+Module ntext _tcm _man _exa
Module plotchart _tcl _man _exa
Module style _tcl _man _null
-Module swaplist _tcl _man _null
+Module swaplist _tcm _man _null
Module tablelist _tab _null _exa
Module tkpiechart _tcl _man _exa
Module tooltip _tcl _man _null

View File

@ -1,11 +1,8 @@
@comment $OpenBSD: PLIST,v 1.4 2014/08/30 17:32:34 stu Exp $
@comment $OpenBSD: PLIST,v 1.5 2014/10/21 05:10:34 stu Exp $
@conflict mentry-*
@conflict wcb-*
@pkgpath devel/mentry
@pkgpath devel/wcb
lib/tcl/autoscroll/
lib/tcl/autoscroll/autoscroll.tcl
lib/tcl/autoscroll/pkgIndex.tcl
lib/tcl/canvas/
lib/tcl/canvas/canvas_drag.tcl
lib/tcl/canvas/canvas_epoints.tcl
@ -20,9 +17,6 @@ lib/tcl/canvas/canvas_tags.tcl
lib/tcl/canvas/canvas_trlines.tcl
lib/tcl/canvas/canvas_zoom.tcl
lib/tcl/canvas/pkgIndex.tcl
lib/tcl/chatwidget/
lib/tcl/chatwidget/chatwidget.tcl
lib/tcl/chatwidget/pkgIndex.tcl
lib/tcl/controlwidget/
lib/tcl/controlwidget/bindDown.tcl
lib/tcl/controlwidget/controlwidget.tcl
@ -33,18 +27,6 @@ lib/tcl/controlwidget/rdial.tcl
lib/tcl/controlwidget/tachometer.tcl
lib/tcl/controlwidget/vertical_meter.tcl
lib/tcl/controlwidget/voltmeter.tcl
lib/tcl/crosshair/
lib/tcl/crosshair/crosshair.tcl
lib/tcl/crosshair/pkgIndex.tcl
lib/tcl/ctext/
lib/tcl/ctext/ctext.tcl
lib/tcl/ctext/pkgIndex.tcl
lib/tcl/cursor/
lib/tcl/cursor/cursor.tcl
lib/tcl/cursor/pkgIndex.tcl
lib/tcl/datefield/
lib/tcl/datefield/datefield.tcl
lib/tcl/datefield/pkgIndex.tcl
lib/tcl/diagrams/
lib/tcl/diagrams/application.tcl
lib/tcl/diagrams/attributes.tcl
@ -59,16 +41,10 @@ lib/tcl/diagrams/point.tcl
lib/tcl/getstring/
lib/tcl/getstring/pkgIndex.tcl
lib/tcl/getstring/tk_getString.tcl
lib/tcl/history/
lib/tcl/history/history.tcl
lib/tcl/history/pkgIndex.tcl
lib/tcl/ico/
lib/tcl/ico/ico.tcl
lib/tcl/ico/ico0.tcl
lib/tcl/ico/pkgIndex.tcl
lib/tcl/ipentry/
lib/tcl/ipentry/ipentry.tcl
lib/tcl/ipentry/pkgIndex.tcl
lib/tcl/khim/
lib/tcl/khim/ROOT.msg
lib/tcl/khim/cs.msg
@ -101,9 +77,16 @@ lib/tcl/menubar/menubar.tcl
lib/tcl/menubar/node.tcl
lib/tcl/menubar/pkgIndex.tcl
lib/tcl/menubar/tree.tcl
lib/tcl/ntext/
lib/tcl/ntext/ntext.tcl
lib/tcl/ntext/pkgIndex.tcl
lib/tcl/modules/85/autoscroll-1.1.tm
lib/tcl/modules/85/chatwidget-1.1.0.tm
lib/tcl/modules/85/crosshair-1.2.tm
lib/tcl/modules/85/ctext-3.3.tm
lib/tcl/modules/85/cursor-0.3.1.tm
lib/tcl/modules/85/datefield-0.2.tm
lib/tcl/modules/85/history-0.1.tm
lib/tcl/modules/85/ipentry-0.3.tm
lib/tcl/modules/85/ntext-0.81.tm
lib/tcl/modules/85/swaplist-0.2.tm
lib/tcl/plotchart/
lib/tcl/plotchart/pkgIndex.tcl
lib/tcl/plotchart/plot3d.tcl
@ -131,9 +114,6 @@ lib/tcl/style/as.tcl
lib/tcl/style/lobster.tcl
lib/tcl/style/pkgIndex.tcl
lib/tcl/style/style.tcl
lib/tcl/swaplist/
lib/tcl/swaplist/pkgIndex.tcl
lib/tcl/swaplist/swaplist.tcl
lib/tcl/tablelist/
lib/tcl/tablelist/pkgIndex.tcl
lib/tcl/tablelist/scripts/