blob: 0f9000359a85dca2973de7833a7424a790c91483 [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 Bishop316dfdd2018-06-25 12:45:53 -040048
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)} \
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} \
63 mongod mongos"
64
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}