From fc5d7b11b01061dab048c39329821d33db3c13cc Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Tue, 12 Jan 2016 15:33:17 +0100 Subject: [PATCH] mongodb: update to 3.2.0. --- srcpkgs/mongodb/patches/musl-backtrace.patch | 31 --------------- .../patches/musl-elf_native_class.patch | 2 +- srcpkgs/mongodb/patches/musl-fix-asio.patch | 15 +++++++ .../mongodb/patches/musl-libc_version_h.patch | 33 +++++++++------- srcpkgs/mongodb/template | 39 +++++++------------ 5 files changed, 49 insertions(+), 71 deletions(-) delete mode 100644 srcpkgs/mongodb/patches/musl-backtrace.patch create mode 100644 srcpkgs/mongodb/patches/musl-fix-asio.patch diff --git a/srcpkgs/mongodb/patches/musl-backtrace.patch b/srcpkgs/mongodb/patches/musl-backtrace.patch deleted file mode 100644 index 95f90ccb23..0000000000 --- a/srcpkgs/mongodb/patches/musl-backtrace.patch +++ /dev/null @@ -1,31 +0,0 @@ -There is no walkcontext(3) for musl libc, so we effectively -disable backtracing symbols without removing the functions. -They just always return zero symbols. - ---- src/mongo/platform/backtrace.cpp 2015-08-24 02:39:52.000000000 +0200 -+++ src/mongo/platform/backtrace.cpp 2015-08-26 19:27:26.738866698 +0200 -@@ -81,7 +81,7 @@ - // to Linux's display, but slightly different. - // - int addrtosymstr(void* address, char* outputBuffer, int outputBufferSize) { -- Dl_info_t symbolInfo; -+ Dl_info symbolInfo; - if (dladdr(address, &symbolInfo) == 0) { // no info: "[address]" - return snprintf(outputBuffer, outputBufferSize, "[0x%p]", address); - } -@@ -113,10 +113,15 @@ -+#if defined(__sunos__) - if (getcontext(&context) != 0) { - return 0; - } - int wcReturn = walkcontext( - &context, - reinterpret_cast(WalkcontextCallback::callbackFunction), - static_cast(&walkcontextCallback)); -+#else -+ // We have no walkcontext(3) for musl libc -+ int wcReturn = -1; -+#endif - if (wcReturn == 0) { - return walkcontextCallback.getCount(); - } diff --git a/srcpkgs/mongodb/patches/musl-elf_native_class.patch b/srcpkgs/mongodb/patches/musl-elf_native_class.patch index 893a437ed0..cf5a34667b 100644 --- a/srcpkgs/mongodb/patches/musl-elf_native_class.patch +++ b/srcpkgs/mongodb/patches/musl-elf_native_class.patch @@ -17,5 +17,5 @@ on the native arch's word size. +#endif + #include "mongo/base/init.h" + #include "mongo/config.h" #include "mongo/db/jsobj.h" - #include "mongo/platform/backtrace.h" diff --git a/srcpkgs/mongodb/patches/musl-fix-asio.patch b/srcpkgs/mongodb/patches/musl-fix-asio.patch new file mode 100644 index 0000000000..aec101112c --- /dev/null +++ b/srcpkgs/mongodb/patches/musl-fix-asio.patch @@ -0,0 +1,15 @@ +src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp +--- src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp.orig 2016-01-12 14:04:28.770860071 +0100 ++++ src/third_party/asio-asio-1-11-0/asio/include/asio/impl/error_code.ipp 2016-01-12 14:05:21.615858764 +0100 +@@ -97,10 +97,7 @@ public: + #if defined(__sun) || defined(__QNX__) || defined(__SYMBIAN32__) + using namespace std; + return strerror(value); +-#elif defined(__MACH__) && defined(__APPLE__) \ +- || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) \ +- || defined(_AIX) || defined(__hpux) || defined(__osf__) \ +- || defined(__ANDROID__) ++#elif ! defined(__GLIBC__) + char buf[256] = ""; + using namespace std; + strerror_r(value, buf, sizeof(buf)); diff --git a/srcpkgs/mongodb/patches/musl-libc_version_h.patch b/srcpkgs/mongodb/patches/musl-libc_version_h.patch index 43cd8dad29..afabd9e391 100644 --- a/srcpkgs/mongodb/patches/musl-libc_version_h.patch +++ b/srcpkgs/mongodb/patches/musl-libc_version_h.patch @@ -1,16 +1,15 @@ ---- src/mongo/util/processinfo_linux2.cpp 2015-08-24 02:39:52.000000000 +0200 -+++ src/mongo/util/processinfo_linux2.cpp 2015-08-26 18:47:57.444816879 +0200 -@@ -34,7 +34,9 @@ - #include +--- src/mongo/util/processinfo_linux.cpp.orig 2015-12-14 14:47:03.364085899 +0100 ++++ src/mongo/util/processinfo_linux.cpp 2015-12-14 14:49:57.772093896 +0100 +@@ -35,7 +35,7 @@ #include #include -+#if defined(__GLIBC__) - #include -+#endif #include - - #include "processinfo.h" -@@ -420,12 +422,14 @@ +-#ifdef __UCLIBC__ ++#ifndef __GLIBC__ + #include + #else + #include +@@ -424,12 +424,14 @@ double ProcessInfo::getSystemMemoryPress } void ProcessInfo::getExtraInfo(BSONObjBuilder& info) { @@ -24,14 +23,18 @@ +#endif LinuxProc p(_pid); - info.appendNumber("page_faults", static_cast(p._maj_flt)); -@@ -460,7 +464,9 @@ + if (p._maj_flt <= std::numeric_limits::max()) +@@ -467,11 +469,11 @@ void ProcessInfo::SystemInfo::collectSys BSONObjBuilder bExtra; bExtra.append("versionString", LinuxSysHelper::readLineFromFile("/proc/version")); +-#ifdef __UCLIBC__ +#if defined(__GLIBC__) + stringstream ss; + ss << "uClibc-" << __UCLIBC_MAJOR__ << "." << __UCLIBC_MINOR__ << "." << __UCLIBC_SUBLEVEL__; + bExtra.append("libcVersion", ss.str()); +-#else ++#elif defined(__UCLIBC__) bExtra.append("libcVersion", gnu_get_libc_version()); -+#endif + #endif if (!verSig.empty()) - // optional - bExtra.append("versionSignature", verSig); diff --git a/srcpkgs/mongodb/template b/srcpkgs/mongodb/template index 4534a81cb1..d5ff5c394b 100644 --- a/srcpkgs/mongodb/template +++ b/srcpkgs/mongodb/template @@ -1,9 +1,10 @@ # Template file for 'mongodb' pkgname=mongodb -version=3.0.7 +version=3.2.0 revision=1 hostmakedepends="scons" -makedepends="boost-devel pcre-devel snappy-devel libressl-devel libpcap-devel gperftools-devel" +makedepends="boost-devel pcre-devel snappy-devel libressl-devel libpcap-devel + gperftools-devel libsasl-devel yaml-cpp-devel valgrind-devel" conf_files="/etc/mongodb/mongodb.conf" system_accounts="mongodb" mongodb_homedir="/var/lib/mongodb" @@ -12,21 +13,21 @@ maintainer="Enno Boland " homepage="http://www.mongodb.org" license="AGPL-3" distfiles="http://downloads.mongodb.org/src/mongodb-src-r${version}.tar.gz" -checksum=2d25bae7c3bfb3c0e168fcad526dc212da72faaeae6d1573db631cacb172a7e7 +checksum=c6dd1d1670b86cbf02a531ddf7a7cda8f138d8733acce33766f174bd1e5ab2ee make_dirs=" - /var/lib/mongodb 0700 mongodb mongodb - /var/log/mongodb 0750 mongodb mongodb" + /var/lib/mongodb 0700 mongodb mongodb + /var/log/mongodb 0750 mongodb mongodb" wrksrc="mongodb-src-r${version}" _scons_args=" --use-system-boost \ - --use-system-pcre \ - --use-system-snappy \ - --use-system-tcmalloc \ - --ssl \ - --c++11=on \ - --variant-dir=void \ - --nostrip \ - --disable-warnings-as-errors" -# --use-system-v8 \ # disabled - configure error + --use-system-pcre \ + --use-system-snappy \ + --use-system-tcmalloc \ + --use-system-yaml \ + --use-system-zlib \ + --use-sasl-client \ + --ssl \ + --nostrip \ + --disable-warnings-as-errors" # ETOOHUGE nodebug=1 @@ -46,22 +47,12 @@ post_configure() { do_build() { scons core ${makejobs} \ - --cc=$CC \ - --cxx=$CXX \ - --ld=$CXX \ - --libpath="${XBPS_CROSS_BASE}/usr/lib" \ - --cpppath="${XBPS_CROSS_BASE}/usr/include" \ --prefix="/usr" \ $_scons_args } do_install() { scons install \ - --cc=$CC \ - --cxx=$CXX \ - --ld=$CXX \ - --libpath=${XBPS_CROSS_BASE}/usr/lib \ - --cpppath=${XBPS_CROSS_BASE}/usr/include \ --prefix="${DESTDIR}/usr" \ $_scons_args