blob: 908ad3e6bcf450205f11bfc2d33812698ad30cf7 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "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
Brad Bishopd7bf8c12018-02-25 22:55:05 -05007SRCREV = "a53934a3ae1244679f812d998a4f16f2c7f309a6"
8PV = "1.20+git${SRCPV}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05009
10SRC_URI = "git://github.com/google/${BPN}.git \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050011 file://0001-build_detect_platform-Check-for-__SSE4_2__.patch \
12 file://0002-makefile-build-SHARED_MEMENVLIB.patch \
13 file://0001-Makefile-Fix-parallel-build.patch \
14 "
Patrick Williamsb48b7b42016-08-17 15:04:38 -050015
16S = "${WORKDIR}/git"
17
Brad Bishopd7bf8c12018-02-25 22:55:05 -050018inherit utils
19
Patrick Williamsb48b7b42016-08-17 15:04:38 -050020do_compile() {
21 # do not use oe_runmake. oe_runmake pass to make compilation arguments and override
22 # leveldb makefile variable CFLAGS and broke leveldb build.
Brad Bishopd7bf8c12018-02-25 22:55:05 -050023 CFLAGS="${CFLAGS}" make ${PARALLEL_MAKE}|| die
Patrick Williamsb48b7b42016-08-17 15:04:38 -050024}
25
26do_install() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050027 install -d ${D}${libdir} ${D}${bindir} ${D}${includedir}/leveldb
28 oe_libinstall -C ${B}/out-shared libleveldb ${D}${libdir}
29 oe_libinstall -C ${S}/out-static libleveldb ${D}${libdir}
30 oe_libinstall -C ${S}/out-static libmemenv ${D}${libdir}
31 install -m 0755 ${B}/out-shared/db_bench ${D}${bindir}
32 install -m 0755 ${B}/out-static/*_test ${D}${bindir}
Patrick Williamsb48b7b42016-08-17 15:04:38 -050033 install -m 644 ${S}/include/leveldb/*.h ${D}${includedir}/leveldb/
34}
Brad Bishopd7bf8c12018-02-25 22:55:05 -050035
36PACKAGES =+ "${PN}-ptest"
37FILES_${PN}-ptest = "${bindir}"
Brad Bishop19323692019-04-05 15:28:33 -040038
39# Do not try to build lib32-leveldb for mips64, but allow libn32-leveldb.
40#
41COMPATIBLE_HOST_mipsarcho32_pn-lib32-leveldb = "null"