blob: d39ab0a3142fc3e06fb60c8565ab2993a1570eea [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
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 Bishop1a4b7ee2018-12-16 17:11:34 -080013PV = "4.0.1+git${SRCPV}"
14#v4.0.1
15SRCREV = "54f1582fc6eb01de4d4c42f26fc133e623f065fb"
16SRC_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 \
23 file://disable-hw-crc32-on-arm64-s390x.patch \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080024 file://0001-Support-deprecated-resolver-functions.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040025 "
26SRC_URI_append_libc-musl ="\
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080027 file://0002-Fix-default-stack-size-to-256K.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040028 file://0004-wiredtiger-Disable-strtouq-on-musl.patch \
29 "
30S = "${WORKDIR}/git"
31
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080032COMPATIBLE_HOST ?= '(x86_64|i.86|powerpc64|arm|aarch64).*-linux'
33
34COMPATIBLE_HOST_arm = "null"
35COMPATIBLE_HOST_libc-musl_x86 = "null"
36
Brad Bishop316dfdd2018-06-25 12:45:53 -040037PACKAGECONFIG ??= "tcmalloc"
38# gperftools compilation fails for arm below v7 because of missing support of
39# dmb operation. So we use system-allocator instead of tcmalloc
40PACKAGECONFIG_remove_armv6 = "tcmalloc"
41PACKAGECONFIG_remove_libc-musl = "tcmalloc"
42
Brad Bishop316dfdd2018-06-25 12:45:53 -040043PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools,"
Brad Bishop316dfdd2018-06-25 12:45:53 -040044
45EXTRA_OESCONS = "--prefix=${D}${prefix} \
46 LIBPATH=${STAGING_LIBDIR} \
47 LINKFLAGS='${LDFLAGS}' \
48 CXXFLAGS='${CXXFLAGS}' \
49 TARGET_ARCH=${TARGET_ARCH} \
50 --ssl \
51 --disable-warnings-as-errors \
52 --use-system-pcre \
53 --use-system-zlib \
54 --js-engine=none \
55 --nostrip \
56 --endian=${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'le', 'little', 'big', d)} \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080057 --wiredtiger=${@['off','on'][d.getVar('SITEINFO_BITS') != '32']} \
Brad Bishop316dfdd2018-06-25 12:45:53 -040058 ${PACKAGECONFIG_CONFARGS} \
59 mongod mongos"
60
61do_configure_prepend() {
62 # tests use hex floats, not supported in plain C++
63 sed -e 's|-std=c++11|-std=gnu++11|g' -i ${S}/SConstruct
64}
65scons_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}