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 | |
| 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>
| -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 @@ | |||
| 1 | From d6daac04dab4b3acf4b88f16742d1b402cdc3d83 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 3 | Date: Wed, 1 Oct 2014 18:54:04 +0200 | ||
| 4 | Subject: [PATCH] Explicitly disable tcmalloc | ||
| 5 | |||
| 6 | Without this change leveldb autodetects tcmalloc from sysroot and | ||
| 7 | sometimes became dependant on gperftools | ||
| 8 | |||
| 9 | Disable autodetection without TCMALLOC_ENABLED=true pased to make | ||
| 10 | |||
| 11 | Upstream-Status: Pending | ||
| 12 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 13 | --- | ||
| 14 | build_detect_platform | 16 +++++++++------- | ||
| 15 | 1 file changed, 9 insertions(+), 7 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/build_detect_platform b/build_detect_platform | ||
| 18 | index 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 | -- | ||
| 47 | 2.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 0000000000..a6a3024301 --- /dev/null +++ b/meta-oe/recipes-extended/leveldb/leveldb_git.bb | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | SUMMARY = "LevelDB is a fast key-value storage library" | ||
| 2 | DESCRIPTION = "LevelDB is a fast key-value storage library that provides an ordered mapping from string keys to string values" | ||
| 3 | HOMEPAGE = "http://leveldb.googlecode.com" | ||
| 4 | LICENSE = "BSD-3-Clause" | ||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=92d1b128950b11ba8495b64938fc164d" | ||
| 6 | |||
| 7 | SRCREV = "803d69203a62faf50f1b77897310a3a1fcae712b" | ||
| 8 | PV = "1.18+git${SRCPV}" | ||
| 9 | |||
| 10 | SRC_URI = "git://github.com/google/${BPN}.git \ | ||
| 11 | file://0001-Explicitly-disable-tcmalloc.patch \ | ||
| 12 | " | ||
| 13 | |||
| 14 | S = "${WORKDIR}/git" | ||
| 15 | |||
| 16 | do_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 | |||
| 22 | do_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 | } | ||
