blob: cd8ccdc8abda8700289f6cc10c4088d0995dc40a [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 Bishop63ae8782019-10-09 09:56:13 -04006DEPENDS = "openssl libpcap zlib boost curl python3 \
Brad Bishop0a921262019-09-24 07:40:45 -04007 python3-setuptools-native \
8 python3-pyyaml-native python3-cheetah-native \
9 python3-psutil-native python3-regex-native \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080010 "
Brad Bishop316dfdd2018-06-25 12:45:53 -040011
Brad Bishop0a921262019-09-24 07:40:45 -040012inherit scons dos2unix siteinfo python3native
Brad Bishop316dfdd2018-06-25 12:45:53 -040013
Brad Bishop0a921262019-09-24 07:40:45 -040014PV = "4.2.0+git${SRCPV}"
15#v4.2.0
16SRCREV = "18ce5c9f56a01f2c933a720d64707f3456f81c8b"
17SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.2 \
Brad Bishop316dfdd2018-06-25 12:45:53 -040018 file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040019 file://0001-Use-long-long-instead-of-int64_t.patch \
20 file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040021 file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040022 file://arm64-support.patch \
23 file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080024 file://0001-Support-deprecated-resolver-functions.patch \
Brad Bishop0a921262019-09-24 07:40:45 -040025 file://0003-Fix-unknown-prefix-env.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040026 "
27SRC_URI_append_libc-musl ="\
Brad Bishop072e2382019-09-25 08:16:16 -040028 file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029 file://0002-Fix-default-stack-size-to-256K.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040030 file://0004-wiredtiger-Disable-strtouq-on-musl.patch \
31 "
Brad Bishopc342db32019-05-15 21:57:59 -040032
33SRC_URI_append_toolchain-clang = "\
34 file://0001-asio-Dont-use-experimental-with-clang.patch \
35 "
36
Brad Bishop316dfdd2018-06-25 12:45:53 -040037S = "${WORKDIR}/git"
38
Brad Bishop779d0ac2019-09-27 08:23:48 -040039COMPATIBLE_HOST ?= '(x86_64|powerpc64|aarch64).*-linux'
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080040
Brad Bishop63ae8782019-10-09 09:56:13 -040041PACKAGECONFIG ??= "tcmalloc system-pcre"
Brad Bishop316dfdd2018-06-25 12:45:53 -040042# 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 Bishop63ae8782019-10-09 09:56:13 -040049PACKAGECONFIG[system-pcre] = "--use-system-pcre,,libpcre,"
Brad Bishop316dfdd2018-06-25 12:45:53 -040050
51EXTRA_OESCONS = "--prefix=${D}${prefix} \
52 LIBPATH=${STAGING_LIBDIR} \
53 LINKFLAGS='${LDFLAGS}' \
54 CXXFLAGS='${CXXFLAGS}' \
55 TARGET_ARCH=${TARGET_ARCH} \
56 --ssl \
57 --disable-warnings-as-errors \
Brad Bishop316dfdd2018-06-25 12:45:53 -040058 --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
Brad Bishop316dfdd2018-06-25 12:45:53 -040065scons_do_compile() {
66 ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \
67 die "scons build execution failed."
68}
69
70scons_do_install() {
71 ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \
72 die "scons install execution failed."
73}