ports/109852: [NEW PORT] lang/tcl-tk-wrapper

Martin Matuska martin at matuska.org
Sun Mar 4 13:50:03 UTC 2007


>Number:         109852
>Category:       ports
>Synopsis:       [NEW PORT] lang/tcl-tk-wrapper
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 04 13:50:02 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Martin Matuska
>Release:        FreeBSD 6.2-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD 6.2-RELEASE i386/amd64
>Description:
New port: tcl-tk-wrapper
This ports installs bin/tclsh and bin/wish that wrap to user-defined versions
of the shells defined in etc/tcltk.conf
>How-To-Repeat:
>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	lang/tcl-tk-wrapper
#	lang/tcl-tk-wrapper/files
#	lang/tcl-tk-wrapper/files/tclsh.in
#	lang/tcl-tk-wrapper/files/wish.in
#	lang/tcl-tk-wrapper/files/pkg-message.in
#	lang/tcl-tk-wrapper/files/tcltk.conf.sample.in
#	lang/tcl-tk-wrapper/Makefile
#	lang/tcl-tk-wrapper/pkg-descr
#
echo c - lang/tcl-tk-wrapper
mkdir -p lang/tcl-tk-wrapper > /dev/null 2>&1
echo c - lang/tcl-tk-wrapper/files
mkdir -p lang/tcl-tk-wrapper/files > /dev/null 2>&1
echo x - lang/tcl-tk-wrapper/files/tclsh.in
sed 's/^X//' >lang/tcl-tk-wrapper/files/tclsh.in << 'END-of-lang/tcl-tk-wrapper/files/tclsh.in'
X#!/bin/sh
X# $FreeBSD$
X#
X# Wrapper for the tcl shell "tclsh"
X
XTCLSH=
XTCLTK_CONF=%%TCLTK_CONF%%
X
Xif [ -f "${TCLTK_CONF}" ]; then
X  . ${TCLTK_CONF}
X  if [ -n "${TCLSH}" ]; then
X    if [ -x "${TCLSH}" ]; then
X      exec ${TCLSH} "$@"
X    else
X      %%ECHO_CMD%% "File not found or not executable: ${TCLSH}" 
X      %%ECHO_CMD%% "Please check variable TCLSH in: ${TCLTK_CONF}"
X    fi
X  else
X    %%ECHO_CMD%% "You do not have set path to default tclsh in the configuration file:"
X    %%ECHO_CMD%% "%%TCLTK_CONF%%"
X    %%ECHO_CMD%% "Please see the sample configuration file for details:"
X    %%ECHO_CMD%% "%%TCLTK_CONF%%.sample"
X  fi
X  %%ECHO_CMD%% ""
X  %%ECHO_CMD%% "You may need a tcl shell installed to use this wrapper from ports like:"
X  %%ECHO_CMD%% "lang/tcl84 or lang/tcl85"
Xelse
X  %%ECHO_CMD%% "Configuration file not found: %%TCLTK_CONF%%"
X  %%ECHO_CMD%% "Please see the sample configuration file for details:"
X  %%ECHO_CMD%% "%%TCLTK_CONF%%.sample"
Xfi
END-of-lang/tcl-tk-wrapper/files/tclsh.in
echo x - lang/tcl-tk-wrapper/files/wish.in
sed 's/^X//' >lang/tcl-tk-wrapper/files/wish.in << 'END-of-lang/tcl-tk-wrapper/files/wish.in'
X#!/bin/sh
X# $FreeBSD$
X#
X# Wrapper for the tk shell "wish"
X
XWISH=
XTCLTK_CONF=%%TCLTK_CONF%%
X
Xif [ -f "${TCLTK_CONF}" ]; then
X  . ${TCLTK_CONF}
X  if [ -n "${WISH}" ]; then
X    if [ -x "${WISH}" ]; then
X      exec ${WISH} "$@"
X    else
X      %%ECHO_CMD%% "File not found or not executable: ${WISH}" 
X      %%ECHO_CMD%% "Please check variable WISH in: ${TCLTK_CONF}"
X    fi
X  else
X    %%ECHO_CMD%% "Path to default wish shell is not set in the configuration file:"
X    %%ECHO_CMD%% "%%TCLTK_CONF%%"
X    %%ECHO_CMD%% "Please see the sample configuration file for details:"
X    %%ECHO_CMD%% "%%TCLTK_CONF%%.sample"
X  fi
X  %%ECHO_CMD%% ""
X  %%ECHO_CMD%% "You may need a wish shell installed to use this wrapper from ports like:"
X  %%ECHO_CMD%% "x11-toolkits/tk84 or x11-toolkits/tk85"
Xelse
X  %%ECHO_CMD%% "Configuration file not found: %%TCLTK_CONF%%"
X  %%ECHO_CMD%% "Please see the sample configuration file for details:"
X  %%ECHO_CMD%% "%%TCLTK_CONF%%.sample"
Xfi
END-of-lang/tcl-tk-wrapper/files/wish.in
echo x - lang/tcl-tk-wrapper/files/pkg-message.in
sed 's/^X//' >lang/tcl-tk-wrapper/files/pkg-message.in << 'END-of-lang/tcl-tk-wrapper/files/pkg-message.in'
X*******************************************************************
XTcl is required to use the "tclsh" wrapper.
XRecommended ports: lang/tcl84 lang/tcl85
X
XTk is required to use the "wish" wrapper.
XRecommended ports: x11-toolkits/tk84 x11-toolkits/tk85
X
XYou may wish to create or modify the configuration file:
X%%TCLTK_CONF%%
X
XSample configuration file is located at:
X%%PREFIX%%/etc/tcltk.conf.sample
X*******************************************************************
END-of-lang/tcl-tk-wrapper/files/pkg-message.in
echo x - lang/tcl-tk-wrapper/files/tcltk.conf.sample.in
sed 's/^X//' >lang/tcl-tk-wrapper/files/tcltk.conf.sample.in << 'END-of-lang/tcl-tk-wrapper/files/tcltk.conf.sample.in'
X# This is a sample configuration file for tcltk.conf
X# Targets for "tclsh" and "wish" shell wrappers are configured here.
X# Please copy this file to: %%TCLTK_CONF%%
X#
X# You require tcl installed to use the "tclsh" wrapper
X# Recommended tcl ports: lang/tcl84 lang/tcl85
X#
X# You require tk installed to use the "wish" wrapper
X# Recommended tk ports: x11-toolkits/tk84 x11-toolkits/tk85
X
X# TCLSH= full path to your tclsh shell
X#TCLSH=%%PREFIX%%/bin/tclsh8.4
X#TCLSH=%%PREFIX%%/bin/tclsh8.5
X
X# WISH= full path to your wish shell
X#WISH=%%PREFIX%%/bin/wish8.4
X#WISH=%%PREFIX%%/bin/wish8.5
END-of-lang/tcl-tk-wrapper/files/tcltk.conf.sample.in
echo x - lang/tcl-tk-wrapper/Makefile
sed 's/^X//' >lang/tcl-tk-wrapper/Makefile << 'END-of-lang/tcl-tk-wrapper/Makefile'
X# Ports collection makefile for:	tcl-tk-wrapper
X# Date created:			4 March 2007
X# Whom:	      			martin at matuska.org
X#
X# $FreeBSD$
X#
X
XPORTNAME=	wrapper
XPORTVERSION=	1.0
XCATEGORIES=	lang tcl84 tk84
XMASTER_SITES=	# empty
XPKGNAMEPREFIX=	tcl-tk-
XDISTFILES=	# none
XEXTRACT_ONLY=	# empty
X
XMAINTAINER=	martin at matuska.org
XCOMMENT=	Shell wrapper for tclsh and wish (Tcl/Tk)
X
XNO_BUILD=	yes
X
XTCLTK_CONF=	${PREFIX}/etc/tcltk.conf
X
XSUB_FILES=	tclsh wish tcltk.conf.sample pkg-message
XSUB_LIST+=	ECHO_CMD="${ECHO_CMD}" GREP="${GREP}" LS="${LS}" \
X		TCLTK_CONF="${TCLTK_CONF}"
XPLIST_FILES=	bin/tclsh bin/wish etc/tcltk.conf.sample
X
Xdo-install:
X	${INSTALL_SCRIPT} ${WRKDIR}/tclsh ${PREFIX}/bin/tclsh
X	${INSTALL_SCRIPT} ${WRKDIR}/wish ${PREFIX}/bin/wish
X	${INSTALL_DATA} ${WRKDIR}/tcltk.conf.sample ${PREFIX}/etc/tcltk.conf.sample
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-lang/tcl-tk-wrapper/Makefile
echo x - lang/tcl-tk-wrapper/pkg-descr
sed 's/^X//' >lang/tcl-tk-wrapper/pkg-descr << 'END-of-lang/tcl-tk-wrapper/pkg-descr'
XTcl-tk-wrapper installs shell wrappers for "tclsh" and "wish" commands that
Xcome with different versions of tcl and tk. Users can define which version 
Xof the tcl and tk shells should be called.
X
XTo make use of the "tclsh" wrapper, users need to install tcl.
XRecommended tcl ports: lang/tcl84 lang/tcl85
X
XTo make use of the "wish" wrapper, users need to install tk.
XRecommended tk ports: x11-toolkits/tk84 x11-toolkits/tk85
X
X- Martin Matuska
Xmartin at matuska.org
END-of-lang/tcl-tk-wrapper/pkg-descr
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list