mongodb_git.bb 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. SUMMARY = "mongodb"
  2. LICENSE = "AGPL-3.0 & Apache-2.0 & Zlib"
  3. LIC_FILES_CHKSUM = "file://GNU-AGPL-3.0.txt;md5=73f1eb20517c55bf9493b7dd6e480788 \
  4. file://APACHE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
  5. DEPENDS = "openssl libpcre libpcap zlib boost curl python \
  6. python-setuptools-native python-typing-native \
  7. python-pyyaml-native python-cheetah-native \
  8. "
  9. inherit scons dos2unix siteinfo pythonnative
  10. PV = "4.0.1+git${SRCPV}"
  11. #v4.0.1
  12. SRCREV = "54f1582fc6eb01de4d4c42f26fc133e623f065fb"
  13. SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.0 \
  14. file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \
  15. file://0001-Use-long-long-instead-of-int64_t.patch \
  16. file://0001-Use-__GLIBC__-to-control-use-of-gnu_get_libc_version.patch \
  17. file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \
  18. file://arm64-support.patch \
  19. file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \
  20. file://disable-hw-crc32-on-arm64-s390x.patch \
  21. file://0001-Support-deprecated-resolver-functions.patch \
  22. "
  23. SRC_URI_append_libc-musl ="\
  24. file://0002-Fix-default-stack-size-to-256K.patch \
  25. file://0004-wiredtiger-Disable-strtouq-on-musl.patch \
  26. "
  27. S = "${WORKDIR}/git"
  28. # Wiredtiger supports only 64-bit platforms
  29. PACKAGECONFIG_x86-64 ??= "tcmalloc wiredtiger"
  30. PACKAGECONFIG_aarch64 ??= "tcmalloc wiredtiger"
  31. PACKAGECONFIG ??= "tcmalloc"
  32. # gperftools compilation fails for arm below v7 because of missing support of
  33. # dmb operation. So we use system-allocator instead of tcmalloc
  34. PACKAGECONFIG_remove_armv6 = "tcmalloc"
  35. PACKAGECONFIG_remove_libc-musl = "tcmalloc"
  36. #std::current_exception is undefined for arm < v6
  37. COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*"
  38. COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*"
  39. COMPATIBLE_MACHINE_armv7a = "(!.*armv7a).*"
  40. COMPATIBLE_MACHINE_armv7ve = "(!.*armv7ve).*"
  41. COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*"
  42. COMPATIBLE_MACHINE_powerpc = "(!.*ppc).*"
  43. PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools,"
  44. PACKAGECONFIG[wiredtiger] = "--wiredtiger=on,--wiredtiger=off,,"
  45. EXTRA_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. ${PACKAGECONFIG_CONFARGS} \
  58. mongod mongos"
  59. do_configure_prepend() {
  60. # tests use hex floats, not supported in plain C++
  61. sed -e 's|-std=c++11|-std=gnu++11|g' -i ${S}/SConstruct
  62. }
  63. scons_do_compile() {
  64. ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \
  65. die "scons build execution failed."
  66. }
  67. scons_do_install() {
  68. ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \
  69. die "scons install execution failed."
  70. }