aboutsummaryrefslogtreecommitdiff
path: root/security/nacl
diff options
context:
space:
mode:
authorDavid Thiel <lx@FreeBSD.org>2013-02-26 23:59:25 +0000
committerDavid Thiel <lx@FreeBSD.org>2013-02-26 23:59:25 +0000
commitef2e0817bee20ec287351481d32fc441937d8835 (patch)
tree1e9cc53eb5ffe417d2179a5fdb7882c371f7c1a7 /security/nacl
parent420997ee172fa45a253a440b50bf7b5c69c70e5c (diff)
downloadports-ef2e0817bee20ec287351481d32fc441937d8835.tar.gz
ports-ef2e0817bee20ec287351481d32fc441937d8835.zip
Notes
Diffstat (limited to 'security/nacl')
-rw-r--r--security/nacl/Makefile43
1 files changed, 30 insertions, 13 deletions
diff --git a/security/nacl/Makefile b/security/nacl/Makefile
index b58e2e0e46a8..ee05243a79a8 100644
--- a/security/nacl/Makefile
+++ b/security/nacl/Makefile
@@ -1,12 +1,10 @@
-# New ports collection makefile for: nacl
-# Date created: 2011-10-03
-# Whom: David Thiel <lx@FreeBSD.org>
-#
+# Created by: David Thiel <lx@FreeBSD.org>
# $FreeBSD$
#
PORTNAME= nacl
PORTVERSION= 20110221
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://hyperelliptic.org/nacl/
@@ -14,8 +12,9 @@ MAINTAINER= lx@FreeBSD.org
COMMENT= High speed cryptography library
ALL_TARGET= do
-USE_BZIP2= YES
-MAKE_JOBS_UNSAFE= YES
+USE_BZIP2= yes
+USE_BINUTILS= yes
+MAKE_JOBS_UNSAFE= yes
.include <bsd.port.pre.mk>
@@ -23,30 +22,48 @@ MAKE_JOBS_UNSAFE= YES
BROKEN= Does not compile on ia64, powerpc, or sparc64
.endif
-HOSTNAME_CMD?= /bin/hostname
+HOSTNAME_CMD?= /bin/hostname -s
+
+post-patch:
+ @${REINPLACE_CMD} -i -e "s/$$/ -fPIC/" ${WRKSRC}/okcompilers/c
+
+pre-build:
+ ${RM} -rf ${WRKSRC}/crypto_onetimeauth/poly1305/amd64
do-build:
cd ${WRKSRC} && ./do
+post-build:
+.if ${ARCH} == "i386"
+ ${AR} -r ${WRKSRC}/build/`${HOSTNAME_CMD}`/lib/x86/libnacl.a \
+ ${WRKSRC}/build/`${HOSTNAME_CMD}`/lib/x86/randombytes.o
+.elif ${ARCH} == "powerpc"
+ ${AR} -r ${WRKSRC}/build/`${HOSTNAME_CMD}`/lib/ppc/libnacl.a \
+ ${WRKSRC}/build/`${HOSTNAME_CMD}`/lib/ppc/randombytes.o
+.else
+ ${AR} -r ${WRKSRC}/build/`${HOSTNAME_CMD}`/lib/${ARCH}/libnacl.a \
+ ${WRKSRC}/build/`${HOSTNAME_CMD}`/lib/${ARCH}/randombytes.o
+.endif
+
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/build/`${HOSTNAME_CMD} -s`/bin/nacl-sha256 \
${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/build/`${HOSTNAME_CMD} -s`/bin/nacl-sha512 \
${PREFIX}/bin
.if ${ARCH} == "i386"
- @${INSTALL_DATA} ${WRKSRC}/build/`${HOSTNAME_CMD} -s`/lib/x86/* \
+ @${INSTALL_DATA} ${WRKSRC}/build/`${HOSTNAME_CMD}`/lib/x86/* \
${PREFIX}/lib
- @${INSTALL_DATA} ${WRKSRC}/build/`${HOSTNAME_CMD} -s`/include/x86/* \
+ @${INSTALL_DATA} ${WRKSRC}/build/`${HOSTNAME_CMD}`/include/x86/* \
${PREFIX}/include
.elif ${ARCH} == "powerpc"
- @${INSTALL_DATA} ${WRKSRC}/build/`${HOSTNAME_CMD} -s`/lib/ppc/* \
+ @${INSTALL_DATA} ${WRKSRC}/build/`${HOSTNAME_CMD}`/lib/ppc/* \
${PREFIX}/lib
- @${INSTALL_DATA} ${WRKSRC}/build/`${HOSTNAME_CMD} -s`/include/ppc/* \
+ @${INSTALL_DATA} ${WRKSRC}/build/`${HOSTNAME_CMD}`/include/ppc/* \
${PREFIX}/include
.else
- @${INSTALL_DATA} ${WRKSRC}/build/`${HOSTNAME_CMD} -s`/lib/${ARCH}/* \
+ @${INSTALL_DATA} ${WRKSRC}/build/`${HOSTNAME_CMD}`/lib/${ARCH}/* \
${PREFIX}/lib
- @${INSTALL_DATA} ${WRKSRC}/build/`${HOSTNAME_CMD} -s`/include/${ARCH}/* \
+ @${INSTALL_DATA} ${WRKSRC}/build/`${HOSTNAME_CMD}`/include/${ARCH}/* \
${PREFIX}/include
.endif