2012-10-04 12:48:50 +02:00
|
|
|
# Created by: Yonatan <Yonatan@Xpert.com>
|
2004-04-11 01:16:07 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= libtomcrypt
|
2007-06-22 04:32:51 +02:00
|
|
|
PORTVERSION= 1.17
|
2010-08-10 00:58:42 +02:00
|
|
|
PORTREVISION= 2
|
2004-04-11 01:16:07 +02:00
|
|
|
CATEGORIES= security
|
2012-07-31 04:22:22 +02:00
|
|
|
MASTER_SITES= http://libtom.org/files/
|
2005-05-22 18:43:56 +02:00
|
|
|
DISTNAME= crypt-${PORTVERSION}
|
2004-04-11 01:16:07 +02:00
|
|
|
|
2009-09-09 21:19:13 +02:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2012-08-03 17:54:35 +02:00
|
|
|
COMMENT= Comprehensive, modular, and portable cryptographic toolkit
|
2004-04-11 01:16:07 +02:00
|
|
|
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
|
|
|
MAKEFILE= makefile
|
2005-08-29 16:58:21 +02:00
|
|
|
MAKE_ARGS= DESTDIR="${PREFIX}" LIBPATH="/lib" INCPATH="/include" \
|
|
|
|
DATAPATH="${DOCSDIR}/pdf"
|
2004-04-11 01:16:07 +02:00
|
|
|
USE_BZIP2= yes
|
2005-01-13 21:54:12 +01:00
|
|
|
USE_GMAKE= yes
|
2004-04-11 01:16:07 +02:00
|
|
|
ALL_TARGET= library
|
|
|
|
|
2005-08-29 16:58:21 +02:00
|
|
|
CFLAGS+= -I${PREFIX}/include
|
|
|
|
|
2012-10-04 12:48:50 +02:00
|
|
|
OPTIONS_DEFINE= DOCS
|
2012-10-07 09:12:54 +02:00
|
|
|
OPTIONS_DEFAULT= LIBTOMMATH
|
2012-10-04 12:48:50 +02:00
|
|
|
OPTIONS_MULTI= MATH
|
|
|
|
OPTIONS_MULTI_MATH= LIBTOMMATH TOMSFASTMATH GMP
|
|
|
|
LIBTOMMATH_DESC= Use LibTomMath
|
|
|
|
TOMSFASTMATH_DESC= Use TomsFastMath
|
2005-05-22 18:43:56 +02:00
|
|
|
|
2013-09-21 00:55:24 +02:00
|
|
|
NO_STAGE= yes
|
2012-10-04 12:48:50 +02:00
|
|
|
.include <bsd.port.options.mk>
|
2005-05-22 18:43:56 +02:00
|
|
|
|
2012-10-04 12:48:50 +02:00
|
|
|
.if ${PORT_OPTIONS:MLIBTOMMATH}
|
2005-08-29 16:58:21 +02:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/include/tommath.h:${PORTSDIR}/math/libtommath
|
|
|
|
CFLAGS+= -DLTM_DESC
|
|
|
|
.endif
|
|
|
|
|
2012-10-04 12:48:50 +02:00
|
|
|
.if ${PORT_OPTIONS:MTOMSFASTMATH}
|
2005-08-29 16:58:21 +02:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/include/tfm.h:${PORTSDIR}/math/tomsfastmath
|
|
|
|
CFLAGS+= -DTFM_DESC
|
|
|
|
.endif
|
|
|
|
|
2012-10-04 12:48:50 +02:00
|
|
|
.if ${PORT_OPTIONS:MGMP}
|
2010-04-19 12:43:42 +02:00
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/include/gmp.h:${PORTSDIR}/math/gmp
|
2006-05-31 20:06:35 +02:00
|
|
|
CFLAGS+= -DGMP_DESC
|
|
|
|
.endif
|
|
|
|
|
2012-10-04 12:48:50 +02:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2013-05-11 19:58:55 +02:00
|
|
|
USE_TEX= latex:build
|
2012-11-06 04:51:42 +01:00
|
|
|
PORTDOCS= *
|
2004-04-11 01:16:07 +02:00
|
|
|
.else
|
2005-12-03 20:30:14 +01:00
|
|
|
MAKE_ARGS+= NODOCS=yes
|
2004-04-11 01:16:07 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(MAINTAINER_MODE)
|
|
|
|
test: build
|
2005-12-03 20:30:14 +01:00
|
|
|
@${ECHO_MSG} "Testing with -DUSE_TFM..."
|
|
|
|
(cd ${WRKSRC} && CFLAGS="${CFLAGS} -DUSE_TFM" EXTRALIBS="-L${PREFIX}/lib -ltfm" ${GMAKE} test && ${WRKSRC}/test)
|
2004-04-11 01:16:07 +02:00
|
|
|
|
2005-12-03 20:30:14 +01:00
|
|
|
@${ECHO_MSG} "Cleaning up test binary..."
|
|
|
|
@${RM} ${WRKSRC}/test
|
|
|
|
@${RM} ${WRKSRC}/demos/test.o
|
|
|
|
|
|
|
|
@${ECHO_MSG} "Testing with -DUSE_LTM..."
|
|
|
|
(cd ${WRKSRC} && CFLAGS="${CFLAGS} -DUSE_LTM" EXTRALIBS="-L${PREFIX}/lib -ltommath" ${GMAKE} test && ${WRKSRC}/test)
|
2006-05-31 20:06:35 +02:00
|
|
|
|
|
|
|
@${ECHO_MSG} "Cleaning up test binary..."
|
|
|
|
@${RM} ${WRKSRC}/test
|
|
|
|
@${RM} ${WRKSRC}/demos/test.o
|
|
|
|
|
|
|
|
@${ECHO_MSG} "Testing with -DUSE_GMP..."
|
|
|
|
(cd ${WRKSRC} && CFLAGS="${CFLAGS} -DUSE_GMP" EXTRALIBS="-L${PREFIX}/lib -lgmp" ${GMAKE} test && ${WRKSRC}/test)
|
2005-12-03 20:30:14 +01:00
|
|
|
.endif
|
2006-05-31 20:06:35 +02:00
|
|
|
|
2012-10-04 12:48:50 +02:00
|
|
|
.include <bsd.port.mk>
|