diff options
author | Ian Stakenvicius <axs@gentoo.org> | 2012-10-09 18:54:01 +0000 |
---|---|---|
committer | Ian Stakenvicius <axs@gentoo.org> | 2012-10-09 18:54:01 +0000 |
commit | 95ddfc3705023e915669c17669d53055df30398a (patch) | |
tree | 983572f46b9fb63c04e0bb3b47539482bf2aa61e /dev-db/mongodb | |
parent | Stable for amd64, wrt bug #437664 (diff) | |
download | gentoo-2-95ddfc3705023e915669c17669d53055df30398a.tar.gz gentoo-2-95ddfc3705023e915669c17669d53055df30398a.tar.bz2 gentoo-2-95ddfc3705023e915669c17669d53055df30398a.zip |
Use upstream embedded spidermonkey (bug 390631); build against boost indeoendent of eselect
(Portage version: 2.1.11.9/cvs/Linux x86_64)
Diffstat (limited to 'dev-db/mongodb')
-rw-r--r-- | dev-db/mongodb/ChangeLog | 10 | ||||
-rw-r--r-- | dev-db/mongodb/files/mongodb-2.2-r1-fix-boost.patch | 13 | ||||
-rw-r--r-- | dev-db/mongodb/files/mongodb-2.2-r1-fix-scons.patch | 46 | ||||
-rw-r--r-- | dev-db/mongodb/mongodb-2.2.0-r1.ebuild | 119 |
4 files changed, 187 insertions, 1 deletions
diff --git a/dev-db/mongodb/ChangeLog b/dev-db/mongodb/ChangeLog index f06c6d1af860..813587746b16 100644 --- a/dev-db/mongodb/ChangeLog +++ b/dev-db/mongodb/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-db/mongodb # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/ChangeLog,v 1.46 2012/10/07 14:59:52 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/ChangeLog,v 1.47 2012/10/09 18:54:01 axs Exp $ + +*mongodb-2.2.0-r1 (09 Oct 2012) + + 09 Oct 2012; Ian Stakenvicius <axs@gentoo.org> + +files/mongodb-2.2-r1-fix-boost.patch, +files/mongodb-2.2-r1-fix-scons.patch, + +mongodb-2.2.0-r1.ebuild: + Use upstream embedded spidermonkey (bug 390631); build against boost + indeoendent of eselect 07 Oct 2012; Fabian Groffen <grobian@gentoo.org> mongodb-2.2.0.ebuild: Fix for Prefix diff --git a/dev-db/mongodb/files/mongodb-2.2-r1-fix-boost.patch b/dev-db/mongodb/files/mongodb-2.2-r1-fix-boost.patch new file mode 100644 index 000000000000..b6c9a1eb55df --- /dev/null +++ b/dev-db/mongodb/files/mongodb-2.2-r1-fix-boost.patch @@ -0,0 +1,13 @@ +--- mongodb-src-r2.2.0/SConstruct.old 2012-10-09 12:41:25.000000000 -0400 ++++ mongodb-src-r2.2.0/SConstruct 2012-10-09 12:41:41.000000000 -0400 +@@ -171,8 +171,8 @@ + add_option( "extrapathdyn", "comma separated list of add'l paths (--extrapath /opt/foo/,/foo) dynamic linking" , 1 , True ) + add_option( "extralib", "comma separated list of libraries (--extralib js_static,readline" , 1 , True ) + +-add_option( "boost-compiler", "compiler used for boost (gcc41)" , 1 , True , "boostCompiler" ) +-add_option( "boost-version", "boost version for linking(1_38)" , 1 , True , "boostVersion" ) ++add_option( "boost-compiler", "compiler used for boost (gcc41)" , 1 , False , "boostCompiler" ) ++add_option( "boost-version", "boost version for linking(1_38)" , 1 , False , "boostVersion" ) + + add_option( "no-glibc-check" , "don't check for new versions of glibc" , 0 , False ) + diff --git a/dev-db/mongodb/files/mongodb-2.2-r1-fix-scons.patch b/dev-db/mongodb/files/mongodb-2.2-r1-fix-scons.patch new file mode 100644 index 000000000000..2d08fb454dfa --- /dev/null +++ b/dev-db/mongodb/files/mongodb-2.2-r1-fix-scons.patch @@ -0,0 +1,46 @@ +--- a/SConstruct 2012-08-29 16:21:35.107094792 +0200 ++++ b/SConstruct 2012-08-29 19:09:16.964893217 +0200 +@@ -677,7 +677,6 @@ + # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. + env.Append( CCFLAGS=["-fPIC", + "-fno-strict-aliasing", +- "-ggdb", + "-pthread", + "-Wall", + "-Wsign-compare", +@@ -685,14 +684,15 @@ + "-Winvalid-pch"] ) + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet + if linux: +- env.Append( CCFLAGS=["-Werror", "-pipe"] ) ++ # env.Append( CPPDEFINES=["XP_UNIX=1"] ) + if not has_option('clang'): + env.Append( CCFLAGS=["-fno-builtin-memcmp"] ) # glibc's memcmp is faster than gcc's + + env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] ) +- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] ) ++ env.Append( CXXFLAGS=os.environ['CXXFLAGS']) ++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) + env.Append( LINKFLAGS=["-fPIC", "-pthread", "-rdynamic"] ) +- env.Append( LIBS=[] ) ++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy'] ) + + #make scons colorgcc friendly + for key in ('HOME', 'TERM'): +@@ -703,6 +703,7 @@ + + if linux and has_option( "sharedclient" ): + env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " ) ++ env.Append( SHLINKFLAGS=" -Wl,-soname=libmongoclient.so " ) + + if linux and has_option( "gcov" ): + env.Append( CXXFLAGS=" -fprofile-arcs -ftest-coverage " ) +@@ -712,7 +713,7 @@ + env.Append( CCFLAGS=["-O0", "-fstack-protector"] ) + env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind + else: +- env.Append( CCFLAGS=["-O3"] ) ++ env.Append( CXXFLAGS=["-O3"] ) + + if debugLogging: + env.Append( CPPDEFINES=["_DEBUG"] ); diff --git a/dev-db/mongodb/mongodb-2.2.0-r1.ebuild b/dev-db/mongodb/mongodb-2.2.0-r1.ebuild new file mode 100644 index 000000000000..dbe5590cb1d7 --- /dev/null +++ b/dev-db/mongodb/mongodb-2.2.0-r1.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/mongodb-2.2.0-r1.ebuild,v 1.1 2012/10/09 18:54:01 axs Exp $ + +EAPI=4 +SCONS_MIN_VERSION="1.2.0" +BOOST_MAX_SLOT="1.49" +inherit eutils boost-utils flag-o-matic multilib pax-utils scons-utils user versionator + +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="http://downloads.mongodb.org/src/${MY_P}.tar.gz + mms-agent? ( http://dev.gentoo.org/~ultrabug/20120830-10gen-mms-agent.zip )" + +LICENSE="AGPL-3 Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="mms-agent static-libs v8" + +PDEPEND="mms-agent? ( dev-python/pymongo )" +RDEPEND=" + v8? ( dev-lang/v8 ) + <dev-libs/boost-1.50 + dev-libs/libpcre[cxx] + dev-util/google-perftools + net-libs/libpcap + app-arch/snappy" +DEPEND="${RDEPEND} + sys-libs/readline + sys-libs/ncurses" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup mongodb + enewuser mongodb -1 -1 /var/lib/${PN} mongodb + + scons_opts=" --cc=$(tc-getCC) --cxx=$(tc-getCXX)" + scons_opts+=" --use-system-tcmalloc" + scons_opts+=" --use-system-pcre" + scons_opts+=" --use-system-snappy" + scons_opts+=" --use-system-boost" + + if use v8; then + scons_opts+=" --usev8" + else + scons_opts+=" --usesm" + fi + + local boostver=$(boost-utils_get_best_slot) + scons_opts+=" --boost-version=${boostver/./_}" + append-cxxflags "-I$(boost-utils_get_includedir)" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.2-r1-fix-scons.patch" + epatch "${FILESDIR}/${PN}-2.2-r1-fix-boost.patch" + + # FIXME: apply only this fix [1] on x86 boxes as it breaks /usr/lib symlink + # on amd64 machines [2]. + # [1] https://jira.mongodb.org/browse/SERVER-5575 + # [2] https://bugs.gentoo.org/show_bug.cgi?id=434664 + if use !prefix && [[ "$(get_libdir)" == "lib" ]]; then + epatch "${FILESDIR}/${PN}-2.2-fix-x86client.patch" + fi +} + +src_compile() { + escons ${scons_opts} all +} + +src_install() { + escons ${scons_opts} --full --nostrip install --prefix="${ED}"/usr + + use static-libs || rm "${ED}/usr/$(get_libdir)/libmongoclient.a" + + use v8 && pax-mark m "${ED}"/usr/bin/{mongo,mongod} + + for x in /var/{lib,log,run}/${PN}; do + keepdir "${x}" + fowners mongodb:mongodb "${x}" + done + + doman debian/mongo*.1 + dodoc README docs/building.md + + newinitd "${FILESDIR}/${PN}.initd" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + newinitd "${FILESDIR}/${PN/db/s}.initd" ${PN/db/s} + newconfd "${FILESDIR}/${PN/db/s}.confd" ${PN/db/s} + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + if use mms-agent; then + local MY_PN="mms-agent" + local MY_D="/opt/${MY_PN}" + insinto ${MY_D} + doins "${WORKDIR}/${MY_PN}/"* + fowners -R mongodb:mongodb ${MY_D} + newinitd "${FILESDIR}/${MY_PN}.initd" ${MY_PN} + newconfd "${FILESDIR}/${MY_PN}.confd" ${MY_PN} + fi +} + +src_test() { + escons ${scons_opts} test + "${S}"/test --dbpath=unittest || die +} + +pkg_postinst() { + if [[ ${REPLACING_VERSIONS} < 1.8 ]]; then + ewarn "You just upgraded from a previous version of mongodb !" + ewarn "Make sure you run 'mongod --upgrade' before using this version." + fi + elog "Journaling is now enabled by default, see /etc/conf.d/${PN}" +} |