From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q7k79-0004Av-Se for garchives@archives.gentoo.org; Thu, 07 Apr 2011 07:58:52 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 86B1E1C032; Thu, 7 Apr 2011 07:58:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 41B9C1C032 for ; Thu, 7 Apr 2011 07:58:44 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A9DC61B403E for ; Thu, 7 Apr 2011 07:58:43 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 1F76B80065 for ; Thu, 7 Apr 2011 07:58:43 +0000 (UTC) From: "Alexys Jacob" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexys Jacob" Message-ID: <7925c1631690a0d5eb74ab0c4d7ae32220efad6d.ultrabug@gentoo> Subject: [gentoo-commits] dev/ultrabug:master commit in: dev-db/mongodb/files/, dev-db/mongodb/ X-VCS-Repository: dev/ultrabug X-VCS-Files: dev-db/mongodb/Manifest dev-db/mongodb/files/mongodb-1.6.0-fix-scons.patch dev-db/mongodb/files/mongodb-1.8-fix-scons.patch dev-db/mongodb/files/mongodb.confd dev-db/mongodb/files/mongodb.initd dev-db/mongodb/mongodb-1.8.0.ebuild X-VCS-Directories: dev-db/mongodb/files/ dev-db/mongodb/ X-VCS-Committer: ultrabug X-VCS-Committer-Name: Alexys Jacob X-VCS-Revision: 7925c1631690a0d5eb74ab0c4d7ae32220efad6d Date: Thu, 7 Apr 2011 07:58:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 3fc6af28d648a2dbb190fd28a84e9ce5 commit: 7925c1631690a0d5eb74ab0c4d7ae32220efad6d Author: Ultrabug gentoo org> AuthorDate: Thu Apr 7 07:58:36 2011 +0000 Commit: Alexys Jacob gentoo org> CommitDate: Thu Apr 7 07:58:36 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/ultrabug.git;a= =3Dcommit;h=3D7925c163 add dev-db/mongodb --- dev-db/mongodb/Manifest | 6 ++ dev-db/mongodb/files/mongodb-1.6.0-fix-scons.patch | 22 ++++++ dev-db/mongodb/files/mongodb-1.8-fix-scons.patch | 27 +++++++ dev-db/mongodb/files/mongodb.confd | 11 +++ dev-db/mongodb/files/mongodb.initd | 45 ++++++++++++ dev-db/mongodb/mongodb-1.8.0.ebuild | 74 ++++++++++++++= ++++++ 6 files changed, 185 insertions(+), 0 deletions(-) diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest new file mode 100644 index 0000000..458514c --- /dev/null +++ b/dev-db/mongodb/Manifest @@ -0,0 +1,6 @@ +AUX mongodb-1.6.0-fix-scons.patch 913 RMD160 54b30020c2d1a0313e796f132d5= 89969d84f245d SHA1 c5473464452417be6a2bb2433b40bba336910fc1 SHA256 de2688= 2ff9adcf46eb2227e185f7d880549333f0e87703cdf984cd1c4612ffd9 +AUX mongodb-1.8-fix-scons.patch 1202 RMD160 e8901377280b9872e40237a1a795= 6c6044d86eaa SHA1 b82302776e9b5c4fa44c30eb88cd98b8120dcbaf SHA256 5f5f7c0= 75cdaaedaa549cdb26473273f88aef1c8fb8381d75a935a7d27431cb9 +AUX mongodb.confd 285 RMD160 cc5e3ab24a9880a19392a7416d23d1ae7a328e11 SH= A1 7c4b720ea5b0afd2fa88a6adc2d8a2e356691413 SHA256 8dfedbb433e11f8ed6ec81= 59ed5c02f94c22f86006cda21f0b2bb59ebe50b2ad +AUX mongodb.initd 1129 RMD160 92a89d9d71ffcdaba8f86f1a2902abddc9866147 S= HA1 2c83bfe4c5728ffc8b3dc37fd8d345d09c13f6b0 SHA256 c318a8ca1fe83c59df759= b2c70e0e0c22fe38cae49de6dbd1afa8399ef626e6a +DIST mongodb-src-r1.8.0.tar.gz 1718213 RMD160 e80638eacc816869a1284ee135= b1c9e9885c1684 SHA1 1f8d596da667af10721c6602071e824bc4b8a0f3 SHA256 4c299= 2e49586d4b4a513937286fd8813f4cef44686e67275c4e96489e4456a96 +EBUILD mongodb-1.8.0.ebuild 1812 RMD160 80b475453be9a13413f4a2da8081adef= 7ed8fc0a SHA1 7124877abafc70eb7659a913508727a3713b9990 SHA256 97ebc14d66b= 1d3d41bebe35f3baa4e97aa61c25527a4cc8276636dd550d9c6c7 diff --git a/dev-db/mongodb/files/mongodb-1.6.0-fix-scons.patch b/dev-db/= mongodb/files/mongodb-1.6.0-fix-scons.patch new file mode 100644 index 0000000..7122df8 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-1.6.0-fix-scons.patch @@ -0,0 +1,22 @@ +diff -urN mongodb-src-r1.6.0.orig/SConstruct mongodb-src-r1.6.0/SConstru= ct +--- mongodb-src-r1.6.0.orig/SConstruct 2010-08-05 15:32:06.000000000 +02= 00 ++++ mongodb-src-r1.6.0/SConstruct 2010-08-16 16:12:52.000000000 +0200 +@@ -745,8 +745,7 @@ +=20 + if nix: + env.Append( CPPFLAGS=3D"-fPIC -fno-strict-aliasing -ggdb -pthread -= Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" ) +- if linux: +- env.Append( CPPFLAGS=3D" -Werror " ) ++ env.Append( CXXFLAGS=3Dos.environ['CXXFLAGS']) + env.Append( CXXFLAGS=3D" -Wnon-virtual-dtor " ) + env.Append( LINKFLAGS=3D" -fPIC -pthread -rdynamic" ) + env.Append( LIBS=3D[] ) +@@ -757,8 +756,6 @@ + if debugBuild: + env.Append( CPPFLAGS=3D" -O0 -fstack-protector " ); + env['ENV']['GLIBCXX_FORCE_NEW'] =3D 1; # play nice with valgrin= d +- else: +- env.Append( CPPFLAGS=3D" -O3" ) +=20 + if debugLogging: + env.Append( CPPFLAGS=3D" -D_DEBUG" ); diff --git a/dev-db/mongodb/files/mongodb-1.8-fix-scons.patch b/dev-db/mo= ngodb/files/mongodb-1.8-fix-scons.patch new file mode 100644 index 0000000..d9c5b23 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-1.8-fix-scons.patch @@ -0,0 +1,27 @@ +--- a/SConstruct 2011-04-05 09:24:54.828004785 +0200 ++++ b/SConstruct 2011-04-05 09:26:56.651400663 +0200 +@@ -670,9 +670,7 @@ + =20 + env.Append( CPPFLAGS=3D"-fPIC -fno-strict-aliasing -ggdb -pthread -= Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" ) + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet +- if linux: +- env.Append( CPPFLAGS=3D" -Werror " ) +- env.Append( CPPFLAGS=3D" -fno-builtin-memcmp " ) # glibc's memc= mp is faster than gcc's ++ env.Append( CXXFLAGS=3Dos.environ['CXXFLAGS']) + env.Append( CXXFLAGS=3D" -Wnon-virtual-dtor " ) + env.Append( LINKFLAGS=3D" -fPIC -pthread -rdynamic" ) + env.Append( LIBS=3D[] ) +@@ -687,13 +685,6 @@ + if debugBuild: + env.Append( CPPFLAGS=3D" -O0 -fstack-protector " ); + env['ENV']['GLIBCXX_FORCE_NEW'] =3D 1; # play nice with valgrin= d +- else: +- env.Append( CPPFLAGS=3D" -O3" ) +- #env.Append( CPPFLAGS=3D" -fprofile-generate" ) +- #env.Append( LINKFLAGS=3D" -fprofile-generate" ) +- # then: +- #env.Append( CPPFLAGS=3D" -fprofile-use" ) +- #env.Append( LINKFLAGS=3D" -fprofile-use" ) =20 +=20 + if debugLogging: + env.Append( CPPFLAGS=3D" -D_DEBUG" ); diff --git a/dev-db/mongodb/files/mongodb.confd b/dev-db/mongodb/files/mo= ngodb.confd new file mode 100644 index 0000000..bc16601 --- /dev/null +++ b/dev-db/mongodb/files/mongodb.confd @@ -0,0 +1,11 @@ +# Mongodb essentials +MONGODB_EXEC=3D"/usr/bin/mongod" +MONGODB_DATA=3D"/var/lib/mongodb" +MONGODB_USER=3D"mongodb" +MONGODB_PID_FILE=3D"/var/run/mongodb/mongodb.pid" + +MONGODB_IP=3D"127.0.0.1" +MONGODB_PORT=3D"27017" + +# Set extra options here, such as disabling the admin web server +MONGODB_OPTIONS=3D"" diff --git a/dev-db/mongodb/files/mongodb.initd b/dev-db/mongodb/files/mo= ngodb.initd new file mode 100644 index 0000000..482e311 --- /dev/null +++ b/dev-db/mongodb/files/mongodb.initd @@ -0,0 +1,45 @@ +#!/sbin/runscript +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/files/mongodb.initd,v = 1.2 2010/05/21 06:39:57 lu_zero Exp $ + +depend() { + need net +} + +start() { + ebegin "Starting ${SVCNAME}" + if [ -z "$MONGODB_PID_FILE" ] ; then + ewarn "MONGODB_PID_FILE must be set" + return -1 + fi + if [ -z "$MONGODB_USER" ] ; then + ewarn "ERROR: MONGODB_USER must be set" + return -1 + fi + + args=3D"" + if [ -n "$MONGODB_DATA" ] ; then + args=3D"$args --dbpath $MONGODB_DATA" + fi + if [ -n "$MONGODB_PORT" ] ; then + args=3D"$args --port $MONGODB_PORT" + fi + if [ -n "$MONGODB_IP" ] ; then + args=3D"$args --bind_ip $MONGODB_IP" + fi + if [ -n "$MONGODB_OPTIONS" ] ; then + args=3D"$args $MONGODB_OPTIONS" + fi + + start-stop-daemon --background --start --user ${MONGODB_USER} --pidfile= \ + "${MONGODB_PID_FILE}" --make-pidfile --exec ${MONGODB_EXEC} \ + -- ${args} run + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --exec ${MONGODB_EXEC} --pidfile ${MONGODB_PID= _FILE} + eend $? "Failed to stop ${SVCNAME}" +} diff --git a/dev-db/mongodb/mongodb-1.8.0.ebuild b/dev-db/mongodb/mongodb= -1.8.0.ebuild new file mode 100644 index 0000000..483edf4 --- /dev/null +++ b/dev-db/mongodb/mongodb-1.8.0.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/mongodb/mongodb-1.6.0.ebuild,v= 1.2 2011/02/02 18:14:42 phajdan.jr Exp $ + +EAPI=3D3 + +inherit eutils versionator + +MY_PATCHVER=3D$(get_version_component_range 1-2) +MY_P=3D"${PN}-src-r${PV}" + +DESCRIPTION=3D"A high-performance, open source, schema-free document-ori= ented database" +HOMEPAGE=3D"http://www.mongodb.org" +SRC_URI=3D"http://downloads.mongodb.org/src/${MY_P}.tar.gz" + +LICENSE=3D"AGPL-3 Apache-2.0" +SLOT=3D"0" +KEYWORDS=3D"~amd64 ~x86" +IUSE=3D"v8" + +RDEPEND=3D"!v8? ( dev-lang/spidermonkey ) + v8? ( dev-lang/v8 ) + dev-libs/boost + dev-libs/libpcre" +DEPEND=3D"${RDEPEND} + >=3Ddev-util/scons-1.2.0-r1 + sys-libs/readline + sys-libs/ncurses" + +S=3D"${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup mongodb + enewuser mongodb -1 -1 /var/lib/${PN} mongodb + + scons_opts=3D"${MAKEOPTS}" + if use v8; then + scons_opts+=3D" --usev8" + else + scons_opts+=3D" --usesm" + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-1.8-fix-scons.patch" + if use v8; then + # Suppress known test failure with v8: + # http://jira.mongodb.org/browse/SERVER-1147 + sed -i -e '/add< NumberLong >/d' dbtests/jstests.cpp || die + fi +} + +src_compile() { + scons ${scons_opts} all || die "Compile failed" +} + +src_install() { + scons ${scons_opts} --full --nostrip install --prefix=3D"${D}"/usr || d= ie "Install failed" + + for x in /var/{lib,log,run}/${PN}; do + dodir "${x}" || die "Install failed" + fowners mongodb:mongodb "${x}" + done + + doman debian/mongo*.1 || die "Install failed" + dodoc README docs/building.md + + newinitd "${FILESDIR}/${PN}.initd" ${PN} || die "Install failed" + newconfd "${FILESDIR}/${PN}.confd" ${PN} || die "Install failed" +} + +src_test() { + scons ${scons_opts} smoke --smokedbprefix=3D'testdir' test || die "Test= s failed" +}