diff options
author | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2011-10-28 10:54:30 +0000 |
---|---|---|
committer | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2011-10-28 10:54:30 +0000 |
commit | 65aafbcdb6b7718c16699e5284df12e364ef7b19 (patch) | |
tree | 3ad08580001579532eaedc42b5e31c0192b56d48 /databases/leveldb/Makefile | |
parent | 5bc148fb49f344096c1b58fc5cdea109d4171688 (diff) | |
download | ports-65aafbcdb6b7718c16699e5284df12e364ef7b19.tar.gz ports-65aafbcdb6b7718c16699e5284df12e364ef7b19.zip |
Notes
Diffstat (limited to 'databases/leveldb/Makefile')
-rw-r--r-- | databases/leveldb/Makefile | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/databases/leveldb/Makefile b/databases/leveldb/Makefile new file mode 100644 index 000000000000..6e0e19e852f1 --- /dev/null +++ b/databases/leveldb/Makefile @@ -0,0 +1,49 @@ +# New ports collection makefile for: leveldb +# Date created: 2011-10-04 +# Whom: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= leveldb +PORTVERSION= 1.2.20111024 +CATEGORIES= databases +MASTER_SITES= LOCAL/sunpoet + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= A fast and lightweight key/value database library by Google + +OPTIONS= PERFTOOLS "Build with Google perftools" on \ + SNAPPY "Build with snappy" on + +USE_GMAKE= yes +USE_LDCONFIG= yes +USE_XZ= yes + +.include <bsd.port.options.mk> + +.if !defined(WITHOUT_PERFTOOLS) +LIB_DEPENDS+= tcmalloc:${PORTSDIR}/devel/google-perftools +.endif + +.if !defined(WITHOUT_SNAPPY) +LIB_DEPENDS+= snappy:${PORTSDIR}/archivers/snappy +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|' ${WRKSRC}/build_detect_platform +.if defined(WITHOUT_PERFTOOLS) + @${REINPLACE_CMD} -e '/^LDFLAGS=/ s| $$(GOOGLE_PERFTOOLS_LDFLAGS)||' ${WRKSRC}/Makefile +.endif +.if defined(WITHOUT_SNAPPY) + @${REINPLACE_CMD} -e '/^LDFLAGS=/ s| $$(SNAPPY_LDFLAGS)||' ${WRKSRC}/Makefile +.endif + +do-install: + ${MKDIR} ${PREFIX}/include/leveldb/ ${DATADIR}/ + ${INSTALL_DATA} ${WRKSRC}/include/leveldb/* ${PREFIX}/include/leveldb/ + ${INSTALL_LIB} ${WRKSRC}/libleveldb.* ${PREFIX}/lib/ + ${INSTALL_DATA} ${WRKSRC}/build_config.mk ${DATADIR}/ + ${LN} -s libleveldb.so.0 ${PREFIX}/lib/libleveldb.so + +.include <bsd.port.mk> |