mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
- Convert to USES=tcl
- Add LICENSE - Add TEA-based build infrastructure - Switch to new OPTIONS framework (DOCS) - Cleanups PR: 183205 Submitted by: gahr Approved by: maintainer (timeout)
This commit is contained in:
parent
d9e16b8552
commit
ec88458d01
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=344252
@ -11,55 +11,46 @@ DISTNAME= tls${PORTVERSION}-src
|
||||
MAINTAINER= mi@aldan.algebra.com
|
||||
COMMENT= SSL extensions for TCL; dynamicly loadable
|
||||
|
||||
LIB_DEPENDS+= tcl${TCLVND}:${PORTSDIR}/lang/tcl${TCLVND}
|
||||
LICENSE= TclTk
|
||||
LICENSE_NAME= Tcl/Tk License
|
||||
LICENSE_FILE= ${WRKSRC}/license.terms
|
||||
LICENSE_PERMS= auto-accept dist-mirror dist-sell pkg-mirror pkg-sell
|
||||
|
||||
USE_TCL= 84+
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
USES+= tcl
|
||||
USE_OPENSSL= yes
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS+=--exec-prefix=${PREFIX} \
|
||||
--with-tcl=${TCL_LIBDIR} \
|
||||
--with-ssl-dir=${OPENSSLBASE}
|
||||
|
||||
WRKSRC= ${WRKDIR}/tls${PORTVERSION}
|
||||
TCLPKG= tls${PORTVERSION}
|
||||
WRKSRC= ${WRKDIR}/${TCLPKG}
|
||||
PLIST_FILES= lib/${TCLPKG}/lib${TCLPKG}.so \
|
||||
lib/${TCLPKG}/pkgIndex.tcl \
|
||||
lib/${TCLPKG}/tls.tcl
|
||||
PLIST_DIRS= lib/${TCLPKG}
|
||||
PORTDOCS= *
|
||||
|
||||
PLIST_SUB+= TCL_VER=${TCL_VER} DISTNAME="${DISTNAME}"
|
||||
MAKEFILE= ${FILESDIR}/Makefile.bsd
|
||||
MAKE_ENV= TCL_VER=${TCL_VER} MKDIR="${MKDIR}" \
|
||||
INSTALL_DATA="${INSTALL_DATA}" \
|
||||
SHLIB_NAME=libtls.so.1 \
|
||||
PORTVERSION="${PORTVERSION}" SED="${SED}"
|
||||
REINPLACE_ARGS= -i ""
|
||||
ALL_TARGET= -j`${SYSCTL} -n hw.ncpu` all
|
||||
PLIST_SUB= TLS_VERSION=${PORTVERSION}
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
NO_STAGE= yes
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e \
|
||||
's,package require tls.*,load ${WRKSRC}/libtls.so;\
|
||||
's,package require tls.*,load ${WRKSRC}/lib${TCLPKG}.so;\
|
||||
source ${WRKSRC}/tls.tcl,' \
|
||||
${WRKSRC}/tests/*.test
|
||||
# The tests in ciphers.test are meaningless so far:
|
||||
${MV} ${WRKSRC}/tests/ciphers.test ${WRKSRC}/tests/ciphers.test.broken
|
||||
|
||||
.if !defined(NOPORTDOCS)
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
post-install:
|
||||
${MKDIR} ${PREFIX}/share/doc/tls
|
||||
${INSTALL_DATA} ${WRKSRC}/tls.htm ${PREFIX}/share/doc/tls/
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/tls.htm ${STAGEDIR}${DOCSDIR}
|
||||
.endif
|
||||
|
||||
post-build:
|
||||
#
|
||||
#
|
||||
# Please, try performing `make test' now and report any failures
|
||||
# to the ${PORTNAME} developers:
|
||||
# http://sourceforge.net/tracker/?group_id=13248&atid=113248
|
||||
# and/or ${MAINTAINER}.
|
||||
#
|
||||
#
|
||||
|
||||
test:
|
||||
cd ${WRKSRC}/tests && env TCL_LIBRARY="${WRKSRC}" \
|
||||
regression-test:
|
||||
cd ${WRKSRC}/tests && ${SETENV} TCL_LIBRARY="${WRKSRC}" \
|
||||
tclsh${TCL_VER} all.tcl
|
||||
|
||||
TCLVND= ${TCL_VER:S/.//}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
PLIST_SUBP!= ${SETENV} ${MAKE_ENV} ${MAKE} -f ${MAKEFILE} environ
|
||||
PLIST_SUB+= ${PLIST_SUBP}
|
||||
|
@ -1,52 +0,0 @@
|
||||
PACKAGE = tls
|
||||
VERSION ?= ${PORTVERSION}
|
||||
.ifndef(SHLIB_NAME)
|
||||
LIB = ${PACKAGE}
|
||||
SHLIB_MAJOR = ${VERSION:R}
|
||||
SHLIB_MINOR = ${VERSION:E}
|
||||
.endif
|
||||
|
||||
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 +=-DPACKAGE_VERSION=\"${VERSION}\" -DPACKAGE_NAME=\"${PACKAGE}\"
|
||||
|
||||
all: ${SHLIB_NAME} pkgIndex.tcl
|
||||
|
||||
pkgIndex.tcl:
|
||||
(echo 'package ifneeded $(PACKAGE) $(VERSION) \
|
||||
"[list source [file join $$dir tls.tcl]] ; \
|
||||
[list tls::initlib ${LIBDIR} ${SHLIB_NAME}]"'\
|
||||
) > pkgIndex.tcl
|
||||
|
||||
SCRIPTDIR = lib/tls
|
||||
SCRIPTPATH = ${PREFIX}/${SCRIPTDIR}
|
||||
LIBDIR = ${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>
|
@ -84,19 +84,45 @@
|
||||
+ dprintf(stderr,"\nWaitForConnect(%p)", (void *)statePtr);
|
||||
|
||||
for (;;) {
|
||||
--- tls.c Thu Feb 12 21:09:21 2004
|
||||
+++ tls.c Mon Jun 20 10:23:44 2005
|
||||
@@ -459,5 +459,5 @@
|
||||
|
||||
--- tls.c.orig 2008-03-19 23:06:13.000000000 +0100
|
||||
+++ tls.c 2013-10-22 14:32:14.000000000 +0200
|
||||
@@ -468,7 +468,7 @@
|
||||
"ssl2", "ssl3", "tls1", NULL
|
||||
};
|
||||
enum protocol {
|
||||
- TLS_SSL2, TLS_SSL3, TLS_TLS1, TLS_NONE
|
||||
+ TLS_SSL2, TLS_SSL3, TLS_TLS1
|
||||
};
|
||||
Tcl_Obj *objPtr;
|
||||
@@ -1168,5 +1168,5 @@
|
||||
SSL_CTX *ctx = NULL;
|
||||
@@ -1225,7 +1225,7 @@
|
||||
Tcl_Obj *CONST objv[];
|
||||
{
|
||||
const char *commands [] = { "req", NULL };
|
||||
CONST84 char *commands [] = { "req", NULL };
|
||||
- enum command { C_REQ, C_DUMMY };
|
||||
+ enum command { C_REQ };
|
||||
int cmd;
|
||||
|
||||
if (objc < 2) {
|
||||
@@ -1329,13 +1329,13 @@
|
||||
|
||||
name=X509_get_subject_name(cert);
|
||||
|
||||
- X509_NAME_add_entry_by_txt(name,"C", MBSTRING_ASC, k_C, -1, -1, 0);
|
||||
- X509_NAME_add_entry_by_txt(name,"ST", MBSTRING_ASC, k_ST, -1, -1, 0);
|
||||
- X509_NAME_add_entry_by_txt(name,"L", MBSTRING_ASC, k_L, -1, -1, 0);
|
||||
- X509_NAME_add_entry_by_txt(name,"O", MBSTRING_ASC, k_O, -1, -1, 0);
|
||||
- X509_NAME_add_entry_by_txt(name,"OU", MBSTRING_ASC, k_OU, -1, -1, 0);
|
||||
- X509_NAME_add_entry_by_txt(name,"CN", MBSTRING_ASC, k_CN, -1, -1, 0);
|
||||
- X509_NAME_add_entry_by_txt(name,"Email", MBSTRING_ASC, k_Email, -1, -1, 0);
|
||||
+ X509_NAME_add_entry_by_txt(name,"C", MBSTRING_ASC, (const unsigned char *)k_C, -1, -1, 0);
|
||||
+ X509_NAME_add_entry_by_txt(name,"ST", MBSTRING_ASC, (const unsigned char *)k_ST, -1, -1, 0);
|
||||
+ X509_NAME_add_entry_by_txt(name,"L", MBSTRING_ASC, (const unsigned char *)k_L, -1, -1, 0);
|
||||
+ X509_NAME_add_entry_by_txt(name,"O", MBSTRING_ASC, (const unsigned char *)k_O, -1, -1, 0);
|
||||
+ X509_NAME_add_entry_by_txt(name,"OU", MBSTRING_ASC, (const unsigned char *)k_OU, -1, -1, 0);
|
||||
+ X509_NAME_add_entry_by_txt(name,"CN", MBSTRING_ASC, (const unsigned char *)k_CN, -1, -1, 0);
|
||||
+ X509_NAME_add_entry_by_txt(name,"Email", MBSTRING_ASC, (const unsigned char *)k_Email, -1, -1, 0);
|
||||
|
||||
X509_set_subject_name(cert,name);
|
||||
|
||||
|
@ -2,7 +2,4 @@ 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!
|
||||
|
||||
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
|
||||
|
@ -1,7 +0,0 @@
|
||||
%%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
|
Loading…
Reference in New Issue
Block a user