2001-02-21 23:37:38 +01:00
|
|
|
PACKAGE = tls
|
2008-05-16 23:43:10 +02:00
|
|
|
VERSION ?= ${PORTVERSION}
|
2004-04-04 20:41:25 +02:00
|
|
|
.ifndef(SHLIB_NAME)
|
|
|
|
LIB = ${PACKAGE}
|
|
|
|
SHLIB_MAJOR = ${VERSION:R}
|
|
|
|
SHLIB_MINOR = ${VERSION:E}
|
|
|
|
.endif
|
2001-02-21 23:37:38 +01:00
|
|
|
|
|
|
|
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
|
2008-05-16 23:43:10 +02:00
|
|
|
CFLAGS +=-DPACKAGE_VERSION=\"${VERSION}\" -DPACKAGE_NAME=\"${PACKAGE}\"
|
2001-02-21 23:37:38 +01:00
|
|
|
|
|
|
|
all: ${SHLIB_NAME} pkgIndex.tcl
|
|
|
|
|
2008-05-16 23:43:10 +02:00
|
|
|
pkgIndex.tcl:
|
|
|
|
(echo 'package ifneeded $(PACKAGE) $(VERSION) \
|
|
|
|
"[list source [file join $$dir tls.tcl]] ; \
|
|
|
|
[list tls::initlib ${LIBDIR} ${SHLIB_NAME}]"'\
|
|
|
|
) > pkgIndex.tcl
|
2001-02-21 23:37:38 +01:00
|
|
|
|
|
|
|
SCRIPTDIR = lib/tls
|
|
|
|
SCRIPTPATH = ${PREFIX}/${SCRIPTDIR}
|
2003-10-27 21:49:36 +01:00
|
|
|
LIBDIR = ${PREFIX}/lib
|
2001-02-21 23:37:38 +01:00
|
|
|
|
|
|
|
${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>
|