1 |
vapier 15/03/06 09:12:42 |
2 |
|
3 |
Added: leveldb-1.18-configure.patch |
4 |
Log: |
5 |
Fix USE=-snappy handling #541186 by Johan Bergström. Move memenv.h header to leveldb/helpers/ to match Debian. |
6 |
|
7 |
(Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key D2E96200) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-libs/leveldb/files/leveldb-1.18-configure.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/leveldb/files/leveldb-1.18-configure.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/leveldb/files/leveldb-1.18-configure.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: leveldb-1.18-configure.patch |
16 |
=================================================================== |
17 |
we'll handle configure ourselves in src_configure |
18 |
|
19 |
--- a/Makefile |
20 |
+++ b/Makefile |
21 |
@@ -14,9 +14,6 @@ OPT ?= -O2 -DNDEBUG |
22 |
# OPT ?= -O2 -g2 -DNDEBUG |
23 |
#----------------------------------------------- |
24 |
|
25 |
-# detect what platform we're building on |
26 |
-$(shell CC="$(CC)" CXX="$(CXX)" TARGET_OS="$(TARGET_OS)" \ |
27 |
- ./build_detect_platform build_config.mk ./) |
28 |
# this file is generated by the previous line to set build flags and sources |
29 |
include build_config.mk |
30 |
|
31 |
|
32 |
control snappy/tcmalloc explicitly |
33 |
|
34 |
--- a/build_detect_platform |
35 |
+++ a/build_detect_platform |
36 |
@@ -190,6 +190,7 @@ |
37 |
COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX" |
38 |
fi |
39 |
|
40 |
+if [ "${USE_SNAPPY:-auto}" = "auto" ]; then |
41 |
# Test whether Snappy library is installed |
42 |
# http://code.google.com/p/snappy/ |
43 |
$CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT 2>/dev/null <<EOF |
44 |
@@ -197,15 +198,24 @@ |
45 |
int main() {} |
46 |
EOF |
47 |
if [ "$?" = 0 ]; then |
48 |
+ USE_SNAPPY="yes" |
49 |
+ fi |
50 |
+fi |
51 |
+ if [ "$USE_SNAPPY" = "yes" ]; then |
52 |
COMMON_FLAGS="$COMMON_FLAGS -DSNAPPY" |
53 |
PLATFORM_LIBS="$PLATFORM_LIBS -lsnappy" |
54 |
fi |
55 |
|
56 |
+if [ "${USE_TCMALLOC:-auto}" = "auto" ]; then |
57 |
# Test whether tcmalloc is available |
58 |
$CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -ltcmalloc 2>/dev/null <<EOF |
59 |
int main() {} |
60 |
EOF |
61 |
if [ "$?" = 0 ]; then |
62 |
+ USE_TCMALLOC="yes" |
63 |
+ fi |
64 |
+fi |
65 |
+ if [ "$USE_TCMALLOC" = "yes" ]; then |
66 |
PLATFORM_LIBS="$PLATFORM_LIBS -ltcmalloc" |
67 |
fi |