blob: f1a65550e4b3c4c8cd2f67b3a92479d09d499fee [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "mongodb"
2LICENSE = "AGPL-3.0 & Apache-2.0"
3LIC_FILES_CHKSUM = "file://GNU-AGPL-3.0.txt;md5=73f1eb20517c55bf9493b7dd6e480788 \
4 file://APACHE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
5
6DEPENDS = "openssl libpcre libpcap zlib"
7
8inherit scons
9
10PV = "3.3.0+git${SRCPV}"
11SRCREV = "aacd231be0626a204cb40908afdf62c4b67bb0ad"
12SRC_URI = "git://github.com/mongodb/mongo.git;branch=master \
13 file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \
14 "
15
16S = "${WORKDIR}/git"
17
18# Wiredtiger supports only 64-bit platforms
19PACKAGECONFIG_x86-64 ??= "tcmalloc wiredtiger"
20PACKAGECONFIG_aarch64 ??= "tcmalloc wiredtiger"
21PACKAGECONFIG ??= "tcmalloc"
22# gperftools compilation fails for arm below v7 because of missing support of
23# dmb operation. So we use system-allocator instead of tcmalloc
24PACKAGECONFIG_remove_armv6 = "tcmalloc"
25
26#std::current_exception is undefined for arm < v6
27COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
28COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
29COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*"
Patrick Williamsddad1a12017-02-23 20:36:32 -060030COMPATIBLE_MACHINE_powerpc = "(!.*ppc).*"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050031
32PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools,"
33PACKAGECONFIG[wiredtiger] = "--wiredtiger=on,--wiredtiger=off,,"
34
35EXTRA_OESCONS = "--prefix=${D}${prefix} \
36 LIBPATH=${STAGING_LIBDIR} \
37 LINKFLAGS='${LDFLAGS}' \
38 CXXFLAGS='${CXXFLAGS}' \
39 TARGET_ARCH=${TARGET_ARCH} \
40 --ssl \
41 --disable-warnings-as-errors \
42 --use-system-pcre \
43 --use-system-zlib \
44 --js-engine=none \
45 --nostrip \
Patrick Williamsddad1a12017-02-23 20:36:32 -060046 ${PACKAGECONFIG_CONFARGS} \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050047 mongod mongos"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050048
49scons_do_compile() {
50 ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \
51 die "scons build execution failed."
52}
53
54scons_do_install() {
55 ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \
56 die "scons install execution failed."
57}