summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/leveldb
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
commit1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch)
treea21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-extended/leveldb
downloadmeta-openembedded-1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-extended/leveldb')
-rw-r--r--meta-oe/recipes-extended/leveldb/leveldb/0001-Explicitly-disable-tcmalloc.patch48
-rw-r--r--meta-oe/recipes-extended/leveldb/leveldb_git.bb27
2 files changed, 75 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/leveldb/leveldb/0001-Explicitly-disable-tcmalloc.patch b/meta-oe/recipes-extended/leveldb/leveldb/0001-Explicitly-disable-tcmalloc.patch
new file mode 100644
index 000000000..4b76dd0c3
--- /dev/null
+++ b/meta-oe/recipes-extended/leveldb/leveldb/0001-Explicitly-disable-tcmalloc.patch
@@ -0,0 +1,48 @@
1From d6daac04dab4b3acf4b88f16742d1b402cdc3d83 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Wed, 1 Oct 2014 18:54:04 +0200
4Subject: [PATCH] Explicitly disable tcmalloc
5
6Without this change leveldb autodetects tcmalloc from sysroot and
7sometimes became dependant on gperftools
8
9Disable autodetection without TCMALLOC_ENABLED=true pased to make
10
11Upstream-Status: Pending
12Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
13---
14 build_detect_platform | 16 +++++++++-------
15 1 file changed, 9 insertions(+), 7 deletions(-)
16
17diff --git a/build_detect_platform b/build_detect_platform
18index bb76c4f..a586364 100755
19--- a/build_detect_platform
20+++ b/build_detect_platform
21@@ -201,15 +201,17 @@ EOF
22 PLATFORM_LIBS="$PLATFORM_LIBS -lsnappy"
23 fi
24
25- # Test whether tcmalloc is available
26- $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -ltcmalloc 2>/dev/null <<EOF
27- int main() {}
28+ if [ "$TCMALLOC_ENABLED" = "true" ]; then
29+ # Test whether tcmalloc is available
30+ $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -ltcmalloc 2>/dev/null <<EOF
31+ int main() {}
32 EOF
33- if [ "$?" = 0 ]; then
34- PLATFORM_LIBS="$PLATFORM_LIBS -ltcmalloc"
35- fi
36+ if [ "$?" = 0 ]; then
37+ PLATFORM_LIBS="$PLATFORM_LIBS -ltcmalloc"
38+ fi
39
40- rm -f $CXXOUTPUT 2>/dev/null
41+ rm -f $CXXOUTPUT 2>/dev/null
42+ fi
43 fi
44
45 PLATFORM_CCFLAGS="$PLATFORM_CCFLAGS $COMMON_FLAGS"
46--
472.1.1
48
diff --git a/meta-oe/recipes-extended/leveldb/leveldb_git.bb b/meta-oe/recipes-extended/leveldb/leveldb_git.bb
new file mode 100644
index 000000000..a6a302430
--- /dev/null
+++ b/meta-oe/recipes-extended/leveldb/leveldb_git.bb
@@ -0,0 +1,27 @@
1SUMMARY = "LevelDB is a fast key-value storage library"
2DESCRIPTION = "LevelDB is a fast key-value storage library that provides an ordered mapping from string keys to string values"
3HOMEPAGE = "http://leveldb.googlecode.com"
4LICENSE = "BSD-3-Clause"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=92d1b128950b11ba8495b64938fc164d"
6
7SRCREV = "803d69203a62faf50f1b77897310a3a1fcae712b"
8PV = "1.18+git${SRCPV}"
9
10SRC_URI = "git://github.com/google/${BPN}.git \
11 file://0001-Explicitly-disable-tcmalloc.patch \
12"
13
14S = "${WORKDIR}/git"
15
16do_compile() {
17 # do not use oe_runmake. oe_runmake pass to make compilation arguments and override
18 # leveldb makefile variable CFLAGS and broke leveldb build.
19 CFLAGS="${CFLAGS}" make || die
20}
21
22do_install() {
23 install -d ${D}${libdir}
24 oe_libinstall -C ${S} -so libleveldb ${D}${libdir}
25 install -d ${D}${includedir}/leveldb
26 install -m 644 ${S}/include/leveldb/*.h ${D}${includedir}/leveldb/
27}