blob: bb3ff3b40323557576303b60a55ffa972bfb21f4 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "mongodb"
2LICENSE = "AGPL-3.0 & Apache-2.0 & Zlib"
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 python boost"
7
8inherit scons dos2unix siteinfo
9
10PV = "3.4.13+git${SRCPV}"
11SRCREV = "fbdef2ccc53e0fcc9afb570063633d992b2aae42"
12SRC_URI = "git://github.com/mongodb/mongo.git;branch=v3.4 \
13 file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \
14 file://0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch \
15 file://0001-Use-long-long-instead-of-int64_t.patch \
16 file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \
17 file://0001-Use-strerror_r-only-on-glibc-systems.patch \
18 file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \
19 file://0003-Conditionalize-glibc-specific-strerror_r.patch \
20 file://arm64-support.patch \
21 file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \
22 file://disable-hw-crc32-on-arm64-s390x.patch \
23 "
24SRC_URI_append_libc-musl ="\
25 file://0004-wiredtiger-Disable-strtouq-on-musl.patch \
26 "
27S = "${WORKDIR}/git"
28
29# Wiredtiger supports only 64-bit platforms
30PACKAGECONFIG_x86-64 ??= "tcmalloc wiredtiger"
31PACKAGECONFIG_aarch64 ??= "tcmalloc wiredtiger"
32PACKAGECONFIG ??= "tcmalloc"
33# gperftools compilation fails for arm below v7 because of missing support of
34# dmb operation. So we use system-allocator instead of tcmalloc
35PACKAGECONFIG_remove_armv6 = "tcmalloc"
36PACKAGECONFIG_remove_libc-musl = "tcmalloc"
37
38#std::current_exception is undefined for arm < v6
39COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
40COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
41COMPATIBLE_MACHINE_armv7a = "(!.*armv7a).*"
42COMPATIBLE_MACHINE_armv7ve = "(!.*armv7ve).*"
43COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*"
44COMPATIBLE_MACHINE_powerpc = "(!.*ppc).*"
45
46PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools,"
47PACKAGECONFIG[wiredtiger] = "--wiredtiger=on,--wiredtiger=off,,"
48
49EXTRA_OESCONS = "--prefix=${D}${prefix} \
50 LIBPATH=${STAGING_LIBDIR} \
51 LINKFLAGS='${LDFLAGS}' \
52 CXXFLAGS='${CXXFLAGS}' \
53 TARGET_ARCH=${TARGET_ARCH} \
54 --ssl \
55 --disable-warnings-as-errors \
56 --use-system-pcre \
57 --use-system-zlib \
58 --js-engine=none \
59 --nostrip \
60 --endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
61 ${PACKAGECONFIG_CONFARGS} \
62 mongod mongos"
63
64do_configure_prepend() {
65 # tests use hex floats, not supported in plain C++
66 sed -e 's|-std=c++11|-std=gnu++11|g' -i ${S}/SConstruct
67}
68scons_do_compile() {
69 ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \
70 die "scons build execution failed."
71}
72
73scons_do_install() {
74 ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \
75 die "scons install execution failed."
76}