diff options
author | miwi <miwi@FreeBSD.org> | 2007-03-07 03:38:10 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2007-03-07 03:38:10 +0800 |
commit | 326c99f2d4af4badd52990518f3ee0f297b76afd (patch) | |
tree | 5abc959223b7ecd640990f32200e4613fd67d984 | |
parent | 92068f409606cdff591cc79283bf6305e3eec2df (diff) | |
download | freebsd-ports-gnome-326c99f2d4af4badd52990518f3ee0f297b76afd.tar.gz freebsd-ports-gnome-326c99f2d4af4badd52990518f3ee0f297b76afd.tar.zst freebsd-ports-gnome-326c99f2d4af4badd52990518f3ee0f297b76afd.zip |
Tcl-tk-wrapper installs shell wrappers for "tclsh" and "wish" commands that
come with different versions of tcl and tk. Users can define which version
of the tcl and tk shells should be called.
To make use of the "tclsh" wrapper, users need to install tcl.
Recommended tcl ports: lang/tcl84 lang/tcl85
To make use of the "wish" wrapper, users need to install tk.
Recommended tk ports: x11-toolkits/tk84 x11-toolkits/tk85
- Martin Matuska
martin@matuska.org
PR: ports/109852
Submitted by: martin at matuska.org
-rw-r--r-- | lang/Makefile | 1 | ||||
-rw-r--r-- | lang/tcl-tk-wrapper/Makefile | 36 | ||||
-rw-r--r-- | lang/tcl-tk-wrapper/files/pkg-message.in | 13 | ||||
-rw-r--r-- | lang/tcl-tk-wrapper/files/tclsh.in | 31 | ||||
-rw-r--r-- | lang/tcl-tk-wrapper/files/tcltk.conf.sample.in | 17 | ||||
-rw-r--r-- | lang/tcl-tk-wrapper/files/wish.in | 31 | ||||
-rw-r--r-- | lang/tcl-tk-wrapper/pkg-descr | 12 |
7 files changed, 141 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile index 3af28084dcd4..053c3b427ee1 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -308,6 +308,7 @@ SUBDIR += sxm SUBDIR += t3x SUBDIR += tcl-manual + SUBDIR += tcl-tk-wrapper SUBDIR += tcl80 SUBDIR += tcl81-thread SUBDIR += tcl82 diff --git a/lang/tcl-tk-wrapper/Makefile b/lang/tcl-tk-wrapper/Makefile new file mode 100644 index 000000000000..497050078f24 --- /dev/null +++ b/lang/tcl-tk-wrapper/Makefile @@ -0,0 +1,36 @@ +# Ports collection makefile for: tcl-tk-wrapper +# Date created: 4 March 2007 +# Whom: martin@matuska.org +# +# $FreeBSD$ +# + +PORTNAME= wrapper +PORTVERSION= 1.0 +CATEGORIES= lang tcl84 tk84 +MASTER_SITES= # empty +PKGNAMEPREFIX= tcl-tk- +DISTFILES= # none +EXTRACT_ONLY= # empty + +MAINTAINER= martin@matuska.org +COMMENT= Shell wrapper for tclsh and wish (Tcl/Tk) + +NO_BUILD= yes + +TCLTK_CONF= ${PREFIX}/etc/tcltk.conf + +SUB_FILES= tclsh wish tcltk.conf.sample pkg-message +SUB_LIST+= ECHO_CMD="${ECHO_CMD}" GREP="${GREP}" LS="${LS}" \ + TCLTK_CONF="${TCLTK_CONF}" +PLIST_FILES= bin/tclsh bin/wish etc/tcltk.conf.sample + +do-install: + ${INSTALL_SCRIPT} ${WRKDIR}/tclsh ${PREFIX}/bin/tclsh + ${INSTALL_SCRIPT} ${WRKDIR}/wish ${PREFIX}/bin/wish + ${INSTALL_DATA} ${WRKDIR}/tcltk.conf.sample ${PREFIX}/etc/tcltk.conf.sample + +post-install: + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/lang/tcl-tk-wrapper/files/pkg-message.in b/lang/tcl-tk-wrapper/files/pkg-message.in new file mode 100644 index 000000000000..8eaf8a7cec78 --- /dev/null +++ b/lang/tcl-tk-wrapper/files/pkg-message.in @@ -0,0 +1,13 @@ +******************************************************************* +Tcl is required to use the "tclsh" wrapper. +Recommended ports: lang/tcl84 lang/tcl85 + +Tk is required to use the "wish" wrapper. +Recommended ports: x11-toolkits/tk84 x11-toolkits/tk85 + +You may wish to create or modify the configuration file: +%%TCLTK_CONF%% + +Sample configuration file is located at: +%%PREFIX%%/etc/tcltk.conf.sample +******************************************************************* diff --git a/lang/tcl-tk-wrapper/files/tclsh.in b/lang/tcl-tk-wrapper/files/tclsh.in new file mode 100644 index 000000000000..429c4cca974e --- /dev/null +++ b/lang/tcl-tk-wrapper/files/tclsh.in @@ -0,0 +1,31 @@ +#!/bin/sh +# $FreeBSD$ +# +# Wrapper for the tcl shell "tclsh" + +TCLSH= +TCLTK_CONF=%%TCLTK_CONF%% + +if [ -f "${TCLTK_CONF}" ]; then + . ${TCLTK_CONF} + if [ -n "${TCLSH}" ]; then + if [ -x "${TCLSH}" ]; then + exec ${TCLSH} "$@" + else + %%ECHO_CMD%% "File not found or not executable: ${TCLSH}" + %%ECHO_CMD%% "Please check variable TCLSH in: ${TCLTK_CONF}" + fi + else + %%ECHO_CMD%% "You do not have set path to default tclsh in the configuration file:" + %%ECHO_CMD%% "%%TCLTK_CONF%%" + %%ECHO_CMD%% "Please see the sample configuration file for details:" + %%ECHO_CMD%% "%%TCLTK_CONF%%.sample" + fi + %%ECHO_CMD%% "" + %%ECHO_CMD%% "You may need a tcl shell installed to use this wrapper from ports like:" + %%ECHO_CMD%% "lang/tcl84 or lang/tcl85" +else + %%ECHO_CMD%% "Configuration file not found: %%TCLTK_CONF%%" + %%ECHO_CMD%% "Please see the sample configuration file for details:" + %%ECHO_CMD%% "%%TCLTK_CONF%%.sample" +fi diff --git a/lang/tcl-tk-wrapper/files/tcltk.conf.sample.in b/lang/tcl-tk-wrapper/files/tcltk.conf.sample.in new file mode 100644 index 000000000000..feba8f11df2e --- /dev/null +++ b/lang/tcl-tk-wrapper/files/tcltk.conf.sample.in @@ -0,0 +1,17 @@ +# This is a sample configuration file for tcltk.conf +# Targets for "tclsh" and "wish" shell wrappers are configured here. +# Please copy this file to: %%TCLTK_CONF%% +# +# You require tcl installed to use the "tclsh" wrapper +# Recommended tcl ports: lang/tcl84 lang/tcl85 +# +# You require tk installed to use the "wish" wrapper +# Recommended tk ports: x11-toolkits/tk84 x11-toolkits/tk85 + +# TCLSH= full path to your tclsh shell +#TCLSH=%%PREFIX%%/bin/tclsh8.4 +#TCLSH=%%PREFIX%%/bin/tclsh8.5 + +# WISH= full path to your wish shell +#WISH=%%PREFIX%%/bin/wish8.4 +#WISH=%%PREFIX%%/bin/wish8.5 diff --git a/lang/tcl-tk-wrapper/files/wish.in b/lang/tcl-tk-wrapper/files/wish.in new file mode 100644 index 000000000000..f7c09398a997 --- /dev/null +++ b/lang/tcl-tk-wrapper/files/wish.in @@ -0,0 +1,31 @@ +#!/bin/sh +# $FreeBSD$ +# +# Wrapper for the tk shell "wish" + +WISH= +TCLTK_CONF=%%TCLTK_CONF%% + +if [ -f "${TCLTK_CONF}" ]; then + . ${TCLTK_CONF} + if [ -n "${WISH}" ]; then + if [ -x "${WISH}" ]; then + exec ${WISH} "$@" + else + %%ECHO_CMD%% "File not found or not executable: ${WISH}" + %%ECHO_CMD%% "Please check variable WISH in: ${TCLTK_CONF}" + fi + else + %%ECHO_CMD%% "Path to default wish shell is not set in the configuration file:" + %%ECHO_CMD%% "%%TCLTK_CONF%%" + %%ECHO_CMD%% "Please see the sample configuration file for details:" + %%ECHO_CMD%% "%%TCLTK_CONF%%.sample" + fi + %%ECHO_CMD%% "" + %%ECHO_CMD%% "You may need a wish shell installed to use this wrapper from ports like:" + %%ECHO_CMD%% "x11-toolkits/tk84 or x11-toolkits/tk85" +else + %%ECHO_CMD%% "Configuration file not found: %%TCLTK_CONF%%" + %%ECHO_CMD%% "Please see the sample configuration file for details:" + %%ECHO_CMD%% "%%TCLTK_CONF%%.sample" +fi diff --git a/lang/tcl-tk-wrapper/pkg-descr b/lang/tcl-tk-wrapper/pkg-descr new file mode 100644 index 000000000000..a689e2a6c28f --- /dev/null +++ b/lang/tcl-tk-wrapper/pkg-descr @@ -0,0 +1,12 @@ +Tcl-tk-wrapper installs shell wrappers for "tclsh" and "wish" commands that +come with different versions of tcl and tk. Users can define which version +of the tcl and tk shells should be called. + +To make use of the "tclsh" wrapper, users need to install tcl. +Recommended tcl ports: lang/tcl84 lang/tcl85 + +To make use of the "wish" wrapper, users need to install tk. +Recommended tk ports: x11-toolkits/tk84 x11-toolkits/tk85 + +- Martin Matuska +martin@matuska.org |