aboutsummaryrefslogtreecommitdiff
path: root/security/poly1305aes
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2014-01-19 14:32:08 +0000
committerMartin Wilke <miwi@FreeBSD.org>2014-01-19 14:32:08 +0000
commit1041a5e5c1edea24d2d95c76e3a47659cb489584 (patch)
tree57f71a6a9fdba88606e64871675bc94af73ba919 /security/poly1305aes
parent00427d578d5ac73e3d7f1f9833acbd3efeface42 (diff)
downloadports-1041a5e5c1edea24d2d95c76e3a47659cb489584.tar.gz
ports-1041a5e5c1edea24d2d95c76e3a47659cb489584.zip
- Fix build with clang
PR: 185334 Submitted by: ports fury
Notes
Notes: svn path=/head/; revision=340310
Diffstat (limited to 'security/poly1305aes')
-rw-r--r--security/poly1305aes/Makefile39
1 files changed, 26 insertions, 13 deletions
diff --git a/security/poly1305aes/Makefile b/security/poly1305aes/Makefile
index 20a4e49e6a17..0d32bc4e6845 100644
--- a/security/poly1305aes/Makefile
+++ b/security/poly1305aes/Makefile
@@ -7,23 +7,36 @@ CATEGORIES= security
MASTER_SITES= http://cr.yp.to/mac/
MAINTAINER= ports@FreeBSD.org
-COMMENT= The poly1305 message authentication reference implementation using AES
+COMMENT= Poly1305 message authentication reference implementation using AES
-CC+= ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} ${STRIP}
ALL_TARGET= default
-REPLACE_HDRS= aes.h cpucycles.h poly1305aes.h
-PROGRAM_FILES= poly1305aes-speed test-aes test-poly1305aes
+CC+= ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}
+
+NOT_FOR_ARCHS= amd64
+
+.include <bsd.port.pre.mk>
+
+pre-build:
+.if ${ARCH} == "i386"
+ @${ECHO_CMD} "ppro" > ${WRKSRC}/poly1305aes.impl
+.endif
+
+post-build:
+.for i in aes.h cpucycles.h poly1305aes.h
+ @${REINPLACE_CMD} -e \
+ 's|#include "|#include "poly1305/|' ${WRKSRC}/${i}
+.endfor
-NO_STAGE= yes
do-install:
- ${MKDIR} ${PREFIX}/include/poly1305
- ${INSTALL_DATA} ${WRKSRC}/*_*.h ${PREFIX}/include/poly1305/
-.for i in ${REPLACE_HDRS}
- ${REINPLACE_CMD} -e "s,#include \",#include \"poly1305/," ${WRKSRC}/$i > ${WRKSRC}/$i.fixed
- ${INSTALL_DATA} ${WRKSRC}/$i.fixed ${PREFIX}/include/poly1305/$i
- ${INSTALL_DATA} ${WRKSRC}/*.a ${PREFIX}/lib/
- ${INSTALL_DATA} ${PROGRAM_FILES:S,^,${WRKSRC}/,} ${PREFIX}/bin/
+.for i in poly1305aes-speed test-aes test-poly1305aes
+ (cd ${WRKSRC} && ${INSTALL_PROGRAM} ${i} \
+ ${STAGEDIR}${PREFIX}/bin)
.endfor
+ @${MKDIR} ${STAGEDIR}${PREFIX}/include/poly1305
+ (cd ${WRKSRC} && ${INSTALL_DATA} *.h \
+ ${STAGEDIR}${PREFIX}/include/poly1305)
+ (cd ${WRKSRC} && ${INSTALL_DATA} *.a \
+ ${STAGEDIR}${PREFIX}/lib)
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>