diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-02-22 23:56:43 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2012-02-22 23:56:43 +0000 |
commit | dd28b0f66579debdea44f65aa0273f173eec3597 (patch) | |
tree | 2d04e7e6037d3551f0b528be1df4044f45cbda84 | |
parent | Version bump, adding Python 3 support. (diff) | |
download | historical-dd28b0f66579debdea44f65aa0273f173eec3597.tar.gz historical-dd28b0f66579debdea44f65aa0273f173eec3597.tar.bz2 historical-dd28b0f66579debdea44f65aa0273f173eec3597.zip |
Version bump.
Package-Manager: portage-2.2.0_alpha88/cvs/Linux x86_64
-rw-r--r-- | dev-ruby/bson/ChangeLog | 9 | ||||
-rw-r--r-- | dev-ruby/bson/bson-1.6.0.ebuild | 110 | ||||
-rw-r--r-- | dev-ruby/mongo/ChangeLog | 9 | ||||
-rw-r--r-- | dev-ruby/mongo/mongo-1.6.0.ebuild | 46 | ||||
-rw-r--r-- | dev-ruby/mongoid/ChangeLog | 8 | ||||
-rw-r--r-- | dev-ruby/mongoid/files/mongoid-2.4.5-gentoo.patch | 31 | ||||
-rw-r--r-- | dev-ruby/mongoid/mongoid-2.4.5.ebuild | 77 |
7 files changed, 285 insertions, 5 deletions
diff --git a/dev-ruby/bson/ChangeLog b/dev-ruby/bson/ChangeLog index 65135c3e1183..e91d26e93f6d 100644 --- a/dev-ruby/bson/ChangeLog +++ b/dev-ruby/bson/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-ruby/bson -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/bson/ChangeLog,v 1.1 2011/12/28 23:47:54 flameeyes Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/bson/ChangeLog,v 1.2 2012/02/22 23:55:46 flameeyes Exp $ + +*bson-1.6.0 (22 Feb 2012) + + 22 Feb 2012; Diego E. Pettenò <flameeyes@gentoo.org> +bson-1.6.0.ebuild: + Version bump. *bson-1.5.2 (28 Dec 2011) diff --git a/dev-ruby/bson/bson-1.6.0.ebuild b/dev-ruby/bson/bson-1.6.0.ebuild new file mode 100644 index 000000000000..5a997ee1ef2d --- /dev/null +++ b/dev-ruby/bson/bson-1.6.0.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/bson/bson-1.6.0.ebuild,v 1.1 2012/02/22 23:55:46 flameeyes Exp $ + +EAPI=4 +# ruby19 → test_exeption_on_using_unsupported_date_class fails +# jruby → support needs to be written properly +USE_RUBY="ruby18 ree18" + +RUBY_FAKEGEM_TASK_DOC="moot" # we do it manually, but still declare it +RUBY_FAKEGEM_DOCDIR="html" +RUBY_FAKEGEM_EXTRADOC="" + +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" + +GITHUB_USER="mongodb" +GITHUB_PROJECT="mongo-ruby-driver" +RUBY_S="${GITHUB_USER}-${GITHUB_PROJECT}-*" + +inherit ruby-fakegem + +DESCRIPTION="A Ruby BSON implementation for MongoDB. (Includes binary C-based extension.)" +HOMEPAGE="http://www.mongodb.org/" +SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}/tarball/${PV} -> ${GITHUB_PROJECT}-${PV}.tar.gz" + +LICENSE="APSL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" + +ruby_add_bdepend \ + "test? ( + dev-ruby/rake + dev-ruby/shoulda + dev-ruby/mocha + dev-ruby/test-unit:2 + ) + doc? ( virtual/ruby-rdoc )" + +all_ruby_prepare() { + # remove the stuff that is actually part of dev-ruby/mongo + rm -rf {lib,bin}/mongo* +} + +each_ruby_configure() { + case ${RUBY} in + */ruby18|*/ruby19|*/rubyee18) + ${RUBY} -C ext/cbson extconf.rb || die "extconf.rb failed" + ;; + */jruby) + ${RUBY} -S rake build:java || die "rake build:java failed" + ;; + esac +} + +each_ruby_compile() { + case ${RUBY} in + */ruby18|*/ruby19|*/rubyee18) + emake -C ext/cbson CFLAGS="${CFLAGS} -fPIC" archflag="${LDFLAGS}" + mkdir lib/bson_ext + cp ext/cbson/*.so lib/bson_ext || die + ;; + */jruby) + die "missing in ebuild" + ;; + esac +} + +all_ruby_compile() { + # Trying to get the Rakefile to build the sources is more trouble + # than it's worth, do it manually instead. + rdoc --op html --inline-source lib/**/*.rb || die "rdoc failed" +} + +each_ruby_test() { + case ${RUBY} in + */ruby18|*/ruby19|*/rubyee18) + C_EXT=true ${RUBY} -S rake test:bson || die "tests failed" + ;; + esac + + ${RUBY} -S rake test:bson || die "tests failed" +} + +each_ruby_install() { + # we have to set the library path here because the gemspec tries to + # load bson itself, and would fail without that. + RUBYLIB="lib" \ + each_fakegem_install + + # and now we create the simulated gem for bson_ext; we create a file + # bson_ext.rb within ext so that we don't have to change the + # bson_ext.gemspec file, and at the same time we ensure that bson + # gem is loaded when loading bson_ext. + dodir $(ruby_fakegem_gemsdir)/gems/bson_ext-${PV}/ext + cat - <<EOF > "${D}/$(ruby_fakegem_gemsdir)/gems/bson_ext-${PV}/ext/bson_ext.rb" +require 'bson' +EOF + + RUBYLIB="lib" \ + RUBY_FAKEGEM_NAME=bson_ext \ + RUBY_FAKEGEM_GEMSPEC=bson_ext.gemspec \ + ruby_fakegem_install_gemspec +} + +pkg_postinst() { + elog "Unlike upstream setup, we do not split bson and bson_ext gem." + elog "This means that for all the supported targets, the C-based extension" + elog "is installed by this package, and is available transparently." +} diff --git a/dev-ruby/mongo/ChangeLog b/dev-ruby/mongo/ChangeLog index a8d1daa31f3c..c96ab7ec3819 100644 --- a/dev-ruby/mongo/ChangeLog +++ b/dev-ruby/mongo/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-ruby/mongo -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/mongo/ChangeLog,v 1.1 2011/12/28 23:56:06 flameeyes Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/mongo/ChangeLog,v 1.2 2012/02/22 23:56:16 flameeyes Exp $ + +*mongo-1.6.0 (22 Feb 2012) + + 22 Feb 2012; Diego E. Pettenò <flameeyes@gentoo.org> +mongo-1.6.0.ebuild: + Version bump. *mongo-1.5.2 (28 Dec 2011) diff --git a/dev-ruby/mongo/mongo-1.6.0.ebuild b/dev-ruby/mongo/mongo-1.6.0.ebuild new file mode 100644 index 000000000000..d044d3bee894 --- /dev/null +++ b/dev-ruby/mongo/mongo-1.6.0.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/mongo/mongo-1.6.0.ebuild,v 1.1 2012/02/22 23:56:16 flameeyes Exp $ + +EAPI=4 + +USE_RUBY="ruby18 ree18" + +RUBY_FAKEGEM_TASK_TEST="test:unit" + +RUBY_FAKEGEM_TASK_DOC="rdoc" +RUBY_FAKEGEM_DOCDIR="html" +RUBY_FAKEGEM_EXTRADOC="" + +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" + +GITHUB_USER="mongodb" +GITHUB_PROJECT="mongo-ruby-driver" +RUBY_S="${GITHUB_USER}-${GITHUB_PROJECT}-*" + +inherit ruby-fakegem + +DESCRIPTION="A Ruby driver for MongoDB." +HOMEPAGE="http://www.mongodb.org/" +SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}/tarball/${PV} -> ${GITHUB_PROJECT}-${PV}.tar.gz" + +LICENSE="APSL-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" + +# This is the same source package as bson, so keep them the same +# version, but not revision +ruby_add_rdepend "~dev-ruby/bson-${PV}" + +ruby_add_bdepend \ + "test? ( + dev-ruby/rake + dev-ruby/shoulda + dev-ruby/mocha + )" + +all_ruby_prepare() { + # remove the stuff that is actually part of dev-ruby/bson + rm -rf lib/bson* bin/{b2j,j2b}son +} diff --git a/dev-ruby/mongoid/ChangeLog b/dev-ruby/mongoid/ChangeLog index 4e847576dcf4..1bda9dabcbb2 100644 --- a/dev-ruby/mongoid/ChangeLog +++ b/dev-ruby/mongoid/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-ruby/mongoid # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/mongoid/ChangeLog,v 1.6 2012/02/13 18:37:19 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/mongoid/ChangeLog,v 1.7 2012/02/22 23:56:43 flameeyes Exp $ + +*mongoid-2.4.5 (22 Feb 2012) + + 22 Feb 2012; Diego E. Pettenò <flameeyes@gentoo.org> + +files/mongoid-2.4.5-gentoo.patch, +mongoid-2.4.5.ebuild: + Version bump. *mongoid-2.4.4 (13 Feb 2012) diff --git a/dev-ruby/mongoid/files/mongoid-2.4.5-gentoo.patch b/dev-ruby/mongoid/files/mongoid-2.4.5-gentoo.patch new file mode 100644 index 000000000000..96b067815e3a --- /dev/null +++ b/dev-ruby/mongoid/files/mongoid-2.4.5-gentoo.patch @@ -0,0 +1,31 @@ +From 78742c815c15a2fd839705e9cd832479a5729f3b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@flameeyes.eu> +Date: Mon, 23 Jan 2012 02:10:41 +0100 +Subject: [PATCH] Add one missing replacement of localhost vs envvar +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + +Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu> +--- + .../mongoid/config/replset_database_spec.rb | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/spec/functional/mongoid/config/replset_database_spec.rb b/spec/functional/mongoid/config/replset_database_spec.rb +index 6f24971..e295422 100644 +--- a/spec/functional/mongoid/config/replset_database_spec.rb ++++ b/spec/functional/mongoid/config/replset_database_spec.rb +@@ -32,7 +32,8 @@ describe Mongoid::Config::ReplsetDatabase do + + it "does not modify the options in place" do + options["test"]["hosts"].should eq( +- [["localhost", 27017], ["localhost", 27017]] ++ [[ENV["MONGOID_SPEC_HOST"], ENV["MONGOID_SPEC_PORT"].to_i], ++ [ENV["MONGOID_SPEC_HOST"], ENV["MONGOID_SPEC_PORT"].to_i]] + ) + end + end +-- +1.7.8.4 + diff --git a/dev-ruby/mongoid/mongoid-2.4.5.ebuild b/dev-ruby/mongoid/mongoid-2.4.5.ebuild new file mode 100644 index 000000000000..5837e9b0ef47 --- /dev/null +++ b/dev-ruby/mongoid/mongoid-2.4.5.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/mongoid/mongoid-2.4.5.ebuild,v 1.1 2012/02/22 23:56:43 flameeyes Exp $ + +EAPI=4 +USE_RUBY="ruby18" + +#RUBY_FAKEGEM_TASK_DOC="" +# functional testing crashes Ruby from within Portage, but works +# outside of it, needs to be investigated thoroughly, but at least +# unit testing works. +RUBY_FAKEGEM_TASK_TEST="spec:unit spec:functional" + +RUBY_FAKEGEM_EXTRADOC="README.md" + +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" + +GITHUB_USER="${PN}" +GITHUB_PROJECT="${PN}" +RUBY_S="${GITHUB_USER}-${GITHUB_PROJECT}-*" + +inherit ruby-fakegem + +DESCRIPTION="ODM (Object Document Mapper) Framework for MongoDB" +HOMEPAGE="http://mongoid.org/" +SRC_URI="https://github.com/${GITHUB_USER}/${GITHUB_PROJECT}/tarball/v${PV} -> ${GITHUB_PROJECT}-${PV}.tar.gz" +LICENSE="MIT" + +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" + +ruby_add_rdepend " + >=dev-ruby/activemodel-3.1 + >=dev-ruby/mongo-1.6 + >=dev-ruby/tzinfo-0.3.22 +" + +ruby_add_bdepend " + test? ( + dev-ruby/ammeter + dev-ruby/mocha + dev-ruby/rdoc + dev-ruby/rspec + dev-util/watchr + )" + +DEPEND+=" test? ( dev-db/mongodb )" + +all_ruby_prepare() { + # remove references to bundler, as the gemfile does not add anything + # we need to care about. + sed -i -e '/[bB]undler/d' Rakefile || die + # remove the Gemfile as well or it'll try to load it during testing + rm Gemfile || die + + epatch "${FILESDIR}"/${P}-gentoo.patch +} + +each_ruby_test() { + mkdir "${T}/mongodb_$(basename $RUBY)" + mongod --port 27017 --dbpath "${T}/mongodb_$(basename $RUBY)" \ + --noprealloc --noauth --nohttpinterface --nounixsocket --nojournal \ + --bind_ip 127.255.255.254 & + mongod_pid=$! + failed=0 + + sleep 2 + + export MONGOID_SPEC_HOST="127.255.255.254" + export MONGOID_SPEC_PORT="27017" + + ${RUBY} -S rake ${RUBY_FAKEGEM_TASK_TEST} || failed=1 + kill "${mongod_pid}" + + [[ "${failed}" == "1" ]] && die "tests failed" +} |