aboutsummaryrefslogtreecommitdiffstats
path: root/security/pecl-scrypt/Makefile
blob: a2e8e4546e22454657f8bcf405ebfa67dbeb652b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Created by: Horia Racoviceanu <horia@racoviceanu.com>
# $FreeBSD$

PORTNAME=   scrypt
PORTVERSION=    1.2
PORTREVISION=   1
CATEGORIES= security pear
MASTER_SITES=   http://pecl.php.net/get/
PKGNAMEPREFIX=  pecl-

MAINTAINER= horia@racoviceanu.com
COMMENT=    PHP wrapper to Colin Percival's scrypt implementation

LICENSE=    BSD2CLAUSE

USES=       compiler tar:tgz
USE_PHP=    hash
USE_PHPEXT= yes
USE_PHP_BUILD=  yes

DOCSDIR=    ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
PORTDOCS=   README.md

OPTIONS_DEFINE= DOCS
OPTIONS_DEFAULT=STACKPROTECTOR

OPTIONS_RADIO=  BUFFER_OVERFLOW_PROTECTION
OPTIONS_RADIO_BUFFER_OVERFLOW_PROTECTION=   STACKPROTECTOR STACKPROTECTORALL

STACKPROTECTOR_DESC=    Protect functions with vulnerable objects
STACKPROTECTORALL_DESC= Protect all functions

STACKPROTECTOR_CFLAGS=  -fstack-protector
STACKPROTECTORALL_CFLAGS=   -fstack-protector-all

.include <bsd.port.pre.mk>

.if ${ARCH} != amd64 && ${COMPILER_TYPE} == gcc
post-patch:
    ${REINPLACE_CMD} '/emmintrin.h/d' ${WRKSRC}/config.m4
.endif

post-install:
    ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/php/${PHP_EXT_DIR}/${PORTNAME}.so

    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.post.mk>