summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorkamil <kamil@pkgsrc.org>2019-10-07 14:37:34 +0000
committerkamil <kamil@pkgsrc.org>2019-10-07 14:37:34 +0000
commit4bdb7d53a43f3abc65b78bde997793f8022b2432 (patch)
tree92e8cd8e18a83e3ce97efeda459796e9a6cf2290 /lang
parenta4c49dcc7666fcbe37af043092b0fe06c2f2f964 (diff)
downloadpkgsrc-4bdb7d53a43f3abc65b78bde997793f8022b2432.tar.gz
lang/tcltutor: import tcltutor-30b7
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.
Diffstat (limited to 'lang')
-rw-r--r--lang/tcltutor/DESCR7
-rw-r--r--lang/tcltutor/Makefile57
-rw-r--r--lang/tcltutor/PLIST112
-rw-r--r--lang/tcltutor/distinfo7
-rw-r--r--lang/tcltutor/patches/patch-TclTutor.tcl82
5 files changed, 265 insertions, 0 deletions
diff --git a/lang/tcltutor/DESCR b/lang/tcltutor/DESCR
new file mode 100644
index 00000000000..47c614d3bd7
--- /dev/null
+++ b/lang/tcltutor/DESCR
@@ -0,0 +1,7 @@
+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.
diff --git a/lang/tcltutor/Makefile b/lang/tcltutor/Makefile
new file mode 100644
index 00000000000..fcddec68e5b
--- /dev/null
+++ b/lang/tcltutor/Makefile
@@ -0,0 +1,57 @@
+# $NetBSD: Makefile,v 1.1 2019/10/07 14:37:34 kamil Exp $
+
+DISTNAME= tcltutor30b7
+PKGNAME= ${DISTNAME:S/tcltutor/tcltutor-/}
+CATEGORIES= lang
+MASTER_SITES= ${MASTER_SITE_OPENBSD:=distfiles/}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= kamil@NetBSD.org
+HOMEPAGE= http://www.msen.com/~clif/TclTutor.html
+COMMENT= Learn Tcl interactively
+LICENSE= isc
+
+WRKSRC= ${WRKDIR}/TclTutor
+
+SUBST_CLASSES+= fix-wish
+SUBST_STAGE.fix-wish= pre-configure
+SUBST_MESSAGE.fix-wish= Fixing tcl wish
+SUBST_FILES.fix-wish+= TclTutor.tcl
+SUBST_SED.fix-wish+= -e 's,exec wish,exec ${PREFIX}/bin/wish,'
+
+SUBST_CLASSES+= fix-data
+SUBST_STAGE.fix-data= pre-configure
+SUBST_MESSAGE.fix-data= Fixing libdatadir
+SUBST_FILES.fix-data+= TclTutor.tcl
+SUBST_SED.fix-data+= -e 's,@TCLTUTOR_LIBDATADIR@,${PREFIX}/${TCLTUTOR_LIBDATADIR},'
+
+NO_BUILD= yes
+
+USE_TOOLS+= pax:build wish:run
+
+TCLTUTOR_LIBDATADIR= share/tcltutor
+TCLTUTOR_DOCDIR= share/doc/tcltutor
+
+INSTALLATION_DIRS+= bin ${TCLTUTOR_LIBDATADIR} ${TCLTUTOR_DOCDIR}
+
+pre-configure:
+ ${RUN} cd ${WRKSRC} && ${FIND} . -type d -name 'CVS' | ${XARGS} ${RM} -fr
+
+do-install:
+ ${RUN} cd ${WRKSRC} && \
+ ${INSTALL_SCRIPT} TclTutor.tcl ${DESTDIR}${PREFIX}/bin/tcltutor
+.for i in balloon.tcl htmllib.tcl images.tcl options.tcl simpleTop.tcl
+ ${RUN} cd ${WRKSRC} && \
+ ${INSTALL_DATA} ${i} ${DESTDIR}${PREFIX}/${TCLTUTOR_LIBDATADIR}
+.endfor
+.for i in NOTICE README
+ ${RUN} cd ${WRKSRC} && \
+ ${INSTALL_DATA} ${i} ${DESTDIR}${PREFIX}/${TCLTUTOR_DOCDIR}
+.endfor
+.for i in Tcl_English Tcl_Portuguese
+ ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/${TCLTUTOR_LIBDATADIR}/lesson/${i}
+ ${RUN} cd ${WRKSRC}/lesson/${i} && \
+ ${PAX} -wr * ${DESTDIR}${PREFIX}/${TCLTUTOR_LIBDATADIR}/lesson/${i}
+.endfor
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/lang/tcltutor/PLIST b/lang/tcltutor/PLIST
new file mode 100644
index 00000000000..95e1602455a
--- /dev/null
+++ b/lang/tcltutor/PLIST
@@ -0,0 +1,112 @@
+@comment $NetBSD: PLIST,v 1.1 2019/10/07 14:37:34 kamil Exp $
+bin/tcltutor
+share/doc/tcltutor/NOTICE
+share/doc/tcltutor/README
+share/tcltutor/balloon.tcl
+share/tcltutor/htmllib.tcl
+share/tcltutor/images.tcl
+share/tcltutor/lesson/Tcl_English/TclLesson.dmy
+share/tcltutor/lesson/Tcl_English/Tcl_English.cfg
+share/tcltutor/lesson/Tcl_English/Tcl_English0.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English1.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English10.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English11.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English12.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English13.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English14.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English15.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English16.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English17.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English18.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English19.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English2.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English20.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English21.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English22.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English23.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English24.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English25.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English26.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English27.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English28.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English29.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English3.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English30.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English31.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English32.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English33.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English34.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English35.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English36.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English37.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English38.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English39.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English4.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English40.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English41.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English42.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English43.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English44.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English45.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English46.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English47.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English5.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English6.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English7.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English8.lsn
+share/tcltutor/lesson/Tcl_English/Tcl_English9.lsn
+share/tcltutor/lesson/Tcl_English/about.html
+share/tcltutor/lesson/Tcl_English/help.html
+share/tcltutor/lesson/Tcl_Portuguese/AVISO
+share/tcltutor/lesson/Tcl_Portuguese/LEIAME
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese.cfg
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese0.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese1.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese10.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese11.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese12.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese13.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese14.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese15.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese16.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese17.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese18.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese19.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese2.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese20.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese21.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese22.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese23.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese24.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese25.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese26.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese27.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese28.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese29.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese3.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese30.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese31.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese32.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese33.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese34.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese35.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese36.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese37.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese38.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese39.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese4.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese40.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese41.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese42.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese43.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese5.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese6.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese7.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese8.lsn
+share/tcltutor/lesson/Tcl_Portuguese/Tcl_Portuguese9.lsn
+share/tcltutor/lesson/Tcl_Portuguese/about.html
+share/tcltutor/lesson/Tcl_Portuguese/help.html
+share/tcltutor/lesson/Tcl_Portuguese/htmllib.tcl
+share/tcltutor/lesson/Tcl_Portuguese/scaler.tcl
+share/tcltutor/options.tcl
+share/tcltutor/simpleTop.tcl
diff --git a/lang/tcltutor/distinfo b/lang/tcltutor/distinfo
new file mode 100644
index 00000000000..327d9c9910e
--- /dev/null
+++ b/lang/tcltutor/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2019/10/07 14:37:34 kamil Exp $
+
+SHA1 (tcltutor30b7.tgz) = 6dfa79b50189dbb3e5a1f004e0f711cd1fc2a90d
+RMD160 (tcltutor30b7.tgz) = 02f389c5b5835f5280c20594be5b5415c2ef7e54
+SHA512 (tcltutor30b7.tgz) = 17af025b192eefcfde03bf4f9dc173030a0048e84de4ef42c4525f645e5b5067d9209af0da4b1bc632cfbc6faf9703b96eaf9148324c63e4a3d367671756f0f9
+Size (tcltutor30b7.tgz) = 263363 bytes
+SHA1 (patch-TclTutor.tcl) = edc20e3bc3c8175f8feaa38befbed8537bd42514
diff --git a/lang/tcltutor/patches/patch-TclTutor.tcl b/lang/tcltutor/patches/patch-TclTutor.tcl
new file mode 100644
index 00000000000..d3d0ce1915f
--- /dev/null
+++ b/lang/tcltutor/patches/patch-TclTutor.tcl
@@ -0,0 +1,82 @@
+$NetBSD: patch-TclTutor.tcl,v 1.1 2019/10/07 14:37:34 kamil Exp $
+
+- fix shebang
+- disable logUsage+mailLog
+- overwrite data dir
+
+--- TclTutor.tcl.orig 2014-03-20 14:27:20.000000000 +0000
++++ TclTutor.tcl
+@@ -1,8 +1,8 @@
+-package provide app-tcltutor 1.0
+ #!/bin/sh
+ # \
+ exec wish "$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) @TCLTUTOR_LIBDATADIR@
++ set Tutor(lessonHome) @TCLTUTOR_LIBDATADIR@/lesson
+ set Tutor(rcHome) $env(HOME)
+ set Tutor(rcfile) [file join $Tutor(rcHome) .tcltutorrc]
+ set Tutor(logFileName) [file join $Tutor(rcHome) .tcltutoract]
+@@ -160,8 +160,8 @@ proc parseArgs {stateVar {throwError 1}}
+ }
+ "macintosh" -
+ "mac" {
+- set Tutor(sourceHome) [file dirname $argv0]
+- set Tutor(lessonHome) [file dirname $argv0]/lesson
++ set Tutor(sourceHome) @TCLTUTOR_LIBDATADIR@
++ set Tutor(lessonHome) @TCLTUTOR_LIBDATADIR@/lesson
+ set Tutor(rcHome) [file dirname $argv0]
+ set Tutor(rcfile) [file join $Tutor(rcHome) tcltutor.rc]
+ set Tutor(logFileName) [file join $Tutor(rcHome) tcltutor.act]
+@@ -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
+@@ -694,7 +694,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 {
+@@ -1153,6 +1153,8 @@ proc SetFontSize {} {
+ #
+ proc logUsage {str} {
+ global Tutor
++
++ return
+
+ if {$Tutor(logUsage) == 0} {return}
+
+@@ -1180,6 +1182,9 @@ proc logUsage {str} {
+ #
+ proc mailLog {} {
+ global Tutor tcl_platform
++
++ return
++
+ catch {close $Tutor(logFile)}
+
+ switch $tcl_platform(platform) {
+@@ -1388,4 +1393,3 @@ selectCourse [file join \
+ [format "%s.%s" $Tutor(courseName) cfg]]
+
+ applyOptions
+-