import TclTutor 3.0b1

This is a package designed to teach the Tcl programming language in a
quick and easy manner.  The goal is to teach the minimal amount of Tcl
syntax, commands and options that are necessary to write useful
programs.

from Stuart Cassoff (aa72aa60 at sympatico.ca)
This commit is contained in:
steven 2008-05-02 06:43:46 +00:00
parent 276ab95894
commit 72ffdfa674
5 changed files with 242 additions and 0 deletions

53
lang/tcltutor/Makefile Normal file
View File

@ -0,0 +1,53 @@
# $OpenBSD: Makefile,v 1.1.1.1 2008/05/02 06:43:46 steven Exp $
COMMENT= learn Tcl interactively
DISTNAME= tcltutor-30b1
CATEGORIES= lang lang/tcl
DISTFILES= tcltutor30b1.tgz
HOMEPAGE= http://www.msen.com/~clif/TclTutor.html
MASTER_SITES= http://www.msen.com/~clif/
MAINTAINER= Stuart Cassoff <stwo@users.sourceforge.net>
# ISC
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
RUN_DEPENDS= :tk->=8.5:x11/tk/8.5
WRKDIST= ${WRKDIR}/TclTutor
USE_X11= Yes
NO_BUILD= Yes
NO_REGRESS= Yes
TT_LIB_DIR= ${PREFIX}/lib/tcltutor
TT_LSN_DIR= ${PREFIX}/share/doc/tcltutor
do-configure:
awk '{ gsub(/!!TT_LIB_DIR!!/,"${TT_LIB_DIR}") \
} { gsub(/!!TT_LSN_DIR!!/,"${TT_LSN_DIR}") \
} { print }' \
< ${WRKSRC}/TclTutor.tcl > ${WRKSRC}/TclTutor.tcl._tmp && \
mv ${WRKSRC}/TclTutor.tcl._tmp ${WRKSRC}/TclTutor.tcl
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/TclTutor.tcl ${PREFIX}/bin/tcltutor
${INSTALL_DATA_DIR} ${TT_LIB_DIR}
for i in NOTICE README balloon.tcl htmllib.tcl images.tcl \
options.tcl simpleTop.tcl ; do \
${INSTALL_DATA} ${WRKSRC}/$$i ${TT_LIB_DIR} ; \
done
${INSTALL_DATA_DIR} ${TT_LSN_DIR}
for i in Tcl_English Tcl_Portuguese ; do \
${INSTALL_DATA_DIR} ${TT_LSN_DIR}/$$i; \
for j in lsn cfg html ; do \
${INSTALL_DATA} ${WRKSRC}/lesson/$$i/*.$$j ${TT_LSN_DIR}/$$i ; \
done ; \
done
.include <bsd.port.mk>

5
lang/tcltutor/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (tcltutor30b1.tgz) = cZy7/UGojOo17+aCaDhBgw==
RMD160 (tcltutor30b1.tgz) = PUxNMXJPsqDjsdCnJB2Po3x6cJ0=
SHA1 (tcltutor30b1.tgz) = eMCCUgWXWEWvueHBasfDNbRNwt0=
SHA256 (tcltutor30b1.tgz) = ZmhUSNXKwGOa8FmFZ6cFuk7mC8ddmcfsZVg2jliwwaw=
SIZE (tcltutor30b1.tgz) = 252680

View File

@ -0,0 +1,67 @@
$OpenBSD: patch-TclTutor_tcl,v 1.1.1.1 2008/05/02 06:43:46 steven Exp $
--- TclTutor.tcl.orig Wed Apr 30 20:40:43 2008
+++ TclTutor.tcl Wed Apr 30 22:37:54 2008
@@ -1,8 +1,8 @@
-package provide app-tcltutor 1.0
#!/bin/sh
# \
-exec wish "$0" "$@"
+exec wish8.5 "$0" "$@"
+package provide app-tcltutor 1.0
package require Tk
;# NAME: TclTutor.tcl
@@ -139,8 +139,8 @@ proc parseArgs {stateVar {throwError 1}} {
switch $tcl_platform(platform) {
"unix" {
- set Tutor(sourceHome) [file dirname $argv0]
- set Tutor(lessonHome) [file dirname $argv0]/lesson
+ set Tutor(sourceHome) !!TT_LIB_DIR!!
+ set Tutor(lessonHome) !!TT_LSN_DIR!!
set Tutor(rcHome) $env(HOME)
set Tutor(rcfile) [file join $Tutor(rcHome) .tcltutorrc]
set Tutor(logFileName) [file join $Tutor(rcHome) .tcltutoract]
@@ -174,7 +174,7 @@ proc parseArgs {stateVar {throwError 1}} {
}
}
-set Tutor(noSaves) {sourceHome lessonHome}
+set Tutor(noSaves) {sourceHome lessonHome logUsage mailUsage}
#
# check if a Scripted Document
@@ -654,7 +654,6 @@ proc createDisplay {} {
foreach l {lesson code output} {
set t [labelframe .$l -text [string totitle $l] -height [expr $h/4]]
.pn add $t
- puts [.pn paneconfigure $t ]
set w [text $t.txt -yscrollcommand "$t.ysb set" ]
scrollbar $t.ysb -command "$w yview"
grid rowconfigure $t 0 -weight 1
@@ -694,7 +693,7 @@ proc createDisplay {} {
$mbf.file add command -label $l -command $l2
}
- if {[string match $tcl_platform(platform) "unix"]} {
+ if {0 && [string match $tcl_platform(platform) "unix"]} {
if {$Tutor(logUsage)} {
$mbf.file add command -label "Disable activity log" -command {set Tutor(logUsage) 0}
} else {
@@ -1130,6 +1129,7 @@ proc SetFontSize {} {
proc logUsage {str} {
global Tutor
+ return
if {$Tutor(logUsage) == 0} {return}
if {[string match $Tutor(logFile) ""]} {
@@ -1156,6 +1156,7 @@ proc logUsage {str} {
#
proc mailLog {} {
global Tutor tcl_platform
+ return
catch {close $Tutor(logFile)}
switch $tcl_platform(platform) {

10
lang/tcltutor/pkg/DESCR Normal file
View File

@ -0,0 +1,10 @@
This is a package designed to teach the Tcl programming language in a
quick and easy manner. The goal is to teach the minimal amount of Tcl
syntax, commands and options that are necessary to write useful
programs.
You are encouraged to use the man pages and books to augment this
tutorial.
This version covers all of the commands in the Tcl language, as of
version 7.4, and most of the commands added in later Tcl revisions.

107
lang/tcltutor/pkg/PLIST Normal file
View File

@ -0,0 +1,107 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2008/05/02 06:43:46 steven Exp $
bin/tcltutor
lib/tcltutor/
lib/tcltutor/NOTICE
lib/tcltutor/README
lib/tcltutor/balloon.tcl
lib/tcltutor/htmllib.tcl
lib/tcltutor/images.tcl
lib/tcltutor/options.tcl
lib/tcltutor/simpleTop.tcl
share/doc/tcltutor/
share/doc/tcltutor/Tcl_English/
share/doc/tcltutor/Tcl_English/Tcl_English.cfg
share/doc/tcltutor/Tcl_English/Tcl_English0.lsn
share/doc/tcltutor/Tcl_English/Tcl_English1.lsn
share/doc/tcltutor/Tcl_English/Tcl_English10.lsn
share/doc/tcltutor/Tcl_English/Tcl_English11.lsn
share/doc/tcltutor/Tcl_English/Tcl_English12.lsn
share/doc/tcltutor/Tcl_English/Tcl_English13.lsn
share/doc/tcltutor/Tcl_English/Tcl_English14.lsn
share/doc/tcltutor/Tcl_English/Tcl_English15.lsn
share/doc/tcltutor/Tcl_English/Tcl_English16.lsn
share/doc/tcltutor/Tcl_English/Tcl_English17.lsn
share/doc/tcltutor/Tcl_English/Tcl_English18.lsn
share/doc/tcltutor/Tcl_English/Tcl_English19.lsn
share/doc/tcltutor/Tcl_English/Tcl_English2.lsn
share/doc/tcltutor/Tcl_English/Tcl_English20.lsn
share/doc/tcltutor/Tcl_English/Tcl_English21.lsn
share/doc/tcltutor/Tcl_English/Tcl_English22.lsn
share/doc/tcltutor/Tcl_English/Tcl_English23.lsn
share/doc/tcltutor/Tcl_English/Tcl_English24.lsn
share/doc/tcltutor/Tcl_English/Tcl_English25.lsn
share/doc/tcltutor/Tcl_English/Tcl_English26.lsn
share/doc/tcltutor/Tcl_English/Tcl_English27.lsn
share/doc/tcltutor/Tcl_English/Tcl_English28.lsn
share/doc/tcltutor/Tcl_English/Tcl_English29.lsn
share/doc/tcltutor/Tcl_English/Tcl_English3.lsn
share/doc/tcltutor/Tcl_English/Tcl_English30.lsn
share/doc/tcltutor/Tcl_English/Tcl_English31.lsn
share/doc/tcltutor/Tcl_English/Tcl_English32.lsn
share/doc/tcltutor/Tcl_English/Tcl_English33.lsn
share/doc/tcltutor/Tcl_English/Tcl_English34.lsn
share/doc/tcltutor/Tcl_English/Tcl_English35.lsn
share/doc/tcltutor/Tcl_English/Tcl_English36.lsn
share/doc/tcltutor/Tcl_English/Tcl_English37.lsn
share/doc/tcltutor/Tcl_English/Tcl_English38.lsn
share/doc/tcltutor/Tcl_English/Tcl_English39.lsn
share/doc/tcltutor/Tcl_English/Tcl_English4.lsn
share/doc/tcltutor/Tcl_English/Tcl_English40.lsn
share/doc/tcltutor/Tcl_English/Tcl_English41.lsn
share/doc/tcltutor/Tcl_English/Tcl_English42.lsn
share/doc/tcltutor/Tcl_English/Tcl_English43.lsn
share/doc/tcltutor/Tcl_English/Tcl_English5.lsn
share/doc/tcltutor/Tcl_English/Tcl_English6.lsn
share/doc/tcltutor/Tcl_English/Tcl_English7.lsn
share/doc/tcltutor/Tcl_English/Tcl_English8.lsn
share/doc/tcltutor/Tcl_English/Tcl_English9.lsn
share/doc/tcltutor/Tcl_English/about.html
share/doc/tcltutor/Tcl_English/help.html
share/doc/tcltutor/Tcl_Portuguese/
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese.cfg
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese0.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese1.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese10.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese11.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese12.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese13.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese14.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese15.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese16.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese17.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese18.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese19.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese2.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese20.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese21.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese22.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese23.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese24.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese25.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese26.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese27.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese28.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese29.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese3.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese30.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese31.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese32.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese33.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese34.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese35.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese36.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese37.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese38.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese39.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese4.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese40.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese41.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese42.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese43.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese5.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese6.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese7.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese8.lsn
share/doc/tcltutor/Tcl_Portuguese/Tcl_Portuguese9.lsn
share/doc/tcltutor/Tcl_Portuguese/about.html
share/doc/tcltutor/Tcl_Portuguese/help.html