- Update MASTER_SITES and WWW
- Switch to options helpers - Switch to new test framework - Silence patching
This commit is contained in:
parent
df0410f0b7
commit
6c74abfe8e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=401617
2 changed files with 22 additions and 31 deletions
|
@ -5,7 +5,7 @@ PORTNAME= libtomcrypt
|
||||||
PORTVERSION= 1.17
|
PORTVERSION= 1.17
|
||||||
PORTREVISION= 4
|
PORTREVISION= 4
|
||||||
CATEGORIES= security
|
CATEGORIES= security
|
||||||
MASTER_SITES= http://libtom.org/files/
|
MASTER_SITES= http://libtom.net/files/
|
||||||
DISTNAME= crypt-${PORTVERSION}
|
DISTNAME= crypt-${PORTVERSION}
|
||||||
|
|
||||||
MAINTAINER= ports@FreeBSD.org
|
MAINTAINER= ports@FreeBSD.org
|
||||||
|
@ -26,49 +26,41 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
||||||
USES= gmake libtool:build tar:bzip2
|
USES= gmake libtool:build tar:bzip2
|
||||||
|
|
||||||
OPTIONS_DEFINE= DOCS
|
OPTIONS_DEFINE= DOCS
|
||||||
OPTIONS_DEFAULT= LIBTOMMATH
|
|
||||||
OPTIONS_MULTI= MATH
|
OPTIONS_MULTI= MATH
|
||||||
OPTIONS_MULTI_MATH= LIBTOMMATH TOMSFASTMATH GMP
|
OPTIONS_MULTI_MATH= LIBTOMMATH TOMSFASTMATH GMP
|
||||||
|
OPTIONS_DEFAULT= LIBTOMMATH
|
||||||
|
|
||||||
LIBTOMMATH_DESC= Use LibTomMath
|
LIBTOMMATH_DESC= Use LibTomMath
|
||||||
TOMSFASTMATH_DESC= Use TomsFastMath
|
TOMSFASTMATH_DESC= Use TomsFastMath
|
||||||
|
|
||||||
.include <bsd.port.options.mk>
|
LIBTOMMATH_BUILD_DEPENDS= ${LOCALBASE}/include/tommath.h:${PORTSDIR}/math/libtommath
|
||||||
|
LIBTOMMATH_CFLAGS= -DLTM_DESC
|
||||||
|
LIBTOMMATH_VARS= EXTRALIBS+=-ltommath
|
||||||
|
|
||||||
.if ${PORT_OPTIONS:MLIBTOMMATH}
|
LIBTOMSFASTMATH_BUILD_DEPENDS= ${LOCALBASE}/include/tfm.h:${PORTSDIR}/math/tomsfastmath
|
||||||
BUILD_DEPENDS+= ${LOCALBASE}/include/tommath.h:${PORTSDIR}/math/libtommath
|
LIBTOMSFASTMATH_CFLAGS= -DTFM_DESC
|
||||||
CFLAGS+= -DLTM_DESC
|
LIBTOMSFASTMATH_VARS= EXTRALIBS+=-ltfm
|
||||||
EXTRALIBS+= -ltommath
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if ${PORT_OPTIONS:MTOMSFASTMATH}
|
GMP_LIB_DEPENDS= libgmp.so:${PORTSDIR}/math/gmp
|
||||||
BUILD_DEPENDS+= ${LOCALBASE}/include/tfm.h:${PORTSDIR}/math/tomsfastmath
|
GMP_CFLAGS= -DGMP_DESC
|
||||||
CFLAGS+= -DTFM_DESC
|
GMP_VARS= EXTRALIBS+=-lgmp
|
||||||
EXTRALIBS+= -ltfm
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if ${PORT_OPTIONS:MGMP}
|
DOCS_MAKE_ARGS_OFF= NODOCS=yes
|
||||||
LIB_DEPENDS+= libgmp.so:${PORTSDIR}/math/gmp
|
|
||||||
CFLAGS+= -DGMP_DESC
|
|
||||||
EXTRALIBS+= -lgmp
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if ! ${PORT_OPTIONS:MDOCS}
|
|
||||||
MAKE_ARGS+= NODOCS=yes
|
|
||||||
.endif
|
|
||||||
|
|
||||||
post-patch:
|
post-patch:
|
||||||
${REINPLACE_CMD} -e 's|gcc|${CC}|' -e 's| make | $$(MAKE) |' \
|
@${REINPLACE_CMD} -e 's|gcc|${CC}|' -e 's| make | $$(MAKE) |' \
|
||||||
-e 's|-g $$(GROUP)||' -e 's|-o $$(USER)||' \
|
-e 's|-g $$(GROUP)||' -e 's|-o $$(USER)||' \
|
||||||
${WRKSRC}/makefile.shared ${WRKSRC}/testprof/makefile.shared
|
${WRKSRC}/makefile.shared ${WRKSRC}/testprof/makefile.shared
|
||||||
|
|
||||||
post-install:
|
post-install:
|
||||||
${MKDIR} ${STAGEDIR}${DOCSDIR}/pdf
|
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtomcrypt_prof.so.0
|
||||||
${INSTALL_DATA} ${WRKSRC}/doc/crypt.pdf ${STAGEDIR}${DOCSDIR}/pdf
|
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtomcrypt.so.0
|
||||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtomcrypt_prof.so.0
|
|
||||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtomcrypt.so.0
|
|
||||||
|
|
||||||
.if defined(MAINTAINER_MODE)
|
post-install-DOCS-on:
|
||||||
test: build
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}/pdf
|
||||||
|
${INSTALL_DATA} ${WRKSRC}/doc/crypt.pdf ${STAGEDIR}${DOCSDIR}/pdf
|
||||||
|
|
||||||
|
do-test:
|
||||||
@${ECHO_MSG} "Testing with -DUSE_TFM..."
|
@${ECHO_MSG} "Testing with -DUSE_TFM..."
|
||||||
(cd ${WRKSRC} && CFLAGS="${CFLAGS} -DUSE_TFM" EXTRALIBS="-L${PREFIX}/lib -ltfm" ${MAKE_CMD} test && ${WRKSRC}/test)
|
(cd ${WRKSRC} && CFLAGS="${CFLAGS} -DUSE_TFM" EXTRALIBS="-L${PREFIX}/lib -ltfm" ${MAKE_CMD} test && ${WRKSRC}/test)
|
||||||
|
|
||||||
|
@ -85,6 +77,5 @@ test: build
|
||||||
|
|
||||||
@${ECHO_MSG} "Testing with -DUSE_GMP..."
|
@${ECHO_MSG} "Testing with -DUSE_GMP..."
|
||||||
(cd ${WRKSRC} && CFLAGS="${CFLAGS} -DUSE_GMP" EXTRALIBS="-L${PREFIX}/lib -lgmp" ${MAKE_CMD} test && ${WRKSRC}/test)
|
(cd ${WRKSRC} && CFLAGS="${CFLAGS} -DUSE_GMP" EXTRALIBS="-L${PREFIX}/lib -lgmp" ${MAKE_CMD} test && ${WRKSRC}/test)
|
||||||
.endif
|
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
|
|
@ -2,4 +2,4 @@ LibTomCrypt is a portable ANSI C cryptographic library that supports symmetric
|
||||||
ciphers, one-way hashes, pseudo-random number generators, public key
|
ciphers, one-way hashes, pseudo-random number generators, public key
|
||||||
cryptography (via RSA,DH or ECC/DH) and a plethora of support routines.
|
cryptography (via RSA,DH or ECC/DH) and a plethora of support routines.
|
||||||
|
|
||||||
WWW: http://www.libtomcrypt.com
|
WWW: http://libtom.net/
|
||||||
|
|
Loading…
Reference in a new issue