freebsd-ports/security/libargon2/Makefile
Thomas Zander 7f0bbc52e3 Fix runtime error: remove -march=native as optimisation target
Details:
The upstream Makefile contains -march=native as optimisation which leads
to unconditional use of AVX instructions if built on a machine that has
AVX support. Subsequently this causes SIGILL on processors without AVX,
including latest-generation Atom descendants.

PR:		225922
Reported by:	arthur@qeng-ho.org
Approved by:	hsw@bitmark.com (maintainer, implicit)
MFH:		2018Q3
2018-09-18 15:08:52 +00:00

43 lines
1.3 KiB
Makefile

# Created by: Christopher Hall <hsw@bitmark.com>
# $FreeBSD$
PORTNAME= libargon2
PORTVERSION= 20171227
PORTREVISION= 1
CATEGORIES= security devel
MAINTAINER= hsw@bitmark.com
COMMENT= Memory hard password hashing program and library
LICENSE= CC0-1.0
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= gmake
USE_LDCONFIG= yes
USE_GITHUB= yes
GH_ACCOUNT= P-H-C
GH_PROJECT= phc-winner-argon2
MAKE_JOBS_UNSAFE= yes
LIBARGON2= libargon2.so.0
MAKE_ARGS+= SO_LDFLAGS="-shared -Wl,-soname=${LIBARGON2}" \
OPTTARGET="generic"
# remove multiarch as this is only for Linux
SUBST= s/@HOST_MULTIARCH@//g;
SUBST+= s/@UPSTREAM_VER@/${PORTVERSION}/g;
SUBST+= s@/usr@${PREFIX}@g;
SUBST+= s/-lrt//g;s/-ldl//g;
SUBST+= s@Cflags:@Cflags: -I$${includedir}/@;
do-install:
${INSTALL_DATA} ${WRKSRC}/include/argon2.h ${STAGEDIR}${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/libargon2.a ${STAGEDIR}${PREFIX}/lib
${INSTALL_LIB} ${WRKSRC}/libargon2.so ${STAGEDIR}${PREFIX}/lib/libargon2.so.0
${RLN} ${STAGEDIR}${PREFIX}/lib/${LIBARGON2} ${STAGEDIR}${PREFIX}/lib/libargon2.so
${INSTALL_PROGRAM} ${WRKSRC}/argon2 ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/man/argon2.1 ${STAGEDIR}${PREFIX}/man/man1
${SED} '${SUBST}' < ${WRKSRC}/libargon2.pc > ${STAGEDIR}${PREFIX}/libdata/pkgconfig/libargon2.pc
.include <bsd.port.mk>