Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 | |
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 | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 13 | PV = "4.0.1+git${SRCPV}" |
| 14 | #v4.0.1 |
| 15 | SRCREV = "54f1582fc6eb01de4d4c42f26fc133e623f065fb" |
| 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 \ |
| 23 | file://disable-hw-crc32-on-arm64-s390x.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 24 | file://0001-Support-deprecated-resolver-functions.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 25 | " |
| 26 | SRC_URI_append_libc-musl ="\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | file://0002-Fix-default-stack-size-to-256K.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 28 | file://0004-wiredtiger-Disable-strtouq-on-musl.patch \ |
| 29 | " |
| 30 | S = "${WORKDIR}/git" |
| 31 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 32 | COMPATIBLE_HOST ?= '(x86_64|i.86|powerpc64|arm|aarch64).*-linux' |
| 33 | |
| 34 | COMPATIBLE_HOST_arm = "null" |
| 35 | COMPATIBLE_HOST_libc-musl_x86 = "null" |
| 36 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 37 | PACKAGECONFIG ??= "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 |
| 40 | PACKAGECONFIG_remove_armv6 = "tcmalloc" |
| 41 | PACKAGECONFIG_remove_libc-musl = "tcmalloc" |
| 42 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 43 | PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools," |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 44 | |
| 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)} \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 57 | --wiredtiger=${@['off','on'][d.getVar('SITEINFO_BITS') != '32']} \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 58 | ${PACKAGECONFIG_CONFARGS} \ |
| 59 | mongod mongos" |
| 60 | |
| 61 | do_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 | } |
| 65 | scons_do_compile() { |
| 66 | ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \ |
| 67 | die "scons build execution failed." |
| 68 | } |
| 69 | |
| 70 | scons_do_install() { |
| 71 | ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \ |
| 72 | die "scons install execution failed." |
| 73 | } |