2013-07-28 16:51:54 +00:00
|
|
|
# Created by: Horia Racoviceanu <horia@racoviceanu.com>
|
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= libscrypt
|
2014-03-13 16:07:38 +00:00
|
|
|
PORTVERSION= 1.18
|
2014-03-18 13:24:54 +00:00
|
|
|
PORTREVISION= 1
|
2013-07-28 16:51:54 +00:00
|
|
|
CATEGORIES= security
|
|
|
|
|
|
|
|
MAINTAINER= horia@racoviceanu.com
|
|
|
|
COMMENT= C library for the scrypt key derivation function
|
|
|
|
|
2013-12-16 16:49:59 +00:00
|
|
|
LICENSE= BSD2CLAUSE
|
2013-07-28 16:51:54 +00:00
|
|
|
|
2013-12-16 16:49:59 +00:00
|
|
|
USES= compiler
|
2013-07-28 16:51:54 +00:00
|
|
|
USE_LDCONFIG= yes
|
|
|
|
USE_GITHUB= yes
|
|
|
|
GH_ACCOUNT= technion
|
2013-11-09 21:30:28 +00:00
|
|
|
GH_TAGNAME= ${GH_COMMIT}
|
2014-03-13 16:07:38 +00:00
|
|
|
GH_COMMIT= 35b6894
|
2013-07-28 16:51:54 +00:00
|
|
|
|
2014-03-18 13:24:54 +00:00
|
|
|
MAKE_ARGS+= CC=${CC} LIBDIR=${PREFIX}/lib
|
|
|
|
|
2013-11-09 21:30:28 +00:00
|
|
|
PLIST_FILES= include/libscrypt.h \
|
2013-07-28 16:51:54 +00:00
|
|
|
lib/libscrypt.so \
|
|
|
|
lib/libscrypt.so.0
|
|
|
|
|
2013-12-16 16:49:59 +00:00
|
|
|
PORTDOCS= README.md
|
2014-03-18 13:24:54 +00:00
|
|
|
|
2013-12-16 16:49:59 +00:00
|
|
|
OPTIONS_DEFINE= DOCS
|
2014-03-18 13:24:54 +00:00
|
|
|
OPTIONS_DEFAULT=STACKPROTECTOR
|
|
|
|
|
|
|
|
OPTIONS_SINGLE= BUFFER_OVERFLOW_PROTECTION
|
|
|
|
OPTIONS_SINGLE_BUFFER_OVERFLOW_PROTECTION= STACKPROTECTOR STACKPROTECTORALL
|
|
|
|
|
|
|
|
STACKPROTECTOR_DESC= Protect functions with vulnerable objects
|
|
|
|
STACKPROTECTORALL_DESC= Protect all functions
|
2013-11-09 21:30:28 +00:00
|
|
|
|
2014-03-13 16:07:38 +00:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2013-07-28 16:51:54 +00:00
|
|
|
post-patch:
|
2014-03-18 13:24:54 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|?=-|+=-|; s|-O2 ||' ${WRKSRC}/Makefile
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MSTACKPROTECTORALL}
|
|
|
|
@${REINPLACE_CMD} -e 's|stack-protector|&-all|' ${WRKSRC}/Makefile
|
|
|
|
.endif
|
2014-03-13 16:07:38 +00:00
|
|
|
|
2014-03-18 13:24:54 +00:00
|
|
|
.if ${ARCH} == i386 && ${COMPILER_TYPE} == gcc && ${OSVERSION} < 1000036
|
|
|
|
@${REINPLACE_CMD} -e 's|-lscrypt|& -lssp_nonshared|; \
|
|
|
|
s|\.version|&,-lssp_nonshared|' ${WRKSRC}/Makefile
|
2014-03-13 16:07:38 +00:00
|
|
|
.endif
|
2013-07-28 16:51:54 +00:00
|
|
|
|
2014-03-18 13:24:54 +00:00
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
's|strcpy(mcf2, mcf);|strlcpy(mcf2, mcf, SCRYPT_MCF_LEN);|' \
|
|
|
|
${WRKSRC}/main.c
|
|
|
|
|
2013-07-28 16:51:54 +00:00
|
|
|
regression-test: build
|
|
|
|
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} check)
|
|
|
|
|
2013-12-16 16:49:59 +00:00
|
|
|
post-install:
|
2014-03-18 13:24:54 +00:00
|
|
|
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}.so.0
|
|
|
|
|
2013-12-16 16:49:59 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
|
|
|
|
|
2013-11-09 21:30:28 +00:00
|
|
|
.include <bsd.port.post.mk>
|