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 | |
| 6 | DEPENDS = "openssl libpcre libpcap zlib python boost" |
| 7 | |
| 8 | inherit scons dos2unix siteinfo |
| 9 | |
| 10 | PV = "3.4.13+git${SRCPV}" |
| 11 | SRCREV = "fbdef2ccc53e0fcc9afb570063633d992b2aae42" |
| 12 | SRC_URI = "git://github.com/mongodb/mongo.git;branch=v3.4 \ |
| 13 | file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \ |
| 14 | file://0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.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://0001-Use-strerror_r-only-on-glibc-systems.patch \ |
| 18 | file://0002-Add-a-definition-for-the-macro-__ELF_NATIVE_CLASS.patch \ |
| 19 | file://0003-Conditionalize-glibc-specific-strerror_r.patch \ |
| 20 | file://arm64-support.patch \ |
| 21 | file://0001-IntelRDFPMathLib20U1-Check-for-__DEFINED_wchar_t.patch \ |
| 22 | file://disable-hw-crc32-on-arm64-s390x.patch \ |
| 23 | " |
| 24 | SRC_URI_append_libc-musl ="\ |
| 25 | file://0004-wiredtiger-Disable-strtouq-on-musl.patch \ |
| 26 | " |
| 27 | S = "${WORKDIR}/git" |
| 28 | |
| 29 | # Wiredtiger supports only 64-bit platforms |
| 30 | PACKAGECONFIG_x86-64 ??= "tcmalloc wiredtiger" |
| 31 | PACKAGECONFIG_aarch64 ??= "tcmalloc wiredtiger" |
| 32 | PACKAGECONFIG ??= "tcmalloc" |
| 33 | # gperftools compilation fails for arm below v7 because of missing support of |
| 34 | # dmb operation. So we use system-allocator instead of tcmalloc |
| 35 | PACKAGECONFIG_remove_armv6 = "tcmalloc" |
| 36 | PACKAGECONFIG_remove_libc-musl = "tcmalloc" |
| 37 | |
| 38 | #std::current_exception is undefined for arm < v6 |
| 39 | COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*" |
| 40 | COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*" |
| 41 | COMPATIBLE_MACHINE_armv7a = "(!.*armv7a).*" |
| 42 | COMPATIBLE_MACHINE_armv7ve = "(!.*armv7ve).*" |
| 43 | COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*" |
| 44 | COMPATIBLE_MACHINE_powerpc = "(!.*ppc).*" |
| 45 | |
| 46 | PACKAGECONFIG[tcmalloc] = "--use-system-tcmalloc,--allocator=system,gperftools," |
| 47 | PACKAGECONFIG[wiredtiger] = "--wiredtiger=on,--wiredtiger=off,," |
| 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)} \ |
| 61 | ${PACKAGECONFIG_CONFARGS} \ |
| 62 | mongod mongos" |
| 63 | |
| 64 | do_configure_prepend() { |
| 65 | # tests use hex floats, not supported in plain C++ |
| 66 | sed -e 's|-std=c++11|-std=gnu++11|g' -i ${S}/SConstruct |
| 67 | } |
| 68 | scons_do_compile() { |
| 69 | ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \ |
| 70 | die "scons build execution failed." |
| 71 | } |
| 72 | |
| 73 | scons_do_install() { |
| 74 | ${STAGING_BINDIR_NATIVE}/scons install ${EXTRA_OESCONS}|| \ |
| 75 | die "scons install execution failed." |
| 76 | } |