diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2014-10-01 19:00:51 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-10-04 00:31:55 +0200 |
commit | 4e230217c8f78c592ff05ca83e06bba006450a00 (patch) | |
tree | a46be4e94b527d7695911e7d204d2d5dba546c9f /meta-oe/recipes-extended/leveldb | |
parent | 348219485581e947872c85ea4dd4a3b2d8cdd779 (diff) | |
download | meta-openembedded-4e230217c8f78c592ff05ca83e06bba006450a00.tar.gz |
leveldb: import from meta-webos and upgrade
* it's needed for newer qtwebkit-5.4
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/leveldb')
-rw-r--r-- | meta-oe/recipes-extended/leveldb/leveldb/0001-Explicitly-disable-tcmalloc.patch | 48 | ||||
-rw-r--r-- | meta-oe/recipes-extended/leveldb/leveldb_git.bb | 27 |
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 0000000000..4b76dd0c31 --- /dev/null +++ b/meta-oe/recipes-extended/leveldb/leveldb/0001-Explicitly-disable-tcmalloc.patch @@ -0,0 +1,48 @@ +From d6daac04dab4b3acf4b88f16742d1b402cdc3d83 Mon Sep 17 00:00:00 2001 +From: Martin Jansa <Martin.Jansa@gmail.com> +Date: Wed, 1 Oct 2014 18:54:04 +0200 +Subject: [PATCH] Explicitly disable tcmalloc + +Without this change leveldb autodetects tcmalloc from sysroot and +sometimes became dependant on gperftools + +Disable autodetection without TCMALLOC_ENABLED=true pased to make + +Upstream-Status: Pending +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +--- + build_detect_platform | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +diff --git a/build_detect_platform b/build_detect_platform +index bb76c4f..a586364 100755 +--- a/build_detect_platform ++++ b/build_detect_platform +@@ -201,15 +201,17 @@ EOF + PLATFORM_LIBS="$PLATFORM_LIBS -lsnappy" + fi + +- # Test whether tcmalloc is available +- $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -ltcmalloc 2>/dev/null <<EOF +- int main() {} ++ if [ "$TCMALLOC_ENABLED" = "true" ]; then ++ # Test whether tcmalloc is available ++ $CXX $CXXFLAGS -x c++ - -o $CXXOUTPUT -ltcmalloc 2>/dev/null <<EOF ++ int main() {} + EOF +- if [ "$?" = 0 ]; then +- PLATFORM_LIBS="$PLATFORM_LIBS -ltcmalloc" +- fi ++ if [ "$?" = 0 ]; then ++ PLATFORM_LIBS="$PLATFORM_LIBS -ltcmalloc" ++ fi + +- rm -f $CXXOUTPUT 2>/dev/null ++ rm -f $CXXOUTPUT 2>/dev/null ++ fi + fi + + PLATFORM_CCFLAGS="$PLATFORM_CCFLAGS $COMMON_FLAGS" +-- +2.1.1 + 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 0000000000..a6a3024301 --- /dev/null +++ b/meta-oe/recipes-extended/leveldb/leveldb_git.bb @@ -0,0 +1,27 @@ +SUMMARY = "LevelDB is a fast key-value storage library" +DESCRIPTION = "LevelDB is a fast key-value storage library that provides an ordered mapping from string keys to string values" +HOMEPAGE = "http://leveldb.googlecode.com" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=92d1b128950b11ba8495b64938fc164d" + +SRCREV = "803d69203a62faf50f1b77897310a3a1fcae712b" +PV = "1.18+git${SRCPV}" + +SRC_URI = "git://github.com/google/${BPN}.git \ + file://0001-Explicitly-disable-tcmalloc.patch \ +" + +S = "${WORKDIR}/git" + +do_compile() { + # do not use oe_runmake. oe_runmake pass to make compilation arguments and override + # leveldb makefile variable CFLAGS and broke leveldb build. + CFLAGS="${CFLAGS}" make || die +} + +do_install() { + install -d ${D}${libdir} + oe_libinstall -C ${S} -so libleveldb ${D}${libdir} + install -d ${D}${includedir}/leveldb + install -m 644 ${S}/include/leveldb/*.h ${D}${includedir}/leveldb/ +} |