aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2015-07-11 23:27:23 +0800
committersunpoet <sunpoet@FreeBSD.org>2015-07-11 23:27:23 +0800
commit96703267b16d31aa981009ea95a4bcbae4bcc01c (patch)
tree2734d7d395742957501ab0d1c6b6fe5d180f0bfc /databases
parent3dcf224d58001142226c665c5add302d44e11389 (diff)
downloadfreebsd-ports-gnome-96703267b16d31aa981009ea95a4bcbae4bcc01c.tar.gz
freebsd-ports-gnome-96703267b16d31aa981009ea95a4bcbae4bcc01c.tar.zst
freebsd-ports-gnome-96703267b16d31aa981009ea95a4bcbae4bcc01c.zip
- Convert to new options target helper
- Update comment - Regenerate patch file with makepatch:
Diffstat (limited to 'databases')
-rw-r--r--databases/leveldb/Makefile18
-rw-r--r--databases/leveldb/files/patch-Makefile6
2 files changed, 11 insertions, 13 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}/
diff --git a/databases/leveldb/files/patch-Makefile b/databases/leveldb/files/patch-Makefile
index bcb5665672d9..3fd2d2dc37c7 100644
--- a/databases/leveldb/files/patch-Makefile
+++ b/databases/leveldb/files/patch-Makefile
@@ -1,6 +1,6 @@
---- Makefile.orig 2013-01-08 05:07:29.000000000 +0800
-+++ Makefile 2013-04-13 03:12:17.312769320 +0800
-@@ -83,9 +83,21 @@
+--- Makefile.orig 2014-09-16 21:19:52 UTC
++++ Makefile
+@@ -95,9 +95,21 @@ endif
$(SHARED3):
$(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$(SHARED2) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(SOURCES) -o $(SHARED3) $(LIBS)