mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
c48fc1ace2
- Update to 1.12 * math/libtommath - Update to 0.39 * math/tomsfastmath - Update to 0.09 PR: ports/98214 Submitted by: maintainer
81 lines
2.2 KiB
Makefile
81 lines
2.2 KiB
Makefile
# Ports collection makefile for: libtomcrypt
|
|
# Date created: 22 Jan 2004
|
|
# Whom: Yonatan <Yonatan@Xpert.com>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= libtomcrypt
|
|
PORTVERSION= 1.12
|
|
CATEGORIES= security
|
|
MASTER_SITES= http://libtomcrypt.com/files/
|
|
DISTNAME= crypt-${PORTVERSION}
|
|
|
|
MAINTAINER= wxs@csh.rit.edu
|
|
COMMENT= Comprehensive, modular and portable cryptographic toolkit
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
|
MAKEFILE= makefile
|
|
MAKE_ARGS= DESTDIR="${PREFIX}" LIBPATH="/lib" INCPATH="/include" \
|
|
DATAPATH="${DOCSDIR}/pdf"
|
|
USE_BZIP2= yes
|
|
USE_GMAKE= yes
|
|
ALL_TARGET= library
|
|
|
|
CFLAGS+= -I${PREFIX}/include
|
|
|
|
OPTIONS= DOCS "build documentation (depends on teTeX)" off \
|
|
LIBTOMMATH "Use LibTomMath" on \
|
|
TOMSFASTMATH "Use TomsFastMath" off \
|
|
GMP "Use GMP" off
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if defined(WITHOUT_LIBTOMMATH) && !defined(WITH_TOMSFASTMATH) && !defined(WITH_GMP)
|
|
IGNORE= you must choose at least LibTomMath, TomsFastMath, or GMP (or all three)
|
|
.endif
|
|
|
|
.if !defined(WITHOUT_LIBTOMMATH)
|
|
BUILD_DEPENDS+= ${LOCALBASE}/include/tommath.h:${PORTSDIR}/math/libtommath
|
|
CFLAGS+= -DLTM_DESC
|
|
.endif
|
|
|
|
.if defined(WITH_TOMSFASTMATH)
|
|
BUILD_DEPENDS+= ${LOCALBASE}/include/tfm.h:${PORTSDIR}/math/tomsfastmath
|
|
CFLAGS+= -DTFM_DESC
|
|
.endif
|
|
|
|
.if defined(WITH_GMP)
|
|
BUILD_DEPENDS+= ${LOCALBASE}/include/gmp.h:${PORTSDIR}/math/libgmp4
|
|
CFLAGS+= -DGMP_DESC
|
|
.endif
|
|
|
|
.if defined(WITH_DOCS)
|
|
BUILD_DEPENDS+= latex:${PORTSDIR}/print/teTeX
|
|
.else
|
|
NOPORTDOCS= yes
|
|
MAKE_ARGS+= NODOCS=yes
|
|
.endif
|
|
|
|
.if defined(MAINTAINER_MODE)
|
|
test: build
|
|
@${ECHO_MSG} "Testing with -DUSE_TFM..."
|
|
(cd ${WRKSRC} && CFLAGS="${CFLAGS} -DUSE_TFM" EXTRALIBS="-L${PREFIX}/lib -ltfm" ${GMAKE} test && ${WRKSRC}/test)
|
|
|
|
@${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)
|
|
|
|
@${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)
|
|
.endif
|
|
|
|
.include <bsd.port.post.mk>
|