blob: 999e1977cf14ccedc602ca96da2395da8a0cfdee (
plain)
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
50
51
52
|
# Created by: Danilo Egea Gondolfo <danilo@FreeBSD.org>
# $FreeBSD$
PORTNAME= s2n
PORTVERSION= 20160628
CATEGORIES= security
MAINTAINER= danilo@FreeBSD.org
COMMENT= C99 implementation of the TLS/SSL protocols
LICENSE= APACHE20
USE_GITHUB= yes
GH_ACCOUNT= awslabs
GH_TAGNAME= 2bae833
OPTIONS_DEFINE= DOCS EXAMPLES
USES= gmake ssl
USE_LDCONFIG= yes
NO_CONFIGURE= yes
SUB_FILES= pkg-message Makefile
ALL_TARGET= bin
.include <bsd.port.options.mk>
.if ${OSVERSION} < 1000015
WITH_OPENSSL_PORT= yes
CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib
.endif
post-patch:
@${REINPLACE_CMD} -e 's|CFLAGS |&+|' ${WRKSRC}/s2n.mk
@${REINPLACE_CMD} -e 's|CRYPTO_LDFLAGS |&+|' \
${WRKSRC}/tests/testlib/Makefile \
${WRKSRC}/tests/unit/Makefile
do-install:
${INSTALL_LIB} ${WRKSRC}/lib/libs2n.so* ${STAGEDIR}${LOCALBASE}/lib
${LN} -s libs2n.so ${STAGEDIR}${LOCALBASE}/lib/libs2n.so.0
${INSTALL_DATA} ${WRKSRC}/api/s2n* ${STAGEDIR}${LOCALBASE}/include
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${CP} -r ${WRKSRC}/docs/* ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/bin/*.c ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKDIR}/Makefile ${STAGEDIR}${EXAMPLESDIR}
tests: build
${GMAKE} PLATFORM=FreeBSD CRYPTO_LDFLAGS=-L${LOCALBASE}/lib -C ${WRKSRC}/tests
.include <bsd.port.mk>
|