Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | SUMMARY = "mongodb" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 2 | LICENSE = "SSPL-1 & Apache-2.0 & Zlib" |
| 3 | LIC_FILES_CHKSUM = "file://LICENSE-Community.txt;md5=3a865f27f11f43ecbe542d9ea387dcf1 \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 4 | file://APACHE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" |
| 5 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 6 | DEPENDS = "openssl libpcre libpcap zlib boost curl python \ |
| 7 | python-setuptools-native python-typing-native \ |
| 8 | python-pyyaml-native python-cheetah-native \ |
| 9 | " |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 10 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 11 | inherit scons dos2unix siteinfo pythonnative |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 12 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 13 | PV = "4.0.6+git${SRCPV}" |
| 14 | #v4.0.6 |
| 15 | SRCREV = "caa42a1f75a56c7643d0b68d3880444375ec42e3" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 16 | SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.0 \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 17 | file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 20 | file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 21 | file://arm64-support.patch \ |
| 22 | file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 23 | file://0001-Support-deprecated-resolver-functions.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 24 | " |
| 25 | SRC_URI_append_libc-musl ="\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 26 | file://0002-Fix-default-stack-size-to-256K.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 27 | file://0004-wiredtiger-Disable-strtouq-on-musl.patch \ |
| 28 | " |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 29 | |
| 30 | SRC_URI_append_toolchain-clang = "\ |
| 31 | file://0001-asio-Dont-use-experimental-with-clang.patch \ |
| 32 | " |
| 33 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 34 | S = "${WORKDIR}/git" |
| 35 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 36 | COMPATIBLE_HOST ?= '(x86_64|i.86|powerpc64|arm|aarch64).*-linux' |
| 37 | |
| 38 | COMPATIBLE_HOST_arm = "null" |
| 39 | COMPATIBLE_HOST_libc-musl_x86 = "null" |
| 40 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 41 | PACKAGECONFIG ??= "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 |
| 44 | PACKAGECONFIG_remove_armv6 = "tcmalloc" |
| 45 | PACKAGECONFIG_remove_libc-musl = "tcmalloc" |
| 46 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 47 | PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools," |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 48 | |
| 49 | EXTRA_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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 61 | --wiredtiger=${@['off','on'][d.getVar('SITEINFO_BITS') != '32']} \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 62 | ${PACKAGECONFIG_CONFARGS} \ |
| 63 | mongod mongos" |
| 64 | |
| 65 | do_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 | } |
| 69 | scons_do_compile() { |
| 70 | ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \ |
| 71 | die "scons build execution failed." |
| 72 | } |
| 73 | |
| 74 | scons_do_install() { |
| 75 | ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \ |
| 76 | die "scons install execution failed." |
| 77 | } |