summaryrefslogtreecommitdiff
path: root/devel/tcltls
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2001-02-21 22:37:38 +0000
committerMikhail Teterin <mi@FreeBSD.org>2001-02-21 22:37:38 +0000
commit6f57d472f652332f82988ee6f693dfb3c2cd44ac (patch)
treecbb6ae0214b25994c6d45fe65a28cbc69497cb22 /devel/tcltls
parentAdd 2 new sites to fetch the sources from. These were found using (diff)
Upgrade to the latest version 1.4. It will be _required_ for TCL
8.3.2 and above, and helps the earlier versions too. Remove the patches and provide our own Makefile.bsd instead. Also, remove the WITH_TCL8? spaghetti and use a simpler TCL_VER?=8.3 aproach. Note, that this port now assumes the usage of TCL_STUBS.
Notes
Notes: svn path=/head/; revision=38573
Diffstat (limited to 'devel/tcltls')
-rw-r--r--devel/tcltls/Makefile79
-rw-r--r--devel/tcltls/distinfo2
-rw-r--r--devel/tcltls/files/Makefile.bsd50
-rw-r--r--devel/tcltls/files/patch-aa18
-rw-r--r--devel/tcltls/files/patch-ab18
-rw-r--r--devel/tcltls/files/patch-ac7
-rw-r--r--devel/tcltls/pkg-descr5
-rw-r--r--devel/tcltls/pkg-plist14
8 files changed, 82 insertions, 111 deletions
diff --git a/devel/tcltls/Makefile b/devel/tcltls/Makefile
index 2bd676c2a382..62d564d76bc9 100644
--- a/devel/tcltls/Makefile
+++ b/devel/tcltls/Makefile
@@ -6,18 +6,17 @@
#
PORTNAME= tcltls
-PORTVERSION= 1.3
+PORTVERSION= 1.4
CATEGORIES= devel tcl80 tcl82 tcl83
-MASTER_SITES= http://www.sensus.org/tcl/
-DISTNAME= tls${PORTVERSION:S/.//}
+MASTER_SITES= ${MASTER_SITE_TCLTK}
+MASTER_SITE_SUBDIR=tls
+DISTNAME= tls${PORTVERSION}
MAINTAINER= mi@aldan.algebra.com
-LIB_DEPENDS= crypto:${PORTSDIR}/security/openssl
+LIB_DEPENDS+= tcl${TCLVND}:${PORTSDIR}/lang/tcl${TCLVND}
-WRKSRC= ${WRKDIR}/tls1.3/unix
-
-GNU_CONFIGURE= yes
+USE_OPENSSL= Yes
pre-patch:
# Fixing the end-of-lines:
@@ -25,60 +24,22 @@ pre-patch:
${TR} -d '\015' < $$f > $$f.noms && \
${CAT} $$f.noms > $$f && ${RM} $$f.noms; done
-PLIST_SUB+= TCL_VER=${TCL_VER}
+PLIST_SUB+= TCL_VER=${TCL_VER} DISTNAME="${DISTNAME}"
+MAKEFILE= ${FILESDIR}/Makefile.bsd
+MAKE_ENV= TCL_VER=${TCL_VER} MKDIR="${MKDIR}" \
+ INSTALL_DATA="${INSTALL_DATA}" \
+ OPENSSLINC="${OPENSSLINC}" OPENSSLLIB="${OPENSSLLIB}" \
+ OPENSSLDIR="${OPENSSLDIR}" CFLAGS="${CFLAGS}" \
+ PORTVERSION="${PORTVERSION}" SED="${SED}"
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 <bsd.port.pre.mk>
-
-.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
+ ${MKDIR} ${PREFIX}/share/doc/tls
+ ${INSTALL_DATA} ${WRKSRC}/tls.htm ${PREFIX}/share/doc/tls/
-.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
+TCL_VER?= 8.3
+TCLVND= ${TCL_VER:S/.//}
-pre-fetch:
- # ${TCLVERMSG}
- # "Define WITH_TCL80, or WITH_TCL82, or WITH_TCL83"
- # "To compile against a different version of TCL"
+.include <bsd.port.mk>
-.include <bsd.port.post.mk>
+PLIST_SUBP!= ${ENV} ${MAKE_ENV} ${MAKE} -f ${MAKEFILE} environ
+PLIST_SUB+= ${PLIST_SUBP}
diff --git a/devel/tcltls/distinfo b/devel/tcltls/distinfo
index febde0a8a59c..d9232dd73b29 100644
--- a/devel/tcltls/distinfo
+++ b/devel/tcltls/distinfo
@@ -1 +1 @@
-MD5 (tls13.tar.gz) = 0500fc4eb0d5874d6b3a3ea72392ae72
+MD5 (tls1.4.tar.gz) = 1ab57c2e22e61fb2f22daf56fccc3fde
diff --git a/devel/tcltls/files/Makefile.bsd b/devel/tcltls/files/Makefile.bsd
new file mode 100644
index 000000000000..1520e6657241
--- /dev/null
+++ b/devel/tcltls/files/Makefile.bsd
@@ -0,0 +1,50 @@
+PACKAGE = tls
+VERSION ?= ${PORTVERSION}
+LIB = ${PACKAGE}
+SHLIB_MAJOR = ${VERSION:R}
+SHLIB_MINOR = ${VERSION:E}
+
+SRCS = tls.c tlsIO.c tlsBIO.c tlsX509.c # fixstrtod.c strncasecmp.c
+
+PREFIX ?=/usr/local
+TCL_VER ?=8.3
+
+.if exists(${PREFIX}/lib/tcl${TCL_VER}/tclConfig.sh)
+# If for some reason the file does not exist -- make the best guess. In
+# reality, it will exist by the time we are actually doing the build, so
+# the quality of the guess does not matter. But we still try well. -mi
+TCL_STUB_LIB_SPEC!= . ${PREFIX}/lib/tcl${TCL_VER}/tclConfig.sh; \
+ echo $$TCL_STUB_LIB_SPEC
+.else
+TCL_STUB_LIB_SPEC= -L${PREFIX}/lib -ltclstub${TCL_VER:S/.//}
+.endif
+
+LDADD += ${TCL_STUB_LIB_SPEC} -L${OPENSSLLIB} -lcrypto -lssl
+
+CFLAGS +=-I${PREFIX}/include/tcl${TCL_VER} -I${OPENSSLINC}
+CFLAGS +=-DNDEBUG -I. -DUSE_TCL_STUBS -I${PREFIX}/include
+CFLAGS +=-DVERSION=\"${VERSION}\" -DPACKAGE=\"${PACKAGE}\"
+
+INTERNALLIB = don't build the useless static version
+
+all: ${SHLIB_NAME} pkgIndex.tcl
+
+pkgIndex.tcl: ${.CURDIR}/pkgIndex.tcl.in
+ ${SED} -e "s#@RELPATH@#..#" -e "s#@tls_LIB_FILE@#${SHLIB_NAME}#" \
+ < ${.CURDIR}/pkgIndex.tcl.in > pkgIndex.tcl
+
+SCRIPTDIR = lib/tls
+SCRIPTPATH = ${PREFIX}/${SCRIPTDIR}
+SHLIBDIR = ${PREFIX}/lib
+
+${SCRIPTPATH}:
+ ${MKDIR} ${SCRIPTPATH}
+
+environ:
+ @${ECHO} SHLIB_NAME="${SHLIB_NAME}" SHLIB_LINK="${SHLIB_LINK}" \
+ SCRIPTDIR="${SCRIPTDIR}"
+
+beforeinstall: ${SCRIPTPATH}
+ ${INSTALL_DATA} pkgIndex.tcl ${.CURDIR}/tls.tcl ${SCRIPTPATH}
+
+.include <bsd.lib.mk>
diff --git a/devel/tcltls/files/patch-aa b/devel/tcltls/files/patch-aa
deleted file mode 100644
index ccfa941758ad..000000000000
--- a/devel/tcltls/files/patch-aa
+++ /dev/null
@@ -1,18 +0,0 @@
---- 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
deleted file mode 100644
index 55791867adfa..000000000000
--- a/devel/tcltls/files/patch-ab
+++ /dev/null
@@ -1,18 +0,0 @@
---- 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
deleted file mode 100644
index 1bb698b50905..000000000000
--- a/devel/tcltls/files/patch-ac
+++ /dev/null
@@ -1,7 +0,0 @@
---- 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-descr b/devel/tcltls/pkg-descr
index 87d079ffa02d..d4c0f48d6beb 100644
--- a/devel/tcltls/pkg-descr
+++ b/devel/tcltls/pkg-descr
@@ -2,4 +2,7 @@ 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/
+Note, that Scriptics has released this newer version (1.4), but the
+author's web-site listed below still only lists 1.3.
+
+WWW: http://www.sensus.org/tcl/tls.htm
diff --git a/devel/tcltls/pkg-plist b/devel/tcltls/pkg-plist
index 7699f36e86b1..a6c2aa2c5671 100644
--- a/devel/tcltls/pkg-plist
+++ b/devel/tcltls/pkg-plist
@@ -1,7 +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
+%%SCRIPTDIR%%/pkgIndex.tcl
+%%SCRIPTDIR%%/tls.tcl
+@dirrm %%SCRIPTDIR%%
+lib/%%SHLIB_NAME%%
+lib/%%SHLIB_LINK%%
+%%PORTDOCS%%share/doc/tls/tls.htm
+%%PORTDOCS%%@dirrm share/doc/tls