blob: d39ab0a3142fc3e06fb60c8565ab2993a1570eea [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001SUMMARY = "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
6DEPENDS = "openssl libpcre libpcap zlib boost curl python \
7 python-setuptools-native python-typing-native \
8 python-pyyaml-native python-cheetah-native \
9 "
10
11inherit scons dos2unix siteinfo pythonnative
12
13PV = "4.0.1+git${SRCPV}"
14#v4.0.1
15SRCREV = "54f1582fc6eb01de4d4c42f26fc133e623f065fb"
16SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.0 \
17 file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \
18 file://0001-Use-long-long-instead-of-int64_t.patch \
19 file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \
20 file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \
21 file://arm64-support.patch \
22 file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \
23 file://disable-hw-crc32-on-arm64-s390x.patch \
24 file://0001-Support-deprecated-resolver-functions.patch \
25 "
26SRC_URI_append_libc-musl ="\
27 file://0002-Fix-default-stack-size-to-256K.patch \
28 file://0004-wiredtiger-Disable-strtouq-on-musl.patch \
29 "
30S = "${WORKDIR}/git"
31
32COMPATIBLE_HOST ?= '(x86_64|i.86|powerpc64|arm|aarch64).*-linux'
33
34COMPATIBLE_HOST_arm = "null"
35COMPATIBLE_HOST_libc-musl_x86 = "null"
36
37PACKAGECONFIG ??= "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
43PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools,"
44
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)} \
57 --wiredtiger=${@['off','on'][d.getVar('SITEINFO_BITS') != '32']} \
58 ${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}