freebsd-ports/security/libtomcrypt/Makefile
Tijl Coosemans 88c67cd38c - Update devel/libtool and devel/libltdl to version 2.4.2.418
- Patch libtool so it uses the same library version specification as on
  Darwin, Linux and other systems.  Given the version current:revision:age
  a library will be given the extension .so.major.age.revision with major
  equal to current-age.  Before libtool would use .so.current on FreeBSD.
- Patch libtoolize to remove two cases of umask 0 that caused libltdl
  files to be copied world writable (--ltdl option)
- Let USES=libtool patch this new version correctly
- Adjust all ports with USES=libtool:build and bump PORTREVISION on their
  dependent ports if a library version changed

PR:		194068
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2014-10-05 18:01:19 +00:00

85 lines
2.4 KiB
Makefile

# Created by: Yonatan <Yonatan@Xpert.com>
# $FreeBSD$
PORTNAME= libtomcrypt
PORTVERSION= 1.17
PORTREVISION= 4
CATEGORIES= security
MASTER_SITES= http://libtom.org/files/
DISTNAME= crypt-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Comprehensive, modular, and portable cryptographic toolkit
CFLAGS+= -I${LOCALBASE}/include
EXTRALIBS= -L${LOCALBASE}/lib
MAKEFILE= makefile.shared
ALL_TARGET= library
MAKE_ARGS= IGNORE_SPEED=yes INCPATH="${PREFIX}/include" \
LIBPATH="${PREFIX}/lib" EXTRALIBS="${EXTRALIBS}"
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USES= gmake libtool:build tar:bzip2
OPTIONS_DEFINE= DOCS
OPTIONS_DEFAULT= LIBTOMMATH
OPTIONS_MULTI= MATH
OPTIONS_MULTI_MATH= LIBTOMMATH TOMSFASTMATH GMP
LIBTOMMATH_DESC= Use LibTomMath
TOMSFASTMATH_DESC= Use TomsFastMath
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MLIBTOMMATH}
BUILD_DEPENDS+= ${LOCALBASE}/include/tommath.h:${PORTSDIR}/math/libtommath
CFLAGS+= -DLTM_DESC
EXTRALIBS+= -ltommath
.endif
.if ${PORT_OPTIONS:MTOMSFASTMATH}
BUILD_DEPENDS+= ${LOCALBASE}/include/tfm.h:${PORTSDIR}/math/tomsfastmath
CFLAGS+= -DTFM_DESC
EXTRALIBS+= -ltfm
.endif
.if ${PORT_OPTIONS:MGMP}
LIB_DEPENDS+= libgmp.so:${PORTSDIR}/math/gmp
CFLAGS+= -DGMP_DESC
EXTRALIBS+= -lgmp
.endif
.if ! ${PORT_OPTIONS:MDOCS}
MAKE_ARGS+= NODOCS=yes
.endif
post-patch:
${REINPLACE_CMD} -e 's|gcc|${CC}|' -e 's| make | $$(MAKE) |' \
-e 's|-g $$(GROUP)||' -e 's|-o $$(USER)||' \
${WRKSRC}/makefile.shared ${WRKSRC}/testprof/makefile.shared
post-install:
${MKDIR} ${STAGEDIR}${DOCSDIR}/pdf
${INSTALL_DATA} ${WRKSRC}/doc/crypt.pdf ${STAGEDIR}${DOCSDIR}/pdf
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtomcrypt_prof.so.0
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtomcrypt.so.0
.if defined(MAINTAINER_MODE)
test: build
@${ECHO_MSG} "Testing with -DUSE_TFM..."
(cd ${WRKSRC} && CFLAGS="${CFLAGS} -DUSE_TFM" EXTRALIBS="-L${PREFIX}/lib -ltfm" ${MAKE_CMD} 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" ${MAKE_CMD} 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" ${MAKE_CMD} test && ${WRKSRC}/test)
.endif
.include <bsd.port.mk>