blob: 3e77ac32f3d563f1131078f9350d2eda08bb19ae [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 Bishop0a921262019-09-24 07:40:45 -04006DEPENDS = "openssl libpcre libpcap zlib boost curl python3 \
7 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 Bishop1a4b7ee2018-12-16 17:11:34 -080039COMPATIBLE_HOST ?= '(x86_64|i.86|powerpc64|arm|aarch64).*-linux'
40
41COMPATIBLE_HOST_arm = "null"
42COMPATIBLE_HOST_libc-musl_x86 = "null"
Brad Bishop0a921262019-09-24 07:40:45 -040043COMPATIBLE_HOST_toolchain-clang_x86 = "null"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080044
Brad Bishop316dfdd2018-06-25 12:45:53 -040045PACKAGECONFIG ??= "tcmalloc"
46# gperftools compilation fails for arm below v7 because of missing support of
47# dmb operation. So we use system-allocator instead of tcmalloc
48PACKAGECONFIG_remove_armv6 = "tcmalloc"
49PACKAGECONFIG_remove_libc-musl = "tcmalloc"
50
Brad Bishop316dfdd2018-06-25 12:45:53 -040051PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools,"
Brad Bishop26bdd442019-08-16 17:08:17 -040052PACKAGECONFIG[shell] = ",--js-engine=none,,"
Brad Bishop316dfdd2018-06-25 12:45:53 -040053
54EXTRA_OESCONS = "--prefix=${D}${prefix} \
55 LIBPATH=${STAGING_LIBDIR} \
56 LINKFLAGS='${LDFLAGS}' \
57 CXXFLAGS='${CXXFLAGS}' \
58 TARGET_ARCH=${TARGET_ARCH} \
59 --ssl \
60 --disable-warnings-as-errors \
61 --use-system-pcre \
62 --use-system-zlib \
Brad Bishop316dfdd2018-06-25 12:45:53 -040063 --nostrip \
64 --endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080065 --wiredtiger=${@['off','on'][d.getVar('SITEINFO_BITS') != '32']} \
Brad Bishop316dfdd2018-06-25 12:45:53 -040066 ${PACKAGECONFIG_CONFARGS} \
Brad Bishop26bdd442019-08-16 17:08:17 -040067 core"
Brad Bishop316dfdd2018-06-25 12:45:53 -040068
69do_configure_prepend() {
70 # tests use hex floats, not supported in plain C++
71 sed -e 's|-std=c++11|-std=gnu++11|g' -i ${S}/SConstruct
72}
73scons_do_compile() {
74 ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \
75 die "scons build execution failed."
76}
77
78scons_do_install() {
79 ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \
80 die "scons install execution failed."
81}