aboutsummaryrefslogtreecommitdiff
path: root/databases/leveldb/Makefile
diff options
context:
space:
mode:
authorSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2015-07-11 15:27:23 +0000
committerSunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>2015-07-11 15:27:23 +0000
commit133bb3f069954853b45e8eecaccd7db8de49b8e5 (patch)
tree2734d7d395742957501ab0d1c6b6fe5d180f0bfc /databases/leveldb/Makefile
parent05c58583e187c65574fd0823e1db55b8595c7faf (diff)
downloadports-133bb3f069954853b45e8eecaccd7db8de49b8e5.tar.gz
ports-133bb3f069954853b45e8eecaccd7db8de49b8e5.zip
Notes
Diffstat (limited to 'databases/leveldb/Makefile')
-rw-r--r--databases/leveldb/Makefile18
1 files changed, 8 insertions, 10 deletions
diff --git a/databases/leveldb/Makefile b/databases/leveldb/Makefile
index 354251e48a8d..f144a49dfd06 100644
--- a/databases/leveldb/Makefile
+++ b/databases/leveldb/Makefile
@@ -34,14 +34,6 @@ USE_GITHUB= yes
GPERFTOOLS_LIB_DEPENDS= libtcmalloc.so:${PORTSDIR}/devel/google-perftools
SNAPPY_LIB_DEPENDS= libsnappy.so:${PORTSDIR}/archivers/snappy
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MSNAPPY}
-SNAPPY= 1
-.else
-SNAPPY= 0
-.endif
-
post-patch:
@${REINPLACE_CMD} -e '/PLATFORM_IS_LITTLE_ENDIAN/ s|__|_|g' ${WRKSRC}/port/port_posix.h
@@ -51,6 +43,13 @@ post-patch-GPERFTOOLS-off:
post-patch-SNAPPY-off:
@${REINPLACE_CMD} -e 's| -DSNAPPY||; s| -lsnappy||' ${WRKSRC}/build_detect_platform
+# 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
+
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/include/leveldb/ ${STAGEDIR}${PREFIX}/include/memenv/ ${STAGEDIR}${DATADIR}/
${INSTALL_DATA} ${WRKSRC}/include/leveldb/* ${STAGEDIR}${PREFIX}/include/leveldb/
@@ -63,8 +62,7 @@ do-install:
${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}
-# backward compatibility
- ${ECHO_CMD} "SNAPPY=${SNAPPY}" >> ${WRKSRC}/build_config.mk
+# backward compatibility (for databases/p5-Tie-LevelDB)
${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
${INSTALL_DATA} ${WRKSRC}/build_config.mk ${STAGEDIR}${DATADIR}/