| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/activerecord/activerecord-3.1.6.ebuild,v 1.1 2012/06/17 09:27:53 graaff Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
USE_RUBY="ruby18 ruby19 ree18"
|
| 7 |
|
| 8 |
# this is not null so that the dependencies will actually be filled
|
| 9 |
RUBY_FAKEGEM_TASK_TEST="test"
|
| 10 |
|
| 11 |
RUBY_FAKEGEM_TASK_DOC=""
|
| 12 |
RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.rdoc"
|
| 13 |
|
| 14 |
RUBY_FAKEGEM_GEMSPEC="activerecord.gemspec"
|
| 15 |
|
| 16 |
inherit ruby-fakegem
|
| 17 |
|
| 18 |
DESCRIPTION="Implements the ActiveRecord pattern (Fowler, PoEAA) for ORM"
|
| 19 |
HOMEPAGE="http://rubyforge.org/projects/activerecord/"
|
| 20 |
SRC_URI="http://github.com/rails/rails/tarball/v${PV} -> rails-${PV}.tgz"
|
| 21 |
|
| 22 |
LICENSE="MIT"
|
| 23 |
SLOT="3.1"
|
| 24 |
KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
| 25 |
IUSE="mysql postgres sqlite3"
|
| 26 |
|
| 27 |
RUBY_S="rails-rails-*/activerecord"
|
| 28 |
|
| 29 |
ruby_add_rdepend "~dev-ruby/activesupport-${PV}
|
| 30 |
~dev-ruby/activemodel-${PV}
|
| 31 |
>=dev-ruby/arel-2.2.3:2.1
|
| 32 |
>=dev-ruby/tzinfo-0.3.29
|
| 33 |
sqlite3? ( >=dev-ruby/sqlite3-ruby-1.3.4 )
|
| 34 |
mysql? ( >=dev-ruby/mysql2-0.3.6:0.3 )
|
| 35 |
postgres? ( >=dev-ruby/pg-0.11.0 )"
|
| 36 |
|
| 37 |
ruby_add_bdepend "
|
| 38 |
test? (
|
| 39 |
dev-ruby/bundler
|
| 40 |
~dev-ruby/actionpack-${PV}
|
| 41 |
>=dev-ruby/sqlite3-ruby-1.3.3
|
| 42 |
>=dev-ruby/mocha-0.9.5
|
| 43 |
virtual/ruby-test-unit
|
| 44 |
)"
|
| 45 |
|
| 46 |
all_ruby_prepare() {
|
| 47 |
# Remove items from the common Gemfile that we don't need for this
|
| 48 |
# test run. This also requires handling some gemspecs.
|
| 49 |
sed -i -e '/\(uglifier\|system_timer\|sdoc\|w3c_validators\|pg\|jquery-rails\|"mysql"\|ruby-prof\)/d' ../Gemfile || die
|
| 50 |
sed -i -e '/rack-ssl/d' ../railties/railties.gemspec || die
|
| 51 |
sed -i -e '/mail/d' ../actionmailer/actionmailer.gemspec || die
|
| 52 |
sed -i -e "s/, '< 1.3'//" ../activesupport/activesupport.gemspec || die
|
| 53 |
|
| 54 |
# Avoid tests depending on hash ordering
|
| 55 |
sed -i -e '/test_should_automatically_build_new_associated/,/ end/ s:^:#:' test/cases/nested_attributes_test.rb || die
|
| 56 |
}
|
| 57 |
|
| 58 |
each_ruby_test() {
|
| 59 |
case ${RUBY} in
|
| 60 |
*jruby)
|
| 61 |
;;
|
| 62 |
*)
|
| 63 |
if use sqlite3; then
|
| 64 |
${RUBY} -S rake test_sqlite3 || die "sqlite3 tests failed"
|
| 65 |
fi
|
| 66 |
;;
|
| 67 |
esac
|
| 68 |
}
|