2012-12-05 01:47:56 +01:00
|
|
|
# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
|
2011-10-28 12:54:30 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= leveldb
|
2017-03-02 18:59:09 +01:00
|
|
|
PORTVERSION= 1.20
|
2015-05-08 22:22:14 +02:00
|
|
|
DISTVERSIONPREFIX= v
|
Bump PORTREVISION for ports depending on the canonical version of GCC
defined via Mk/bsd.default-versions.mk which has moved from GCC 7.4 t
GCC 8.2 under most circumstances.
This includes ports
- with USE_GCC=yes or USE_GCC=any,
- with USES=fortran,
- using Mk/bsd.octave.mk which in turn features USES=fortran, and
- with USES=compiler specifying openmp, nestedfct, c11, c++0x, c++11-lang,
c++11-lib, c++14-lang, c++17-lang, or gcc-c++11-lib
plus, as a double check, everything INDEX-11 showed depending on lang/gcc7.
PR: 231590
2018-12-12 02:35:33 +01:00
|
|
|
PORTREVISION= 4
|
2011-10-28 12:54:30 +02:00
|
|
|
CATEGORIES= databases
|
|
|
|
|
|
|
|
MAINTAINER= sunpoet@FreeBSD.org
|
2013-08-21 19:17:25 +02:00
|
|
|
COMMENT= Fast and lightweight key/value database library by Google
|
2011-10-28 12:54:30 +02:00
|
|
|
|
2013-12-13 01:56:22 +01:00
|
|
|
LICENSE= BSD3CLAUSE
|
2013-11-18 17:51:16 +01:00
|
|
|
|
2012-06-19 15:00:47 +02:00
|
|
|
OPTIONS_DEFINE= GPERFTOOLS SNAPPY
|
|
|
|
OPTIONS_DEFAULT=SNAPPY
|
2011-10-28 12:54:30 +02:00
|
|
|
|
2017-03-10 23:44:43 +01:00
|
|
|
CONFIGURE_ARGS= build_config.mk ${WRKSRC}/
|
|
|
|
CONFIGURE_SCRIPT= build_detect_platform
|
|
|
|
HAS_CONFIGURE= yes
|
2016-11-25 17:40:33 +01:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
2015-10-04 20:00:19 +02:00
|
|
|
TEST_TARGET= check
|
2011-10-28 12:54:30 +02:00
|
|
|
USE_LDCONFIG= yes
|
2017-01-01 22:40:01 +01:00
|
|
|
USES= compiler:c++0x gmake localbase
|
2012-06-16 22:21:57 +02:00
|
|
|
|
|
|
|
PLIST_SUB= SHLIB_MAJOR=${SHLIB_MAJOR} \
|
|
|
|
SHLIB_MINOR=${SHLIB_MINOR}
|
|
|
|
|
2014-09-13 17:18:27 +02:00
|
|
|
SHLIB_MAJOR= ${PORTVERSION:R}
|
|
|
|
SHLIB_MINOR= ${PORTVERSION:E}
|
2011-10-28 12:54:30 +02:00
|
|
|
|
2014-09-15 19:40:41 +02:00
|
|
|
GH_ACCOUNT= google
|
2015-05-08 22:22:14 +02:00
|
|
|
USE_GITHUB= yes
|
2014-09-15 19:40:41 +02:00
|
|
|
|
2016-04-01 16:00:51 +02:00
|
|
|
GPERFTOOLS_LIB_DEPENDS= libtcmalloc.so:devel/google-perftools
|
|
|
|
SNAPPY_LIB_DEPENDS= libsnappy.so:archivers/snappy
|
2011-10-28 12:54:30 +02:00
|
|
|
|
|
|
|
post-patch:
|
2014-05-12 18:27:31 +02:00
|
|
|
@${REINPLACE_CMD} -e '/PLATFORM_IS_LITTLE_ENDIAN/ s|__|_|g' ${WRKSRC}/port/port_posix.h
|
2015-07-06 19:46:17 +02:00
|
|
|
|
|
|
|
post-patch-GPERFTOOLS-off:
|
2012-06-16 22:21:57 +02:00
|
|
|
@${REINPLACE_CMD} -e 's| -ltcmalloc||' ${WRKSRC}/build_detect_platform
|
2015-07-06 19:46:17 +02:00
|
|
|
|
|
|
|
post-patch-SNAPPY-off:
|
2012-06-16 22:21:57 +02:00
|
|
|
@${REINPLACE_CMD} -e 's| -DSNAPPY||; s| -lsnappy||' ${WRKSRC}/build_detect_platform
|
2011-10-28 12:54:30 +02:00
|
|
|
|
2015-07-11 17:27:23 +02:00
|
|
|
# backward compatibility (for databases/p5-Tie-LevelDB)
|
|
|
|
pre-install-SNAPPY-off:
|
|
|
|
${ECHO_CMD} "SNAPPY=0" >> ${WRKSRC}/build_config.mk
|
|
|
|
|
|
|
|
pre-install-SNAPPY-on:
|
|
|
|
${ECHO_CMD} "SNAPPY=1" >> ${WRKSRC}/build_config.mk
|
|
|
|
|
2011-10-28 12:54:30 +02:00
|
|
|
do-install:
|
2013-10-01 18:33:52 +02:00
|
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/include/leveldb/ ${STAGEDIR}${PREFIX}/include/memenv/ ${STAGEDIR}${DATADIR}/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/include/leveldb/* ${STAGEDIR}${PREFIX}/include/leveldb/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/helpers/memenv/memenv.h ${STAGEDIR}${PREFIX}/include/memenv/
|
2016-11-19 18:02:40 +01:00
|
|
|
${INSTALL_LIB} ${WRKSRC}/out-shared/libleveldb.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${STAGEDIR}${PREFIX}/lib/
|
|
|
|
${INSTALL_LIB} ${WRKSRC}/out-shared/libmemenv.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${STAGEDIR}${PREFIX}/lib/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/out-static/libleveldb.a ${STAGEDIR}${PREFIX}/lib/
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/out-static/libmemenv.a ${STAGEDIR}${PREFIX}/lib/
|
2013-12-11 19:49:13 +01:00
|
|
|
${LN} -fs libleveldb.so.${SHLIB_MAJOR} ${STAGEDIR}${PREFIX}/lib/libleveldb.so
|
|
|
|
${LN} -fs libleveldb.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${STAGEDIR}${PREFIX}/lib/libleveldb.so.${SHLIB_MAJOR}
|
|
|
|
${LN} -fs libmemenv.so.${SHLIB_MAJOR} ${STAGEDIR}${PREFIX}/lib/libmemenv.so
|
|
|
|
${LN} -fs libmemenv.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${STAGEDIR}${PREFIX}/lib/libmemenv.so.${SHLIB_MAJOR}
|
2015-07-11 17:27:23 +02:00
|
|
|
# backward compatibility (for databases/p5-Tie-LevelDB)
|
2012-06-16 22:21:57 +02:00
|
|
|
${GREP} '^PLATFORM_CXXFLAGS=' ${WRKSRC}/build_config.mk | ${SED} 's|PLATFORM_CXXFLAGS|PORT_CFLAGS|' >> ${WRKSRC}/build_config.mk
|
|
|
|
${GREP} '^PLATFORM_CXXFLAGS=' ${WRKSRC}/build_config.mk | ${SED} 's|PLATFORM_CXXFLAGS|PLATFORM_CFLAGS|' >> ${WRKSRC}/build_config.mk
|
2013-10-01 18:33:52 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/build_config.mk ${STAGEDIR}${DATADIR}/
|
2011-10-28 12:54:30 +02:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|