aboutsummaryrefslogtreecommitdiffstats
path: root/devel/eblob/Makefile
blob: 45185059faac86978de1ee48fbe182745d86048c (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Created by: Veniamin Gvozdikov <vg@FreeBSD.org>
# $FreeBSD$

PORTNAME=   eblob
PORTVERSION=    0.18.2
PORTREVISION=   1
CATEGORIES= devel

MAINTAINER= vg@FreeBSD.org
COMMENT=    Append-only low-level I/O library

LICENSE=    GPLv2

LIB_DEPENDS=    libboost_iostreams.so:${PORTSDIR}/devel/boost-libs

USE_GITHUB= yes
GH_ACCOUNT= zloidemon
GH_COMMIT=  0a75b89
GH_TAGNAME= ${GH_COMMIT}

USES=       cmake
USE_LDCONFIG=   yes

OPTIONS_DEFINE= ASSERT PYTHON SNAPPY EXAMPLES TESTS
OPTIONS_DEFAULT=PYTHON SNAPPY EXAMPLES TESTS
TESTS_DESC= Build tests

NO_STAGE=   yes
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MASSERT}
CMAKE_ARGS+=    -DWITH_ASSERTS=ON
.else
CMAKE_ARGS+=    -DWITH_ASSERTS=OFF
.endif

.if ${PORT_OPTIONS:MPYTHON}
LIB_DEPENDS+=   libboost_python.so:${PORTSDIR}/devel/boost-python-libs
USE_PYTHON= yes
CMAKE_ARGS+=    -DWITH_PYTHON=ON
INSTALLS_EGGINFO=   yes
PYDISTUTILS_PKGVERSION= 0.0.1
PLIST_SUB+= PYTHON=""
.else
CMAKE_ARGS+=    -DWITH_PYTHON=OFF
PLIST_SUB+= PYTHON="@comment "
.endif

.if ${PORT_OPTIONS:MSNAPPY}
LIB_DEPENDS+=   libsnappy.so:${PORTSDIR}/archivers/snappy
CMAKE_ARGS+=    -DWITH_SNAPPY=ON
.else
CMAKE_ARGS+=    -DWITH_SNAPPY=OFF
.endif

.if ${PORT_OPTIONS:MEXAMPLES}
CMAKE_ARGS+=    -DWITH_EXAMPLES=ON
PLIST_SUB+= EXAMPLES=""
.else
CMAKE_ARGS+=    -DWITH_EXAMPLES=OFF
PLIST_SUB+= EXAMPLES="@comment "
.endif

.if ${PORT_OPTIONS:MTESTS}
CMAKE_ARGS+=    -DWITH_TESTS=ON
.else
CMAKE_ARGS+=    -DWITH_TESTS=OFF
.endif

post-patch:
.if ! ${PORT_OPTIONS:MPYTHON}
    @${REINPLACE_CMD} -e 's, python),),' ${WRKSRC}/CMakeLists.txt
.endif
    @${REINPLACE_CMD} -e 's, -fstack-protector-all,,' \
        ${WRKSRC}/CMakeLists.txt

.include <bsd.port.mk>