diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-03-06 09:12:43 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-03-06 09:12:43 +0000 |
commit | 088e1de4872bfdae49bb3cb08a0cb77ca8f9c857 (patch) | |
tree | f002a3ae34176c75c42499f60934a8047b78fa2d /dev-libs/leveldb/files | |
parent | Version BUmp (diff) | |
download | historical-088e1de4872bfdae49bb3cb08a0cb77ca8f9c857.tar.gz historical-088e1de4872bfdae49bb3cb08a0cb77ca8f9c857.tar.bz2 historical-088e1de4872bfdae49bb3cb08a0cb77ca8f9c857.zip |
Fix USE=-snappy handling #541186 by Johan Bergström. Move memenv.h header to leveldb/helpers/ to match Debian.
Package-Manager: portage-2.2.17/cvs/Linux x86_64
Manifest-Sign-Key: 0xD2E96200
Diffstat (limited to 'dev-libs/leveldb/files')
-rw-r--r-- | dev-libs/leveldb/files/leveldb-1.18-configure.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/dev-libs/leveldb/files/leveldb-1.18-configure.patch b/dev-libs/leveldb/files/leveldb-1.18-configure.patch new file mode 100644 index 000000000000..ba30fc731ad5 --- /dev/null +++ b/dev-libs/leveldb/files/leveldb-1.18-configure.patch @@ -0,0 +1,52 @@ +we'll handle configure ourselves in src_configure + +--- a/Makefile ++++ b/Makefile +@@ -14,9 +14,6 @@ OPT ?= -O2 -DNDEBUG + # OPT ?= -O2 -g2 -DNDEBUG + #----------------------------------------------- + +-# detect what platform we're building on +-$(shell CC="$(CC)" CXX="$(CXX)" TARGET_OS="$(TARGET_OS)" \ +- ./build_detect_platform build_config.mk ./) + # this file is generated by the previous line to set build flags and sources + include build_config.mk + + +control snappy/tcmalloc explicitly + +--- a/build_detect_platform ++++ a/build_detect_platform +@@ -190,6 +190,7 @@ + COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX" + fi + ++if [ "${USE_SNAPPY:-auto}" = "auto" ]; then + # Test whether Snappy library is installed + # http://code.google.com/p/snappy/ + $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT 2>/dev/null <<EOF +@@ -197,15 +198,24 @@ + int main() {} + EOF + if [ "$?" = 0 ]; then ++ USE_SNAPPY="yes" ++ fi ++fi ++ if [ "$USE_SNAPPY" = "yes" ]; then + COMMON_FLAGS="$COMMON_FLAGS -DSNAPPY" + PLATFORM_LIBS="$PLATFORM_LIBS -lsnappy" + fi + ++if [ "${USE_TCMALLOC:-auto}" = "auto" ]; then + # Test whether tcmalloc is available + $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -ltcmalloc 2>/dev/null <<EOF + int main() {} + EOF + if [ "$?" = 0 ]; then ++ USE_TCMALLOC="yes" ++ fi ++fi ++ if [ "$USE_TCMALLOC" = "yes" ]; then + PLATFORM_LIBS="$PLATFORM_LIBS -ltcmalloc" + fi + |