blob: ed0551736cf796195a6468768662be1d29ee1317 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "mongodb"
Brad Bishop19323692019-04-05 15:28:33 -04002LICENSE = "SSPL-1 & Apache-2.0 & Zlib"
3LIC_FILES_CHKSUM = "file://LICENSE-Community.txt;md5=3a865f27f11f43ecbe542d9ea387dcf1 \
Brad Bishop316dfdd2018-06-25 12:45:53 -04004 file://APACHE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
5
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08006DEPENDS = "openssl libpcre libpcap zlib boost curl python \
7 python-setuptools-native python-typing-native \
8 python-pyyaml-native python-cheetah-native \
9 "
Brad Bishop316dfdd2018-06-25 12:45:53 -040010
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080011inherit scons dos2unix siteinfo pythonnative
Brad Bishop316dfdd2018-06-25 12:45:53 -040012
Brad Bishop19323692019-04-05 15:28:33 -040013PV = "4.0.6+git${SRCPV}"
14#v4.0.6
15SRCREV = "caa42a1f75a56c7643d0b68d3880444375ec42e3"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080016SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.0 \
Brad Bishop316dfdd2018-06-25 12:45:53 -040017 file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040018 file://0001-Use-long-long-instead-of-int64_t.patch \
19 file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040020 file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040021 file://arm64-support.patch \
22 file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080023 file://0001-Support-deprecated-resolver-functions.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040024 "
25SRC_URI_append_libc-musl ="\
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080026 file://0002-Fix-default-stack-size-to-256K.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040027 file://0004-wiredtiger-Disable-strtouq-on-musl.patch \
28 "
Brad Bishopc342db32019-05-15 21:57:59 -040029
30SRC_URI_append_toolchain-clang = "\
31 file://0001-asio-Dont-use-experimental-with-clang.patch \
32 "
33
Brad Bishop316dfdd2018-06-25 12:45:53 -040034S = "${WORKDIR}/git"
35
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080036COMPATIBLE_HOST ?= '(x86_64|i.86|powerpc64|arm|aarch64).*-linux'
37
38COMPATIBLE_HOST_arm = "null"
39COMPATIBLE_HOST_libc-musl_x86 = "null"
40
Brad Bishop316dfdd2018-06-25 12:45:53 -040041PACKAGECONFIG ??= "tcmalloc"
42# gperftools compilation fails for arm below v7 because of missing support of
43# dmb operation. So we use system-allocator instead of tcmalloc
44PACKAGECONFIG_remove_armv6 = "tcmalloc"
45PACKAGECONFIG_remove_libc-musl = "tcmalloc"
46
Brad Bishop316dfdd2018-06-25 12:45:53 -040047PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools,"
Brad Bishop26bdd442019-08-16 17:08:17 -040048PACKAGECONFIG[shell] = ",--js-engine=none,,"
Brad Bishop316dfdd2018-06-25 12:45:53 -040049
50EXTRA_OESCONS = "--prefix=${D}${prefix} \
51 LIBPATH=${STAGING_LIBDIR} \
52 LINKFLAGS='${LDFLAGS}' \
53 CXXFLAGS='${CXXFLAGS}' \
54 TARGET_ARCH=${TARGET_ARCH} \
55 --ssl \
56 --disable-warnings-as-errors \
57 --use-system-pcre \
58 --use-system-zlib \
Brad Bishop316dfdd2018-06-25 12:45:53 -040059 --nostrip \
60 --endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080061 --wiredtiger=${@['off','on'][d.getVar('SITEINFO_BITS') != '32']} \
Brad Bishop316dfdd2018-06-25 12:45:53 -040062 ${PACKAGECONFIG_CONFARGS} \
Brad Bishop26bdd442019-08-16 17:08:17 -040063 core"
Brad Bishop316dfdd2018-06-25 12:45:53 -040064
65do_configure_prepend() {
66 # tests use hex floats, not supported in plain C++
67 sed -e 's|-std=c++11|-std=gnu++11|g' -i ${S}/SConstruct
68}
69scons_do_compile() {
70 ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \
71 die "scons build execution failed."
72}
73
74scons_do_install() {
75 ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \
76 die "scons install execution failed."
77}
Brad Bishop26bdd442019-08-16 17:08:17 -040078
79PNBLACKLIST[mongodb] = "Since bbclass scons convert to python3, build mongodb failed"