Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jan 2000 20:46:00 -0500 (EST)
From:      Mikhail Teterin <mi@kot.ne.mediaone.net>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/16020: mod_dtcl port added -- embed TCL8.x into Apache
Message-ID:  <200001100146.UAA83990@rtfm.newton>

next in thread | raw e-mail | index | archive | help

>Number:         16020
>Category:       ports
>Synopsis:       mod_dtcl port added -- embed TCL8.x into Apache
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan  9 17:50:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Mikhail Teterin
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
Virtual Estates, Inc.
>Environment:

>Description:

From the software's readme.html:

	mod_dtcl is  a free/open source implementation  of server parsed
	Tcl, under Apache,  distributed under the terms of  the GNU GPL.
	It allows you to tightly integrate  html with Tcl, a widely used
	scripting language  with many  years of development  invested in
	it. This is an ideal combination, allowing you to greatly extend
	what you could do with plain  html. Because Tcl is such a widely
	used language, there is a  large amount of documentation for it,
	both on  the net  and books.  There are  also many  external Tcl
	modules  that you  can  load into  mod_dtcl,  to create  images,
	access databases, etc.

	It actually appears to work on 2.2.8 as well...

>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:
#
#	mod_dtcl
#	mod_dtcl/files
#	mod_dtcl/files/Makefile.bsd
#	mod_dtcl/files/md5
#	mod_dtcl/pkg
#	mod_dtcl/pkg/COMMENT
#	mod_dtcl/pkg/DESCR
#	mod_dtcl/pkg/INSTALL
#	mod_dtcl/pkg/PLIST
#	mod_dtcl/pkg/MESSAGE
#	mod_dtcl/Makefile
#	mod_dtcl/patches
#	mod_dtcl/patches/patch-aa
#
echo c - mod_dtcl
mkdir -p mod_dtcl > /dev/null 2>&1
echo c - mod_dtcl/files
mkdir -p mod_dtcl/files > /dev/null 2>&1
echo x - mod_dtcl/files/Makefile.bsd
sed 's/^X//' >mod_dtcl/files/Makefile.bsd << 'END-of-mod_dtcl/files/Makefile.bsd'
X# If you link against Tcl like so "-ltcl", leave this blank.
XTCL_VERSION?=8.2
XTCL_NDVER?=${TCL_VERSION:S/.//}	# same, but without the dot
X
XPREFIX?=	/usr/local
X
XINCLUDES=-I${PREFIX}/include/apache -I${PREFIX}/include/tcl${TCL_VERSION}
X
XCC!=		${PREFIX}/sbin/apxs -q CC
XCFLAGS!=	${PREFIX}/sbin/apxs -q CFLAGS CFLAGS_SHLIB
XCFLAGS+=	-Wall -DSTATUS -DNO_DBM_REWRITEMAP ${INCLUDES}
X
XLIB=	mod_dtcl
XSHLIB_MAJOR=1
XSHLIB_MINOR=0
X
XLDADD=	-L${PREFIX}/lib -ltcl${TCL_NDVER}
XLDFLAGS=${LDADD} -lm
X
XNOPROFILE=	True	# to avoid building profiled library
XINTERNALLIB=	True	# to avoid building a static version
X
XSRCS=	mod_dtcl.c
XNOMAN=	True	# don't bother with the man-page here, let the port handle it
X
Xall:	${SHLIB_NAME} testdtcl
X
X.include <bsd.lib.mk>
END-of-mod_dtcl/files/Makefile.bsd
echo x - mod_dtcl/files/md5
sed 's/^X//' >mod_dtcl/files/md5 << 'END-of-mod_dtcl/files/md5'
XMD5 (libapache-mod-dtcl_0.6.4-2.tar.gz) = 2134a0b7ce40fc7bca48262ca6fa2423
END-of-mod_dtcl/files/md5
echo c - mod_dtcl/pkg
mkdir -p mod_dtcl/pkg > /dev/null 2>&1
echo x - mod_dtcl/pkg/COMMENT
sed 's/^X//' >mod_dtcl/pkg/COMMENT << 'END-of-mod_dtcl/pkg/COMMENT'
XEmbeds a TCL8 interpreter in the Apache server
END-of-mod_dtcl/pkg/COMMENT
echo x - mod_dtcl/pkg/DESCR
sed 's/^X//' >mod_dtcl/pkg/DESCR << 'END-of-mod_dtcl/pkg/DESCR'
XFrom the software's readme.html:
X
X	mod_dtcl is  a free/open source implementation  of server parsed
X	Tcl, under Apache,  distributed under the terms of  the GNU GPL.
X	It allows you to tightly integrate  html with Tcl, a widely used
X	scripting language  with many  years of development  invested in
X	it. This is an ideal combination, allowing you to greatly extend
X	what you could do with plain  html. Because Tcl is such a widely
X	used language, there is a  large amount of documentation for it,
X	both on  the net  and books.  There are  also many  external Tcl
X	modules  that you  can  load into  mod_dtcl,  to create  images,
X	access databases, etc.
END-of-mod_dtcl/pkg/DESCR
echo x - mod_dtcl/pkg/INSTALL
sed 's/^X//' >mod_dtcl/pkg/INSTALL << 'END-of-mod_dtcl/pkg/INSTALL'
X#!/bin/sh
X#
X# Try to activate mod_dtcl in the installed apache.conf and warn
X# if this fails. This script could be replaced with a simple @exec
X# line in the PLIST if the apache13 package installed an apache.conf.
X#
X# Copied from ${PORTSDIR}/www/mod_perl
X#
X# $Id$
X#
X
Xif [ "$2" != "POST-INSTALL" ]; then
X	exit 0
Xfi
X
XTMPDIR=${TMPDIR:=/tmp}
XPKG_TMPDIR=${PKG_TMPDIR:=${TMPDIR}}
X
Xapxscmd=${PKG_PREFIX}/sbin/apxs
Xdtclmod=${PKG_PREFIX}/libexec/apache/mod_dtcl.so
Xtmpdir=${PKG_TMPDIR}/instmod_dtcl.$$
X
Xif [ ! -x ${apxscmd} ]; then
X	echo Can\'t find the apxs program: ${apxscmd}.
X	exit 1
Xfi
X
Xconfdir=`${apxscmd} -q SYSCONFDIR`
X
Xif [ ! -d ${confdir} ]; then
X	echo Can\'t find Apache conf dir: ${confdir}
X	exit 1
Xfi
X
Xif [ ! -f ${confdir}/apache.conf ]; then
X	if [ ! -f ${confdir}/apache.conf.default ]; then
X		echo Can\'t find either of ${confdir}/apache.conf nor
X		echo ${confdir}/apache.conf.default.
X		exit 1
X	fi
X
X	if ! mkdir ${tmpdir}; then
X		echo Can\'t create temporary directory: ${tmpdir}
X		exit 1
X	fi
X
X	cp ${confdir}/apache.conf.default ${tmpdir}/apache.conf
X	if ${apxscmd} -e -S SYSCONFDIR=${tmpdir} -A -n dtcl ${dtclmod}; then
X		echo Updating apache.conf.default in config dir: ${confdir}
X		cat ${tmpdir}/apache.conf > ${confdir}/apache.conf.default
X		rm -rf ${tmpdir}
X		exit 0
X	else
X		rm -rf ${tmpdir}
X		echo The apxs command failed to activate mod_dtcl in the config
X		echo file: ${tmpdir}/apache.conf.
X		exit 1
X	fi
Xelif ${apxscmd} -e -A -n dtcl ${dtclmod}; then
X	exit 0
Xelse
X	echo The apxs command failed to activate mod_dtcl in the config
X	echo file: ${confdir}/apache.conf
X	exit 1
Xfi
X
Xexit 0
END-of-mod_dtcl/pkg/INSTALL
echo x - mod_dtcl/pkg/PLIST
sed 's/^X//' >mod_dtcl/pkg/PLIST << 'END-of-mod_dtcl/pkg/PLIST'
Xlibexec/apache/mod_dtcl.so
Xshare/doc/mod_dtcl/INSTALL.html
Xshare/doc/mod_dtcl/benchmark.html
Xshare/doc/mod_dtcl/dtcl-tcl.html
Xshare/doc/mod_dtcl/readme.html
Xshare/doc/mod_dtcl/table.html
Xshare/doc/mod_dtcl/use.html
Xshare/doc/mod_dtcl/examples.ttml
Xshare/doc/mod_dtcl/dtcl.gif
Xshare/doc/mod_dtcl/dtcl.tcl
X@dirrm share/doc/mod_dtcl
END-of-mod_dtcl/pkg/PLIST
echo x - mod_dtcl/pkg/MESSAGE
sed 's/^X//' >mod_dtcl/pkg/MESSAGE << 'END-of-mod_dtcl/pkg/MESSAGE'
X-
X	Please, follow the instructions in
X		file:/usr/local/share/doc/mod_dtcl/INSTALL.html
X
X	(where  /usr/local may  be  replaced  by your  machine's
X	setting for PREFIX) to enable the mod_dtcl's usage.
X
X	Note, that the dtcl.tcl mentioned in the instructions is
X	installed as /usr/local/share/doc/mod_dtcl/dtcl.tcl .
X-
END-of-mod_dtcl/pkg/MESSAGE
echo x - mod_dtcl/Makefile
sed 's/^X//' >mod_dtcl/Makefile << 'END-of-mod_dtcl/Makefile'
X# New ports collection makefile for:	tcl-Apache
X# Version required:			0.6.4-2
X# Date created:				January 9, 1999
X# Whom:	      				Mikhail Teterin <mi@aldan.algebra.com>
X#
X# $Id$
X#
X
XDISTNAME=	libapache-mod-dtcl_0.6.4-2
XPKGNAME=	mod_dtcl-0.6.4.2
XCATEGORIES=	www tcl82
XMASTER_SITES=	http://master.debian.org/~davidw/mod_dtcl/
X
XMAINTAINER=	mi@aldan.algebra.com
X
XBUILD_DEPENDS=	${PREFIX}/sbin/apxs:${PORTSDIR}/www/apache13
XLIB_DEPENDS=	tcl82:${PORTSDIR}/lang/tcl82
X
XWRKSRC=		${WRKDIR}/mod_dtcl
X
XMAKEFILE=	${FILESDIR}/Makefile.bsd
X
XMAN1=		testdtcl.1
XMANCOMPRESSED=	no
X
Xdo-install:
X	${INSTALL_DATA} ${WRKSRC}/libmod_dtcl.so.1* \
X		${PREFIX}/libexec/apache/mod_dtcl.so
X	${INSTALL_PROGRAM} ${WRKSRC}/testdtcl ${PREFIX}/bin
X	${INSTALL_MAN} ${WRKSRC}/testdtcl.1 ${PREFIX}/man/man1/
X	${MKDIR} ${PREFIX}/share/doc/mod_dtcl
X	${INSTALL_DATA} ${WRKSRC}/dtcl.tcl ${PREFIX}/share/doc/mod_dtcl
X.if !defined(NOPORTDOCS)
X	${INSTALL_DATA} ${WRKSRC}/*.?tml ${WRKSRC}/*.gif \
X		${PREFIX}/share/doc/mod_dtcl
X	${CAT} ${PKGMESSAGE}
X.else
X	# Not installing the documentation. Consult the
X	#	file:/${WRKSRC}/INSTALL.html
X	# for information on how to proceed to enable mod_dtcl.
X	# Note, that the dtcl.tcl mentioned there is installed as
X	#	${PREFIX}/share/doc/mod_dtcl/dtcl.tcl
X	# but the comment in it suggests it should not be used
X	# in a "production environment"...
X.endif
X	@ ${SH} ${PKGINSTALL}
X
X.include <bsd.port.mk>
END-of-mod_dtcl/Makefile
echo c - mod_dtcl/patches
mkdir -p mod_dtcl/patches > /dev/null 2>&1
echo x - mod_dtcl/patches/patch-aa
sed 's/^X//' >mod_dtcl/patches/patch-aa << 'END-of-mod_dtcl/patches/patch-aa'
X--- testdtcl.c.orig	Mon Oct 18 10:29:02 1999
X+++ testdtcl.c	Sun Jan  9 19:13:53 2000
X@@ -14,4 +14,5 @@
X #include <tcl.h>
X #include <unistd.h>
X+#include <stdlib.h> /* In older FreeBSD, this is where getopt(3) lives */
X 
X #ifndef DEBUG_SCRIPT_DIR
X@@ -229,4 +230,5 @@
X 	}
X     }
X+    return 0;
X }
X 
END-of-mod_dtcl/patches/patch-aa
exit

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


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001100146.UAA83990>