blob: 2330824ca78bb39920fd61eb77dc70b534a40c9a (
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
|
# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
# $FreeBSD$
PORTNAME= rocksdb
PORTVERSION= 3.11.2
DISTVERSIONPREFIX= rocksdb-
CATEGORIES= databases
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Persistent key-value store for fast storage environments
LICENSE= BSD3CLAUSE
LIB_DEPENDS= libgflags.so:${PORTSDIR}/devel/gflags \
libsnappy.so:${PORTSDIR}/archivers/snappy
ALL_TARGET= shared_lib all
CFLAGS+= -I${WRKSRC}/include -I${LOCALBASE}/include
CPPFLAGS+= -DOS_FREEBSD
LDFLAGS+= -L${LOCALBASE}/lib
USE_CXXSTD= c++11
USE_LDCONFIG= yes
USES= compiler:c++11-lib gmake
GH_ACCOUNT= facebook
USE_GITHUB= yes
BROKEN_DragonFly= does not build on DragonFly BSD using GCC with -Werror
PROGRAMS= db_bench db_repl_stress db_sanity_test db_stress ldb sst_dump table_reader_bench
.include <bsd.port.pre.mk>
.if ${OSVERSION} <= 1000000
CFLAGS+= -D_GLIBCXX_USE_C99
.endif
.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 36
CXXFLAGS+= -Wno-inconsistent-missing-override
.endif
post-patch:
@${REINPLACE_CMD} -e '/^all: / s| $$(TESTS)||' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's| -fno-builtin-memcmp||; s| -ltcmalloc||' ${WRKSRC}/build_tools/build_detect_platform
.if defined(WITHOUT_PROFILE)
@${REINPLACE_CMD} -e '/pg = / s| -pg||' ${WRKSRC}/Makefile
.endif
# Disable SSE4.2 on i386 architecture to fix i386 builds on FreeBSD package building cluster
.if ${ARCH} == i386
@${REINPLACE_CMD} -e 's|#ifdef __SSE4_2__|&DISABLED__|' ${WRKSRC}/util/crc32c.cc
.endif
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/include/rocksdb/ ${STAGEDIR}${DATADIR}/
cd ${WRKSRC}/ && ${INSTALL_PROGRAM} ${PROGRAMS} ${STAGEDIR}${PREFIX}/bin/
cd ${WRKSRC}/include/rocksdb/ && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/include/rocksdb/
${INSTALL_DATA} ${WRKSRC}/librocksdb.a ${STAGEDIR}${PREFIX}/lib/
${INSTALL_LIB} ${WRKSRC}/librocksdb.so ${STAGEDIR}${PREFIX}/lib/librocksdb.so.0
${LN} -fs librocksdb.so.0 ${STAGEDIR}${PREFIX}/lib/librocksdb.so
${INSTALL_DATA} ${WRKSRC}/make_config.mk ${STAGEDIR}${DATADIR}/
regression-test test: build
cd ${WRKSRC}/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} check
.include <bsd.port.post.mk>
|