Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Dec 2013 05:48:32 +0900
From:      KATO Tsuguru <tkato432@yahoo.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/185339: security/poly1305aes: Fix build with clang
Message-ID:  <20131231054832.bc2903254e88778883b043ae@yahoo.com>
Resent-Message-ID: <201312302110.rBULA9bi098863@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         185339
>Category:       ports
>Synopsis:       security/poly1305aes: Fix build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 30 21:10:09 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Fix build with clang
- Add NOT_FOR_ARCHS=amd64

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/security/poly1305aes/Makefile security/poly1305aes/Makefile
--- /usr/ports/security/poly1305aes/Makefile	2013-11-06 22:03:10.000000000 +0900
+++ security/poly1305aes/Makefile	2013-12-31 00:00:00.000000000 +0900
@@ -7,23 +7,36 @@
 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>
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131231054832.bc2903254e88778883b043ae>