/[gentoo-x86]/dev-ruby/activerecord/activerecord-4.0.13.ebuild
Gentoo

Contents of /dev-ruby/activerecord/activerecord-4.0.13.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Jun 9 14:39:00 2015 UTC (2 years, 7 months ago) by mrueg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +4 -4 lines
Rename sqlite3 USEflag to sqlite. Fixes bug #548654.

(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key )

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-ruby/activerecord/activerecord-4.0.13.ebuild,v 1.1 2015/01/07 07:05:49 graaff Exp $
4
5 EAPI=5
6 USE_RUBY="ruby19 ruby20 ruby21"
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 versionator
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/archive/v${PV}.tar.gz -> rails-${PV}.tgz"
21
22 LICENSE="MIT"
23 SLOT="$(get_version_component_range 1-2)"
24 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86"
25 IUSE="mysql postgres sqlite"
26
27 RUBY_S="rails-${PV}/${PN}"
28
29 ruby_add_rdepend "~dev-ruby/activesupport-${PV}
30 ~dev-ruby/activemodel-${PV}
31 >=dev-ruby/activerecord-deprecated_finders-1.0.2:1.0
32 >=dev-ruby/arel-4.0.2:4.0
33 sqlite? ( >=dev-ruby/sqlite3-1.3.5 )
34 mysql? ( >=dev-ruby/mysql2-0.3.10:0.3 )
35 postgres? ( >=dev-ruby/pg-0.11.0 )
36 !<dev-ruby/protected_attributes-1.0.8"
37
38 ruby_add_bdepend "
39 test? (
40 dev-ruby/bundler
41 ~dev-ruby/actionpack-${PV}
42 >=dev-ruby/sqlite3-1.3.5
43 dev-ruby/mocha:0.13
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'\|journey\|ruby-prof\|benchmark-ips\|kindlerb\|turbolinks\|coffee-rails\|debugger\|redcarpet\)/d" ../Gemfile || die
50 sed -i -e '/rack-ssl/d' -e 's/~> 3.4/>= 3.4/' ../railties/railties.gemspec || die
51 sed -i -e '/mail/d' ../actionmailer/actionmailer.gemspec || die
52
53 sed -i -e '/bcrypt/ s/3.0.0/3.0/' ../Gemfile || die
54
55 # Add back json in the Gemfile because we dropped some dependencies
56 # earlier that implicitly required it.
57 sed -i -e '$agem "json"' ../Gemfile || die
58
59 # Avoid test depending on mysql adapter which we don't support for
60 # this Rails version to simplify our dependencies.
61 rm test/cases/connection_specification/resolver_test.rb || die
62
63 # Avoid single test using mysql dependencies.
64 rm test/cases/invalid_connection_test.rb || die
65
66 # Avoid test depending on specific sqlite3 binding or database version.
67 sed -i -e '/test_uniqueness_violations_are_translated/,/^ end/ s:^:#:' test/cases/adapter_test.rb || die
68 }
69
70 each_ruby_test() {
71 case ${RUBY} in
72 *jruby)
73 ;;
74 *)
75 if use sqlite; then
76 ${RUBY} -S rake test_sqlite3 || die "sqlite3 tests failed"
77 fi
78 ;;
79 esac
80 }

  ViewVC Help
Powered by ViewVC 1.1.20