From cbc71b2150cfdbf398dec5f7fb1eaf2dfdca5100 Mon Sep 17 00:00:00 2001 From: Will Andrews Date: Fri, 9 Jun 2000 03:27:54 +0000 Subject: [PATCH] Add tcltls, a Tcl interface to OpenSSL. PR: 18388 Submitted by: Mikhail Teterin --- devel/Makefile | 1 + devel/tcltls/Makefile | 84 +++++++++++++++++++++++++++++++++++++ devel/tcltls/distinfo | 1 + devel/tcltls/files/patch-aa | 18 ++++++++ devel/tcltls/files/patch-ab | 18 ++++++++ devel/tcltls/files/patch-ac | 7 ++++ devel/tcltls/pkg-comment | 1 + devel/tcltls/pkg-descr | 5 +++ devel/tcltls/pkg-plist | 7 ++++ 9 files changed, 142 insertions(+) create mode 100644 devel/tcltls/Makefile create mode 100644 devel/tcltls/distinfo create mode 100644 devel/tcltls/files/patch-aa create mode 100644 devel/tcltls/files/patch-ab create mode 100644 devel/tcltls/files/patch-ac create mode 100644 devel/tcltls/pkg-comment create mode 100644 devel/tcltls/pkg-descr create mode 100644 devel/tcltls/pkg-plist diff --git a/devel/Makefile b/devel/Makefile index 8ff3c8a33323..90707c5c0a18 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -221,6 +221,7 @@ SUBDIR += tclcl SUBDIR += tclgetopts SUBDIR += tclreadline + SUBDIR += tcltls SUBDIR += templ SUBDIR += tkcon SUBDIR += tkcvs diff --git a/devel/tcltls/Makefile b/devel/tcltls/Makefile new file mode 100644 index 000000000000..2bd676c2a382 --- /dev/null +++ b/devel/tcltls/Makefile @@ -0,0 +1,84 @@ +# New ports collection makefile for: tclgetopts +# Date created: 4 May 2000 +# Whom: mi@aldan.algebra.com +# +# $FreeBSD$ +# + +PORTNAME= tcltls +PORTVERSION= 1.3 +CATEGORIES= devel tcl80 tcl82 tcl83 +MASTER_SITES= http://www.sensus.org/tcl/ +DISTNAME= tls${PORTVERSION:S/.//} + +MAINTAINER= mi@aldan.algebra.com + +LIB_DEPENDS= crypto:${PORTSDIR}/security/openssl + +WRKSRC= ${WRKDIR}/tls1.3/unix + +GNU_CONFIGURE= yes + +pre-patch: + # Fixing the end-of-lines: + for f in `find ${WRKSRC}/.. -type f` ; do \ + ${TR} -d '\015' < $$f > $$f.noms && \ + ${CAT} $$f.noms > $$f && ${RM} $$f.noms; done + +PLIST_SUB+= TCL_VER=${TCL_VER} + +post-install: + ${MKDIR} ${PREFIX}/share/doc/tls1.3 + ${MV} ${PREFIX}/lib/tls1.3/tls.htm ${PREFIX}/share/doc/tls1.3 + ${MV} ${PREFIX}/lib/tls1.3/libtls${TCL_VER}.so.1 ${PREFIX}/lib + ${LN} -sf libtls${TCL_VER}.so.1 ${PREFIX}/lib/libtls${TCL_VER}.so + +.include + +.if !defined(SSL_DIR) +.if exists(${PREFIX}/openssl) +SSL_DIR= ${PREFIX}/openssl +.else +SSL_DIR= /usr +.endif +.endif + +CONFIGURE_ARGS+= --with-ssl-dir="${SSL_DIR}" + +.if (!defined(WITH_TCL80) && !defined(WITH_TCL82) && !defined(WITH_TCL83)) +.if exists(${PREFIX}/bin/tclsh8.3) +WITH_TCL83= yes +.elseif exists(${PREFIX}/bin/tclsh8.2) +WITH_TCL82= yes +.else +WITH_TCL80= yes +.endif +.endif + +.if defined(WITH_TCL80) +LIB_DEPENDS= tcl80.1:${PORTSDIR}/lang/tcl80 +CONFIGURE_ENV+= TCLLIB=${PREFIX}/lib/tcl8.0 +TCLVERMSG= "Building for Tcl 8.0" +TCL_VER= 80 +.endif + +.if defined(WITH_TCL82) +LIB_DEPENDS= tcl82.1:${PORTSDIR}/lang/tcl82 +CONFIGURE_ENV+= TCLLIB=${PREFIX}/lib/tcl8.2 +TCLVERMSG= "Building for Tcl 8.2" +TCL_VER= 82 +.endif + +.if defined(WITH_TCL83) +LIB_DEPENDS= tcl83.1:${PORTSDIR}/lang/tcl83 +CONFIGURE_ENV+= TCLLIB=${PREFIX}/lib/tcl8.3 +TCLVERMSG= "Building for Tcl 8.3" +TCL_VER= 83 +.endif + +pre-fetch: + # ${TCLVERMSG} + # "Define WITH_TCL80, or WITH_TCL82, or WITH_TCL83" + # "To compile against a different version of TCL" + +.include diff --git a/devel/tcltls/distinfo b/devel/tcltls/distinfo new file mode 100644 index 000000000000..febde0a8a59c --- /dev/null +++ b/devel/tcltls/distinfo @@ -0,0 +1 @@ +MD5 (tls13.tar.gz) = 0500fc4eb0d5874d6b3a3ea72392ae72 diff --git a/devel/tcltls/files/patch-aa b/devel/tcltls/files/patch-aa new file mode 100644 index 000000000000..ccfa941758ad --- /dev/null +++ b/devel/tcltls/files/patch-aa @@ -0,0 +1,18 @@ +--- configure Thu Sep 6 15:26:44 1999 ++++ configure Thu May 4 16:49:16 2000 +@@ -534,7 +534,7 @@ + +-if test -r "$prefix/lib/tclConfig.sh"; then +- . $prefix/lib/tclConfig.sh +- echo "$ac_t""using $prefix/lib/tclConfig.sh" 1>&6 ++if test -r "$TCLLIB/tclConfig.sh"; then ++ . $TCLLIB/tclConfig.sh ++ echo "$ac_t""using $TCLLIB/tclConfig.sh" 1>&6 + else +- { echo "configure: error: count not find lib/tclConfig.sh in $prefix" 1>&2; exit 1; } ++ { echo "configure: error: count not find tclConfig.sh in $TCLLIB" 1>&2; exit 1; } + fi +@@ -768,2 +768,3 @@ + s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g ++s%@TCL_VERSION@%$TCL_VERSION%g + diff --git a/devel/tcltls/files/patch-ab b/devel/tcltls/files/patch-ab new file mode 100644 index 000000000000..55791867adfa --- /dev/null +++ b/devel/tcltls/files/patch-ab @@ -0,0 +1,18 @@ +--- Makefile.in Sun Sep 26 18:53:29 1999 ++++ Makefile.in Thu May 4 17:10:29 2000 +@@ -46,1 +46,1 @@ +-CFLAGS = -O ++#CFLAGS = -O +@@ -107,3 +107,3 @@ + CC_SWITCHES = ${CFLAGS} ${SHLIB_CFLAGS} -I${GENERIC_DIR} -I${SRC_DIR} \ +- -I${prefix}/include ${AC_FLAGS} ${PROTO_FLAGS} \ ++ -I${prefix}/include/tcl@TCL_VERSION@ ${AC_FLAGS} ${PROTO_FLAGS} \ + ${ENV_FLAGS} ${SSL_FLAGS} @TCL_EXTRA_FLAGS@ +@@ -140,3 +140,3 @@ + rm -f ${LIB_FILE} +- @TCL_SHLIB_LD@ -o ${LIB_FILE} ${OBJS} @TCL_SHLIB_LD_LIBS@ ++ @TCL_SHLIB_LD@ -o ${LIB_FILE} ${OBJS} @TCL_SHLIB_LD_LIBS@ ${LIBS} + $(RANLIB) ${LIB_FILE} +@@ -146,1 +146,1 @@ +- ( echo cd $(TOP_DIR)/tests\; source all ) | tclsh80 ++ ( echo 'cd $(TOP_DIR)/tests; foreach f [glob *.tcl] { source $$f }') | tclsh@TCL_VERSION@ diff --git a/devel/tcltls/files/patch-ac b/devel/tcltls/files/patch-ac new file mode 100644 index 000000000000..1bb698b50905 --- /dev/null +++ b/devel/tcltls/files/patch-ac @@ -0,0 +1,7 @@ +--- pkgIndex.tcl.in Mon May 24 14:51:36 1999 ++++ pkgIndex.tcl.in Thu May 4 17:43:01 2000 +@@ -1,2 +1,2 @@ +-package ifneeded @PACKAGE@ @VERSION@ [list load [file join $dir @LIB_FILE@]] +- ++package ifneeded @PACKAGE@ @VERSION@ "load [file join $dir .. @LIB_FILE@]; \ ++ source [file join $dir tls.tcl]" diff --git a/devel/tcltls/pkg-comment b/devel/tcltls/pkg-comment new file mode 100644 index 000000000000..ad46710b1216 --- /dev/null +++ b/devel/tcltls/pkg-comment @@ -0,0 +1 @@ +SSL extensions for TCL; dynamicly loadable diff --git a/devel/tcltls/pkg-descr b/devel/tcltls/pkg-descr new file mode 100644 index 000000000000..87d079ffa02d --- /dev/null +++ b/devel/tcltls/pkg-descr @@ -0,0 +1,5 @@ +A portable extension that provides the power of OpenSSL to Tcl programs. +This extension can be used to utilize SSL encryption on top of any valid +Tcl Channel - not just sockets! + +WWW: http://www.sensus.org/tcl/ diff --git a/devel/tcltls/pkg-plist b/devel/tcltls/pkg-plist new file mode 100644 index 000000000000..7699f36e86b1 --- /dev/null +++ b/devel/tcltls/pkg-plist @@ -0,0 +1,7 @@ +lib/tls1.3/pkgIndex.tcl +lib/tls1.3/tls.tcl +@dirrm lib/tls1.3 +lib/libtls%%TCL_VER%%.so.1 +lib/libtls%%TCL_VER%%.so +share/doc/tls1.3/tls.htm +@dirrm share/doc/tls1.3