summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/mongodb/Manifest1
-rw-r--r--dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch30
-rw-r--r--dev-db/mongodb/mongodb-3.2.0.ebuild174
3 files changed, 205 insertions, 0 deletions
diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest
index d1d69ed0c87f..ebaaf21c0c8e 100644
--- a/dev-db/mongodb/Manifest
+++ b/dev-db/mongodb/Manifest
@@ -7,3 +7,4 @@ DIST mongodb-src-r3.0.5.tar.gz 26332788 SHA256 05b16a7991aa65b1d396a3dc622107fba
DIST mongodb-src-r3.0.6.tar.gz 26241944 SHA256 609f6bd416ed11898b49406332b8ff301de239ba72df0bdbf1603233229c822d SHA512 1990e9011ae586e30aef28be58f9fc6d8b7f45b787dbde9785c82eff6fb0a70ea45152e450c032a898e6464bbb9b1683082f2a072ba874f7532e167330658175 WHIRLPOOL 4090cfb5912f81e6329d3c3680009037f22cd406611f78dc0ddd6fc9a63ee5261c7751fe83c60add2d5917f57b2a3c2796c48abb6f633157a8811d0571793a35
DIST mongodb-src-r3.0.7.tar.gz 26261343 SHA256 2d25bae7c3bfb3c0e168fcad526dc212da72faaeae6d1573db631cacb172a7e7 SHA512 183691c5dc137ea4b86d53d24d2935fd66ed8de60fbf5eca0a0a39c159be1f29043cd655cde1a213a98a76b2b3e6369dbccf790b02a1cc4b622c067ad3c0c91b WHIRLPOOL 986d962e76122142ca810eb7fe13ef66c88c7e354f066292836fc1207fa64c8bbb7fc49d1392db503c8a594d2593e2a19d831d7367462fcfa43eea38768e6323
DIST mongodb-src-r3.0.8.tar.gz 26245612 SHA256 3574f2f577e212ff1876485e1502c91f70f996fbbcc5a4657fe440ac76bd97a5 SHA512 3b8578ed2a6196cda0867d219214e1dc9fe95ecaa8320cdee3766c9a8a78e9cf66013769a3fbbf03ccf9a35d97e02a1eaa5fe8fc7429a0d76dd78486db7520ac WHIRLPOOL ded0b84b940c66b8a7ef6b363f179a4b2c1ddc23a3077b9cadb01f76c2a90956f0a720e713d4806db6132ac96b1026b82c2bf966ec3869af095e12590ea04d0e
+DIST mongodb-src-r3.2.0.tar.gz 26440220 SHA256 c6dd1d1670b86cbf02a531ddf7a7cda8f138d8733acce33766f174bd1e5ab2ee SHA512 4b321b582f5ec2613b869b003a02494c8a9e3b772b1f13898417b1e831c204468309a0e1785acd3b85c8a663cae91e55e44f53f8b74bd3a516b1e1471f606882 WHIRLPOOL c10639597303c122376d7387a4d5c9bdf6c44d9971f476fab72c85e78206ed256270d1a5e01e53aef4979127fdd03b3e5fbefa50ebf7639fa172723d6eee9737
diff --git a/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch b/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch
new file mode 100644
index 000000000000..1eb79d13980c
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.2.0-fix-scons.patch
@@ -0,0 +1,30 @@
+--- a/SConstruct 2015-12-02 20:01:34.000000000 +0100
++++ b/SConstruct 2015-12-27 17:06:45.563739544 +0100
+@@ -1371,7 +1371,6 @@
+ env.Append( CCFLAGS=["-fno-omit-frame-pointer",
+ "-fPIC",
+ "-fno-strict-aliasing",
+- "-ggdb",
+ "-pthread",
+ "-Wall",
+ "-Wsign-compare",
+@@ -1382,8 +1381,9 @@
+ if not has_option("disable-warnings-as-errors"):
+ env.Append( CCFLAGS=["-Werror"] )
+
+- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] )
+ env.Append( LINKFLAGS=["-fPIC", "-pthread"] )
++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] )
++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] )
+
+ # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program
+ # startup.
+@@ -1398,7 +1398,7 @@
+ env.Append( SHLINKFLAGS=["-Wl,-z,now"] )
+ env.Append( LINKFLAGS=["-rdynamic"] )
+
+- env.Append( LIBS=[] )
++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] )
+
+ #make scons colorgcc friendly
+ for key in ('HOME', 'TERM'):
diff --git a/dev-db/mongodb/mongodb-3.2.0.ebuild b/dev-db/mongodb/mongodb-3.2.0.ebuild
new file mode 100644
index 000000000000..ab7952ded7a2
--- /dev/null
+++ b/dev-db/mongodb/mongodb-3.2.0.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+SCONS_MIN_VERSION="2.3.0"
+CHECKREQS_DISK_BUILD="2400M"
+CHECKREQS_DISK_USR="512M"
+CHECKREQS_MEMORY="1024M"
+
+inherit eutils flag-o-matic multilib pax-utils scons-utils systemd user versionator check-reqs
+
+MY_P=${PN}-src-r${PV/_rc/-rc}
+
+DESCRIPTION="A high-performance, open source, schema-free document-oriented database"
+HOMEPAGE="http://www.mongodb.org"
+SRC_URI="https://fastdl.mongodb.org/src/${MY_P}.tar.gz"
+
+LICENSE="AGPL-3 Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug kerberos libressl mms-agent ssl test +tools"
+
+RDEPEND=">=app-arch/snappy-1.1.2
+ >=dev-cpp/yaml-cpp-0.5.1
+ >=dev-libs/boost-1.57[threads(+)]
+ >=dev-libs/libpcre-8.37[cxx]
+ dev-libs/snowball-stemmer
+ net-libs/libpcap
+ >=sys-libs/zlib-1.2.8
+ mms-agent? ( app-admin/mms-agent )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1g:0= )
+ libressl? ( dev-libs/libressl:= )
+ )"
+DEPEND="${RDEPEND}
+ >=sys-devel/gcc-4.8.2:*
+ sys-libs/ncurses
+ sys-libs/readline
+ debug? ( dev-util/valgrind )
+ kerberos? ( dev-libs/cyrus-sasl[kerberos] )
+ test? (
+ dev-python/pymongo
+ dev-python/pyyaml
+ )"
+PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then
+ ewarn "To upgrade an existing MongoDB deployment to 3.2, you must be"
+ ewarn "running a 3.0-series release. Please update to the latest 3.0"
+ ewarn "release before continuing if wish to keep your data."
+ fi
+}
+
+pkg_setup() {
+ enewgroup mongodb
+ enewuser mongodb -1 -1 /var/lib/${PN} mongodb
+
+ # Maintainer notes
+ #
+ # --use-system-tcmalloc is strongly NOT recommended:
+ # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/
+
+ scons_opts="--variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX)"
+ scons_opts+=" --disable-warnings-as-errors"
+ scons_opts+=" --use-system-boost"
+ scons_opts+=" --use-system-pcre"
+ scons_opts+=" --use-system-snappy"
+ scons_opts+=" --use-system-stemmer"
+ scons_opts+=" --use-system-yaml"
+ scons_opts+=" --use-system-zlib"
+
+ if use debug; then
+ scons_opts+=" --dbg=on"
+ fi
+
+ if use prefix; then
+ scons_opts+=" --cpppath=${EPREFIX}/usr/include"
+ scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)"
+ fi
+
+ if use kerberos; then
+ scons_opts+=" --use-sasl-client"
+ fi
+
+ if use ssl; then
+ scons_opts+=" --ssl"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-3.2.0-fix-scons.patch"
+}
+
+src_compile() {
+ # respect mongoDB upstream's basic recommendations
+ # see bug #536688 and #526114
+ if ! use debug; then
+ filter-flags '-m*'
+ filter-flags '-O?'
+ fi
+ escons ${scons_opts} core tools
+}
+
+src_install() {
+ escons ${scons_opts} --nostrip install --prefix="${ED}"/usr
+
+ for x in /var/{lib,log}/${PN}; do
+ keepdir "${x}"
+ fowners mongodb:mongodb "${x}"
+ done
+
+ doman debian/mongo*.1
+ dodoc README docs/building.md
+
+ newinitd "${FILESDIR}/${PN}.initd-r2" ${PN}
+ newconfd "${FILESDIR}/${PN}.confd-r2" ${PN}
+ newinitd "${FILESDIR}/${PN/db/s}.initd-r2" ${PN/db/s}
+ newconfd "${FILESDIR}/${PN/db/s}.confd-r2" ${PN/db/s}
+
+ insinto /etc
+ newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf
+ newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ insinto /etc/logrotate.d/
+ newins "${FILESDIR}/${PN}.logrotate" ${PN}
+
+ # see bug #526114
+ pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos}
+}
+
+pkg_preinst() {
+ # wrt bug #461466
+ if [[ "$(get_libdir)" == "lib64" ]]; then
+ rmdir "${ED}"/usr/lib/ &>/dev/null
+ fi
+}
+
+src_test() {
+ # this one test fails
+ rm jstests/core/repl_write_threads_start_param.js
+
+ ./buildscripts/resmoke.py --dbpathPrefix=test --suites core || die "Tests failed"
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then
+ ewarn "!! IMPORTANT !!"
+ ewarn " "
+ ewarn "${PN} configuration files have changed !"
+ ewarn " "
+ ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/manual/reference/configuration-options/"
+ ewarn " "
+ ewarn "Make sure you also follow the upgrading process :"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/"
+ ewarn " "
+ ewarn "MongoDB 3.0 introduces the WiredTiger storage engine."
+ ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it."
+ ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf"
+ ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger"
+ fi
+
+ ewarn "Make sure to read the release notes and follow the upgrade process:"
+ ewarn " https://docs.mongodb.org/manual/release-notes/3.2/"
+ ewarn " https://docs.mongodb.org/master/release-notes/3.2-upgrade/"
+ ewarn
+ ewarn " Starting in 3.2, MongoDB uses the WiredTiger as the default storage engine."
+}