aboutsummaryrefslogtreecommitdiffstats
path: root/security/libressl/Makefile
blob: 3df12a388e142e03c8664554378fd6133973e5bf (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
50
51
52
53
54
55
56
57
58
59
60
61
# Created by: Vsevolod Stakhov <vsevolod@FreeBSD.org>

PORTNAME=   libressl
PORTVERSION=    3.3.3
CATEGORIES= security devel
MASTER_SITES=   OPENBSD/LibreSSL

MAINTAINER= brnrd@FreeBSD.org
COMMENT=    Free version of the SSL/TLS protocol forked from OpenSSL

LICENSE=    BSD4CLAUSE
LICENSE_FILE=   ${WRKSRC}/COPYING

FLAVORS=    default libtls
FLAVOR?=    ${FLAVORS:[1]}
libtls_DESCR=   pkg-descr-libtls
libtls_PKGNAMESUFFIX=   -libtls
libtls_PLIST=   pkg-plist-libtls

CPE_VENDOR= openbsd

OPTIONS_DEFINE= LIBTLS MAN3 NC
OPTIONS_DEFAULT=    MAN3 NC
LIBTLS_DESC=    Only install libtls (no libcrypto/libssl)
MAN3_DESC=  Install API manpages (section 3)
NC_DESC=    Install TLS-enabled netcat

CONFLICTS_INSTALL=      libressl-devel-libtls-[0-9]*
libtls_CONFLICTS_INSTALL=   libretls-[0-9]*
default_CONFLICTS_INSTALL=  openssl-[0-9]* \
                openssl-devel-[0-9]*

.if ${FLAVOR:U} == default
OPTIONS_EXCLUDE=    LIBTLS
.elif ${FLAVOR:U} == libtls
OPTIONS_SLAVE=      LIBTLS
OPTIONS_EXCLUDE=    MAN3
.endif

LIBTLS_CONFIGURE_ENABLE=    libtls-only
NC_CONFIGURE_ENABLE=        nc

GNU_CONFIGURE=  yes
USES=       cpe libtool pathfix pkgconfig
USE_LDCONFIG=   yes
OPTIONS_SUB=    yes
CFLAGS+=    -fpic -DPIC -Wl,-rpath,${PREFIX}/lib -Wl,--as-needed
LDFLAGS+=   -pthread

INSTALL_TARGET= install-strip
TEST_TARGET=    check

post-patch-MAN3-off:
    ${REINPLACE_CMD} -e '/^install-man:/s/install-man3//' \
        -e '/$$(MAKE) $$(AM_MAKEFLAGS) install-data-hook/d' \
        ${WRKSRC}/man/Makefile.in

post-install:
    ${RM} -r ${STAGEDIR}/${PREFIX}/etc/ssl/cert.pem

.include <bsd.port.mk>