aboutsummaryrefslogtreecommitdiff
path: root/www/websh
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2007-02-13 06:46:59 +0000
committerMikhail Teterin <mi@FreeBSD.org>2007-02-13 06:46:59 +0000
commitf3015877b88f3272dfdba48573017e1e70423e83 (patch)
treef8628a1948d1de6861db8e13f547d52db59f6367 /www/websh
parent4a338d1237adf2a55bd6a60300caf0e8756828da (diff)
downloadports-f3015877b88f3272dfdba48573017e1e70423e83.tar.gz
ports-f3015877b88f3272dfdba48573017e1e70423e83.zip
Notes
Diffstat (limited to 'www/websh')
-rw-r--r--www/websh/Makefile98
-rw-r--r--www/websh/distinfo3
-rw-r--r--www/websh/files/httpd.conf.in38
-rw-r--r--www/websh/files/patch-cflags20
-rw-r--r--www/websh/files/patch-conf39
-rw-r--r--www/websh/files/patch-tests12
-rw-r--r--www/websh/files/patch-warnings398
-rw-r--r--www/websh/files/pkg-message.in21
-rw-r--r--www/websh/files/pkgIndex.tcl.in3
-rw-r--r--www/websh/files/shared-patch20
-rw-r--r--www/websh/pkg-descr14
-rw-r--r--www/websh/pkg-plist29
12 files changed, 695 insertions, 0 deletions
diff --git a/www/websh/Makefile b/www/websh/Makefile
new file mode 100644
index 000000000000..7bc9b79d1270
--- /dev/null
+++ b/www/websh/Makefile
@@ -0,0 +1,98 @@
+# New ports collection makefile for: mod_dtcl
+# Date created: January 31, 2007
+# Whom: Mikhail Teterin <mi@aldan.algebra.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= websh
+PORTVERSION= 3.6.0b4
+CATEGORIES= www tcl84
+MASTER_SITES= ${MASTER_SITE_APACHE}
+MASTER_SITE_SUBDIR=tcl/${PORTNAME}/source
+EXTRACT_SUFX= -src.tar.gz
+
+MAINTAINER= mi@aldan.algebra.com
+COMMENT= Embeds a TCL8 interpreter in the Apache server
+
+LIB_DEPENDS= tcl${TCL_DVER}:${PORTSDIR}/lang/tcl${TCL_DVER}
+
+OPTIONS= WSMDEBUG "memory(n) and checkmem(n) commands in web-scripts" on
+OPTIONS+= WSSTATIC "Link the objects into the module statically" off
+
+TCL_DVER= ${TCL_VER:S/.//}
+
+USE_TCL= yes
+USE_AUTOTOOLS= autoconf:259
+WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/src/unix
+CONFIGURE_ARGS+=--with-tclinclude=${TCL_INCLUDEDIR} \
+ --with-tcl=${TCL_LIBDIR}
+USE_GMAKE= yes
+INSTALLS_SHLIB= yes
+SUB_FILES= httpd.conf pkgIndex.tcl pkg-message
+SUB_LIST+= TCL_DVER=${TCL_DVER} WS_VER=${PORTVERSION:R}
+SUB_LIST+= APACHEETCDIR=${APACHEETCDIR} APACHEMODDIR=${APACHEMODDIR}
+
+USE_APACHE= 1.3+
+CONFIGURE_ARGS+=--with-httpdinclude=`apxs -q includedir`
+
+CPPFLAGS+= -I ${LOCALBASE}/include/apr-1
+.if !defined(NO_WERROR) && ${CC} == "cc" || ${CC:T:Mgcc*} != ""
+CPPFLAGS+= -Wall -Werror
+.endif
+
+post-patch:
+ ${REINPLACE_CMD} -e 's,/usr/local/websh,${PREFIX},' \
+ ${WRKSRC:H:H}/doc/mod_websh/conf/websh.conf
+ for p in ${WRKSRC:H:H}/doc/mod_websh/htdocs/*.html ; do \
+ ${SED} -e 's,\.html,.whtml,g' < $$p > \
+ `${DIRNAME} $$p`/`${BASENAME} $$p .html`.whtml; \
+ done
+ ${REINPLACE_CMD} -e 's,\.html,.whtml,g' ${WRKSRC:H:H}/doc/mod_websh/htdocs/*.ws3
+
+post-configure:
+ # "STUBS" are for wimps:
+ ${REINPLACE_CMD} -e 's,tclstub,tcl,' ${WRKSRC}/Makefile
+
+post-build test:
+ ${SETENV} LANG=C ${GMAKE} -C ${WRKSRC} test | ${AWK} '\
+ /Failed/ && $$NF {failed=1} \
+ END {exit failed} \
+ {print}'
+
+do-install:
+ ${MKDIR} ${PREFIX}/lib/${PORTNAME}
+ ${INSTALL_DATA} ${WRKSRC:H:H}/doc/mod_websh/conf/*.ws3 \
+ ${WRKDIR}/pkgIndex.tcl ${PREFIX}/lib/${PORTNAME}/
+ ${INSTALL_DATA} ${WRKSRC:H:H}/doc/mod_websh/conf/websh.conf \
+ ${PREFIX}/etc/websh.conf.dist
+ ${INSTALL_DATA} ${WRKSRC}/mod_websh${PORTVERSION}.so \
+ ${PREFIX}/${APACHEMODDIR}/mod_websh.so
+ ${INSTALL_DATA} ${WRKSRC}/libwebsh${TCL_DVER}.so.1 ${PREFIX}/lib
+ ${LN} -sf ${PREFIX}/lib/libwebsh${TCL_DVER}.so.1 \
+ ${PREFIX}/lib/libwebsh${TCL_DVER}.so
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC:H:H}/doc/mod_websh/htdocs/*.ws3 \
+ ${WRKSRC:H:H}/doc/mod_websh/htdocs/*.whtml \
+ ${WRKDIR}/httpd.conf ${EXAMPLESDIR}/
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC:H:H}/doc/html/* ${DOCSDIR}
+.endif
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_WSMDEBUG)
+CFLAGS+= -DTCL_MEM_DEBUG
+.endif
+
+.if defined(WITHOUT_WSSTATIC)
+EXTRA_PATCHES= ${FILESDIR}/shared-patch
+.endif
+
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}"
+
+.include <bsd.port.post.mk>
diff --git a/www/websh/distinfo b/www/websh/distinfo
new file mode 100644
index 000000000000..e49a44d09351
--- /dev/null
+++ b/www/websh/distinfo
@@ -0,0 +1,3 @@
+MD5 (websh-3.6.0b4-src.tar.gz) = db532479c5ffc17bf3bf25d33751c9dc
+SHA256 (websh-3.6.0b4-src.tar.gz) = 2e986668b9397993aa4934cee81bcde33c2771a84257089710754631e5acc61f
+SIZE (websh-3.6.0b4-src.tar.gz) = 249704
diff --git a/www/websh/files/httpd.conf.in b/www/websh/files/httpd.conf.in
new file mode 100644
index 000000000000..7c72b27d7411
--- /dev/null
+++ b/www/websh/files/httpd.conf.in
@@ -0,0 +1,38 @@
+# This may be done for us already by apxs during install:
+#
+#LoadModule websh_module %%APACHEMODDIR%%/mod_websh.so
+#
+# Add the following to your Apache config file or, if you use
+# Apache-2.x, simply drop into the %%PREFIX%%/%%APACHEETCDIR%%/Includes
+#
+
+<IfModule mod_websh.c>
+
+# add handlers for the file you want to process
+# in this example, we treat .whtml files as SSI type
+# html files that contain websh snipplets and .ws3 files
+# as websh scripts (CGI-like) -> websh.conf
+
+AddHandler websh .whtml
+AddHandler websh .ws3
+# The vendor-distributed version passes ALL .html files
+# through mod_websh, which slows your server down. In this
+# example only files named *.whtml (and .ws3) get processed
+# by the module.
+#
+# -mi
+
+DirectoryIndex index.whtml index.ws3
+
+# This allows you to check, that everything is working by accessing the
+# vendor's examples simply as http://yourserver/websh/
+Alias /websh/ %%EXAMPLESDIR%%/
+<Directory %%EXAMPLESDIR%%>
+ Allow from all
+</Directory>
+
+# see sample for the configuration of
+# SSI type configuration (htmlhandler) and script configuration
+WebshConfig etc/websh.conf
+
+</IfModule>
diff --git a/www/websh/files/patch-cflags b/www/websh/files/patch-cflags
new file mode 100644
index 000000000000..ba150b0d9e9a
--- /dev/null
+++ b/www/websh/files/patch-cflags
@@ -0,0 +1,20 @@
+--- Makefile.in Sun Mar 5 11:58:37 2006
++++ Makefile.in Thu Feb 8 19:37:14 2007
+@@ -96,7 +96,7 @@
+ VERSION = @VERSION@
+ CC = @CC@
+-CFLAGS_DEBUG = @CFLAGS_DEBUG@
+-CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
+-CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
++#CFLAGS_DEBUG = @CFLAGS_DEBUG@
++#CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
++#CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
+ CLEANFILES = @CLEANFILES@
+ EXEEXT = @EXEEXT@
+@@ -154,5 +154,5 @@
+ $(TCL_EXTRA_CFLAGS)
+
+-DEFS = -DVERSION=\"@VERSION@\" -D@PLATFORM@=1 -DUSE_TCL_STUBS=@USE_TCL_STUBS@ $(EXTRA_CFLAGS)
++DEFS = -DVERSION=\"@VERSION@\" -D@PLATFORM@=1 $(EXTRA_CFLAGS)
+
+ ACLOCAL_M4 = $(srcdir)/aclocal.m4
diff --git a/www/websh/files/patch-conf b/www/websh/files/patch-conf
new file mode 100644
index 000000000000..c32076b7681e
--- /dev/null
+++ b/www/websh/files/patch-conf
@@ -0,0 +1,39 @@
+--- ../../doc/mod_websh/conf/websh.conf Mon Nov 14 09:21:00 2005
++++ ../../doc/mod_websh/conf/websh.conf Sat Feb 3 19:36:52 2007
+@@ -2,11 +2,5 @@
+
+ # root of websh files
+-if {[info sharedlibextension] == ".dll"} {
+- # Windows
+- set webshroot "C:/Program Files/Apache Group/Websh"
+-} else {
+- # Unix (.so, .dylib ...)
+- set webshroot /usr/local/websh
+-}
++set webshroot /usr/local/websh
+
+ # Setup interpreter classes for mod_websh
+@@ -17,12 +17,12 @@
+ # special html content (html that contains snipplets only)
+ # same as below, but configured to use different markup syntax
+- if {[string match */other.html $file]} {
+- return "$webshroot/conf/otherhandler.ws3"
++ if {[string match */other.*html $file]} {
++ return "$webshroot/lib/websh/otherhandler.ws3"
+ }
+
+ # default html content (html that contains snipplets only)
+ # all requests for *.html files share interpreters
+- if {[string match *.html $file]} {
+- return "$webshroot/conf/htmlhandler.ws3"
++ if {[string match *.*html $file]} {
++ return "$webshroot/lib/websh/htmlhandler.ws3"
+ }
+
+@@ -35,5 +35,5 @@
+
+ # html handler interpreters live forever ...
+-web::interpclasscfg "$webshroot/conf/htmlhandler.ws3" maxrequests 0
++web::interpclasscfg "$webshroot/lib/websh/htmlhandler.ws3" maxrequests 0
+ # myApp handler interpreters live for 5 requests only
+ web::interpclasscfg "$webshroot/htdocs/myApp.ws3" maxrequests 5
diff --git a/www/websh/files/patch-tests b/www/websh/files/patch-tests
new file mode 100644
index 000000000000..a05b8b03b20b
--- /dev/null
+++ b/www/websh/files/patch-tests
@@ -0,0 +1,12 @@
+--- ../tests/msc.test Sat Mar 4 19:18:35 2006
++++ ../tests/msc.test Sat Feb 3 18:35:12 2007
+@@ -81,6 +81,7 @@
+ global tcl_platform
+ if {"$tcl_platform(platform)" == "unix"
+- && "$tcl_platform(os)" == "Darwin"} {
+- # OSX does not complain if directory does not exist
++ && ("$tcl_platform(os)" == "Darwin" ||
++ [string match *BSD "$tcl_platform(os)"])} {
++ # BSD does not complain if directory does not exist
+ # It just returns the nonexistig path anyway
+ set msg "ok"
diff --git a/www/websh/files/patch-warnings b/www/websh/files/patch-warnings
new file mode 100644
index 000000000000..edca2adcd91e
--- /dev/null
+++ b/www/websh/files/patch-warnings
@@ -0,0 +1,398 @@
+This patch allows clean compiles with gcc's -Wall. Mostly
+it removes unused variables, but not only. Redundant
+initializations are removed in some places too, for example.
+
+Submitted to vendor:
+
+ http://issues.apache.org/bugzilla/show_bug.cgi?id=41523
+
+ -mi
+
+--- ../generic/args.c Wed Sep 11 09:54:01 2002
++++ ../generic/args.c Thu Feb 1 23:12:27 2007
+@@ -95,5 +95,4 @@
+
+ int pos = 0;
+- char *tmp = NULL;
+
+ for (pos = (previous + 1); pos < objc; pos++) {
+@@ -310,5 +309,4 @@
+ int i;
+ char *tmp = NULL;
+- int tmpLen = -1;
+
+ if (scanc < 0)
+--- ../generic/checksum.c Wed Mar 24 10:15:45 2004
++++ ../generic/checksum.c Thu Feb 1 23:13:25 2007
+@@ -85,5 +85,4 @@
+ char tmpc1 = 0;
+ char tmpc2 = 0;
+- int i = 0;
+ unsigned char byte = 0;
+
+@@ -144,6 +143,5 @@
+
+ Tcl_Obj *crcObj = NULL;
+- char *str = NULL;
+- int len = 0;
++ int len;
+ int crc1;
+ int crc2;
+--- ../generic/conv.c Wed Sep 11 09:54:01 2002
++++ ../generic/conv.c Thu Feb 1 23:14:25 2007
+@@ -163,6 +163,5 @@
+
+ ConvData *convData = NULL;
+- Tcl_Obj *res1 = NULL;
+- Tcl_Obj *res2 = NULL;
++ Tcl_Obj *res1;
+
+ /* --------------------------------------------------------------------------
+--- ../generic/crypt.c Thu Oct 25 13:50:15 2001
++++ ../generic/crypt.c Thu Feb 1 23:18:30 2007
+@@ -26,7 +26,6 @@
+ {
+
+- CryptData *cryptData = NULL;
+- int ires = 0;
+- Tcl_Obj *tmp = NULL;
++ CryptData *cryptData;
++ Tcl_Obj *tmp;
+
+ /* --------------------------------------------------------------------------
+--- ../generic/nca_d.c Thu Oct 25 13:50:15 2001
++++ ../generic/nca_d.c Thu Feb 1 23:20:57 2007
+@@ -259,14 +259,13 @@
+ {
+
+- Tcl_Obj *out = NULL;
+- int pack = 0, type = 0, prev = 0, newc = 0, pos = 0;
+- Tcl_Obj *key = NULL;
+- unsigned char *keyBytes = NULL;
+- int keyLen = -1;
++ Tcl_Obj *out;
++ int pack, type, prev = 0, newc, pos = 0;
++ Tcl_Obj *key;
++ unsigned char *keyBytes;
++ int keyLen;
+ char outc;
+- Tcl_Obj *tmp = NULL;
+- int i = 0;
+- char *str = NULL;
+- int strLen = -1;
++ int i;
++ char *str;
++ int strLen;
+
+ if ((clientData == NULL) || (in == NULL))
+--- ../generic/dispatch.c Fri Jul 1 08:11:34 2005
++++ ../generic/dispatch.c Thu Feb 1 23:26:28 2007
+@@ -54,10 +54,7 @@
+ };
+
+- int idx = 0;
+- Tcl_Obj *post_data = NULL;
+- Tcl_Obj *query_string = NULL;
+- Tcl_Obj *formDataChannel = NULL;
+- Tcl_Obj *formDataBoundary = NULL;
+- Tcl_Obj *urlEncString = NULL;
++ int idx;
++ Tcl_Obj *post_data;
++ Tcl_Obj *query_string;
+
+ /* --------------------------------------------------------------------------
+@@ -408,6 +405,5 @@
+ {
+
+- char *content_type = NULL;
+- int iTmp = 0;
++ char *content_type;
+
+ /* printf("DBG parsePostData - starting\n"); fflush(stdout); */
+--- ../generic/filecounter.c Sat Mar 4 16:28:56 2006
++++ ../generic/filecounter.c Thu Feb 1 23:27:44 2007
+@@ -59,5 +59,4 @@
+ enum subCommands
+ { CURVAL, NEXTVAL, GETVAL, CONFIG };
+- char **ptr = (char **) subCommands;
+
+ int idx;
+--- ../generic/filelock.c Thu Oct 25 13:50:15 2001
++++ ../generic/filelock.c Thu Feb 1 23:28:32 2007
+@@ -24,8 +24,8 @@
+ {
+
+- int res = -1;
+- int filedes = -1;
++ int res;
++ int filedes;
+
+- filedes = (int) handle;
++ filedes = (int)(intptr_t)handle;
+
+ #ifdef SYSV
+@@ -68,8 +68,8 @@
+ {
+
+- int res = -1;
+- int filedes = -1;
++ int res;
++ int filedes;
+
+- filedes = (int) handle;
++ filedes = (int)(intptr_t)handle;
+
+ #ifdef SYSV
+@@ -106,8 +106,8 @@
+ {
+
+- int res = 0;
+- int filedes = -1;
++ int res;
++ int filedes;
+
+- filedes = (int) handle;
++ filedes = (int)(intptr_t)handle;
+
+ #ifdef SYSV
+@@ -147,5 +147,4 @@
+
+ ClientData handle;
+- int res = 0;
+
+ if (Tcl_GetChannelHandle(channel, TCL_WRITABLE, &handle) != TCL_OK) {
+@@ -175,5 +174,4 @@
+
+ ClientData handle;
+- int res = 0;
+
+ if (Tcl_GetChannelHandle(channel, TCL_WRITABLE, &handle) != TCL_OK) {
+@@ -244,5 +242,4 @@
+ Tcl_Channel channel;
+ ClientData handle;
+- int res = 0;
+
+ WebAssertObjc(objc != 2, 1, "channel");
+--- ../generic/formdata.c Fri Sep 9 07:21:16 2005
++++ ../generic/formdata.c Thu Feb 1 23:30:07 2007
+@@ -563,5 +563,4 @@
+ long rBytesPrev = 0;
+ long wBytes = 0;
+- char *tmpCurLine = NULL;
+
+ /* --------------------------------------------------------------------------
+--- ../generic/htmlify.c Fri Sep 9 08:33:59 2005
++++ ../generic/htmlify.c Thu Feb 1 23:32:16 2007
+@@ -266,13 +266,10 @@
+ {
+
+- int length = 0; /* length of input */
++ int length; /* length of input */
+ int pos = 0; /* actual position in string */
+- Tcl_UniChar *unic = NULL;
++ Tcl_UniChar *unic;
+ int plainfirst = 0;
+ int plainend = 0;
+- int dump = 0;
+ int err = 0; /* temporary use, may be removed */
+-
+- Tcl_Obj *err_buffer = NULL;
+
+ if (in == NULL || out == NULL) {
+--- ../generic/log.c Sun Mar 5 13:37:27 2006
++++ ../generic/log.c Thu Feb 1 23:34:02 2007
+@@ -435,7 +435,5 @@
+ {
+
+- LogData *logData = NULL;
+- int iTmp = 0;
+- int iCur = 0;
++ LogData *logData;
+
+ /* ------------------------------------------------------------------------
+@@ -697,6 +695,4 @@
+ case DELETE:{
+
+- LogDest *logDest = NULL;
+-
+ /* 0 1 2 */
+ /* web::loglogDest delete logDest1 */
+@@ -893,6 +889,4 @@
+ }
+ case DELETE:{
+-
+- LogLevel *logLevel = NULL;
+
+ /* 0 1 2 */
+--- ../generic/paramlist.c Wed Sep 11 09:54:01 2002
++++ ../generic/paramlist.c Thu Feb 1 23:35:23 2007
+@@ -86,7 +86,6 @@
+ {
+
+- Tcl_Obj *existingValue = NULL;
+- Tcl_Obj *copy = NULL;
+- int len = 0;
++ Tcl_Obj *existingValue;
++ Tcl_Obj *copy;
+
+ if ((hash == NULL) || (key == NULL) || (value == NULL))
+@@ -538,5 +537,5 @@
+
+ if (hash != NULL) {
+- while (he = Tcl_FirstHashEntry(hash, &hs)) {
++ while ((he = Tcl_FirstHashEntry(hash, &hs))) {
+ tclo = (Tcl_Obj *) Tcl_GetHashValue(he);
+ if (tclo != NULL)
+--- ../generic/request.c Sat Mar 4 20:08:46 2006
++++ ../generic/request.c Thu Feb 1 23:36:28 2007
+@@ -445,12 +445,10 @@
+ {
+
+- int idx = -1;
+-
+ static char *params[] = { "-reset", "-channel", NULL };
+ enum params
+ { REQUESTRESET, DEFAULTCHANNELNAME };
+
+- int res = 0;
+- RequestData *requestData = NULL;
++ int res;
++ RequestData *requestData;
+
+ /* --------------------------------------------------------------------------
+--- ../generic/uricode.c Wed Sep 11 09:54:01 2002
++++ ../generic/uricode.c Thu Feb 1 23:37:41 2007
+@@ -80,13 +80,11 @@
+ {
+
+- long length = 0;
+- long i = 0;
++ long i;
+ char str[32]; /* for hex representation of i. 64 bit -> string
+ with 16 chars. 32 should be long enough, then. */
+- Tcl_Obj *tclo = NULL;
+- char *utfs = NULL;
+- Tcl_UniChar unic = 0;
+- unsigned char *bytes = NULL;
+- int bytesLen = -1;
++ Tcl_Obj *tclo;
++ Tcl_UniChar unic;
++ unsigned char *bytes;
++ int bytesLen;
+
+ IfNullLogRetNull(NULL, inString, "uriEncode: got NULL as input.");
+--- ../generic/webout.c Fri Apr 30 16:54:17 2004
++++ ../generic/webout.c Thu Feb 1 23:38:59 2007
+@@ -264,7 +264,6 @@
+
+ case RESET:{
+- Tcl_Obj *tmp = NULL;
+- int err = 0;
+- char *tname = NULL;
++ Tcl_Obj *tmp;
++ char *tname;
+
+ WebAssertObjc(objc != 2, 2, NULL);
+--- ../generic/weboutint.c Sun Mar 5 11:56:32 2006
++++ ../generic/weboutint.c Thu Feb 1 23:43:34 2007
+@@ -29,7 +29,5 @@
+ {
+
+- char *varName = NULL;
+- char *channelName = NULL;
+- int mode = 0;
++ int mode;
+ Tcl_Channel channel = NULL;
+
+@@ -133,11 +131,6 @@
+ {
+
+- Tcl_HashTable *hash = NULL;
+- ResponseObj *responseObj = NULL;
+- int err = 0;
+- int mode = 0;
+- char *name = NULL;
+- Tcl_Obj *tmp = NULL;
+- Tcl_Obj *tmp2 = NULL;
++ Tcl_HashTable *hash;
++ ResponseObj *responseObj;
+ char *defheaders[] = { HEADER, NULL };
+ int i;
+@@ -145,5 +138,4 @@
+ if (channelName == NULL)
+ return NULL;
+- name = channelName;
+
+ /* fprintf(stderr,"creating '%s'\n",channelName); fflush(stderr); */
+@@ -174,6 +166,6 @@
+
+ while (defheaders[i]) {
+- char *key = NULL;
+- Tcl_Obj *val = NULL;
++ char *key;
++ Tcl_Obj *val;
+
+ key = defheaders[i++];
+@@ -186,5 +178,5 @@
+ responseObj->bytesSent = 0;
+ responseObj->headers = hash;
+- responseObj->name = Tcl_NewStringObj(name, -1);
++ responseObj->name = Tcl_NewStringObj(channelName, -1);
+ responseObj->httpresponse = NULL;
+ responseObj->headerHandler = headerHandler;
+@@ -352,7 +344,6 @@
+ {
+
+- OutData *outData = NULL;
++ OutData *outData;
+ /* HashTableIterator iterator; */
+- ResponseObj *responseObj = NULL;
+
+ if (clientData == NULL)
+@@ -384,5 +375,5 @@
+ int begin = 1;
+ int firstScan = 1;
+- int inside = 0, p = 0;
++ int inside = 0;
+ int inLen = 0;
+ int res = 0;
+--- ../generic/interpool.c Sun Mar 5 13:41:48 2006
++++ ../generic/interpool.c Thu Feb 1 23:44:56 2007
+@@ -101,5 +101,4 @@
+
+ int result = 0;
+- time_t t = 0;
+ LogPlugIn *logtoap = NULL;
+ Tcl_Obj *code = NULL;
+@@ -299,5 +298,4 @@
+ WebInterp *found = NULL;
+ WebInterpClass *webInterpClass = NULL;
+- LogToApData *logToApData = NULL;
+ char *id = NULL;
+ Tcl_Obj *idObj = NULL;
+--- ../generic/mod_websh.c Mon Dec 12 12:13:55 2005
++++ ../generic/mod_websh.c Thu Feb 1 23:46:50 2007
+@@ -367,7 +367,4 @@
+
+ int res;
+- void *sconf = r->server->module_config;
+- websh_server_conf *conf =
+- (websh_server_conf *) ap_get_module_config(sconf, &websh_module);
+
+ #ifdef APACHE2
+--- ../generic/modwebsh_ap.c Thu Oct 27 18:00:55 2005
++++ ../generic/modwebsh_ap.c Thu Feb 1 23:47:40 2007
+@@ -83,5 +83,4 @@
+
+ WebInterp *webInterp = (WebInterp *) clientData;
+- int res = 0;
+
+ if (objc != 2) {
+--- ../generic/request_ap.c Thu Nov 3 07:41:34 2005
++++ ../generic/request_ap.c Thu Feb 1 23:48:28 2007
+@@ -40,5 +40,4 @@
+ {
+
+- int res = 0;
+ /*Tcl_Obj *reso = NULL;*/
+ request_rec *r = NULL;
diff --git a/www/websh/files/pkg-message.in b/www/websh/files/pkg-message.in
new file mode 100644
index 000000000000..5206f2c6567a
--- /dev/null
+++ b/www/websh/files/pkg-message.in
@@ -0,0 +1,21 @@
+
+The websh _executable_ is deliberately not installed by this port.
+To load websh functionality into regular Tcl-scripts, simply use:
+
+ package require websh
+
+
+For a ready to use example on configuring the module, see:
+
+ %%EXAMPLESDIR%%/httpd.conf
+
+The file can be simply copied into the
+
+ %%PREFIX%%/%%APACHEETCDIR%%/Includes/
+
+under more recent Apache versions.
+
+Be sure to create %%PREFIX%%/etc/websh.conf -- most likely, you'll
+simply copy the installed %%PREFIX%%/etc/websh.conf.dist over.
+
+-
diff --git a/www/websh/files/pkgIndex.tcl.in b/www/websh/files/pkgIndex.tcl.in
new file mode 100644
index 000000000000..2c6a688fad6e
--- /dev/null
+++ b/www/websh/files/pkgIndex.tcl.in
@@ -0,0 +1,3 @@
+if {[package vcompare [info tclversion] 8.3] < 0} return
+
+package ifneeded websh %%WS_VER%% [list load [file join [file dirname $dir] libwebsh%%TCL_DVER%%.so.1]]
diff --git a/www/websh/files/shared-patch b/www/websh/files/shared-patch
new file mode 100644
index 000000000000..45dc37ca0dcf
--- /dev/null
+++ b/www/websh/files/shared-patch
@@ -0,0 +1,20 @@
+Link the module (and the executable - websh) dynamically with
+-lwebsh84, instead of statically with all of the object files. This
+reduces the size of the module by a factor of 5.
+
+ -mi
+
+--- Makefile.in Sun Mar 5 11:58:37 2006
++++ Makefile.in Thu Feb 8 19:37:14 2007
+@@ -256,9 +256,9 @@
+
+ websh$(VERSION): tclAppInit.$(OBJEXT) $(web_OBJECTS)
+- $(CC) @LDFLAGS@ tclAppInit.$(OBJEXT) $(web_OBJECTS) \
++ $(CC) @LDFLAGS@ tclAppInit.$(OBJEXT) $(web_LIB_FILE)\
+ $(TCL_LIB_SPEC) $(TCL_LIBS) $(TCL_LD_FLAGS) -o websh$(VERSION)
+
+ mod_websh$(MODULE_LIB_SUFFIX): $(web_ap_OBJECTS)
+- $(SHLIB_LD_CURRENT) -o mod_websh$(MODULE_LIB_SUFFIX) $(web_ap_OBJECTS) $(TCL_LIB_SPEC)
++ $(SHLIB_LD_CURRENT) -o mod_websh$(MODULE_LIB_SUFFIX) $(web_OBJECTS_ap) $(web_LIB_FILE) $(TCL_LIB_SPEC)
+
+ mod_websh$(UNSHARED_LIB_SUFFIX): $(web_ap_OBJECTS)
diff --git a/www/websh/pkg-descr b/www/websh/pkg-descr
new file mode 100644
index 000000000000..db3d93721a05
--- /dev/null
+++ b/www/websh/pkg-descr
@@ -0,0 +1,14 @@
+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.
+
+WWW: http://tcl.apache.org/mod_dtcl/
diff --git a/www/websh/pkg-plist b/www/websh/pkg-plist
new file mode 100644
index 000000000000..679fda5722d4
--- /dev/null
+++ b/www/websh/pkg-plist
@@ -0,0 +1,29 @@
+lib/libwebsh84.so.1
+lib/libwebsh84.so
+lib/websh/pkgIndex.tcl
+lib/websh/htmlhandler.ws3
+lib/websh/otherhandler.ws3
+@dirrm lib/websh/
+etc/websh.conf.dist
+%%PORTDOCS%%%%EXAMPLESDIR%%/index.whtml
+%%PORTDOCS%%%%EXAMPLESDIR%%/myApp.ws3
+%%PORTDOCS%%%%EXAMPLESDIR%%/other.whtml
+%%PORTDOCS%%%%EXAMPLESDIR%%/httpd.conf
+%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
+%%PORTDOCS%%%%DOCSDIR%%/Apache_module_specific_commands.html
+%%PORTDOCS%%%%DOCSDIR%%/command_dispatching_and_session_management.html
+%%PORTDOCS%%%%DOCSDIR%%/configuration.html
+%%PORTDOCS%%%%DOCSDIR%%/context_handling.html
+%%PORTDOCS%%%%DOCSDIR%%/data_encryption.html
+%%PORTDOCS%%%%DOCSDIR%%/file_handling_and_file_IO.html
+%%PORTDOCS%%%%DOCSDIR%%/index.html
+%%PORTDOCS%%%%DOCSDIR%%/inter-process_and_-system_communication.html
+%%PORTDOCS%%%%DOCSDIR%%/logging.html
+%%PORTDOCS%%%%DOCSDIR%%/misc_commands.html
+%%PORTDOCS%%%%DOCSDIR%%/request_data_handling.html
+%%PORTDOCS%%%%DOCSDIR%%/response_data_handling.html
+%%PORTDOCS%%%%DOCSDIR%%/uri-html-_en-decoding.html
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%APACHEMODDIR%%/mod_websh.so
+@exec %D/sbin/apxs -e -A -n websh %D/%F
+@unexec %D/sbin/apxs -e -A -n websh %D/%F