media-sound/xmms2-9999.ebuild: allow 'epatch_user' in 'src_prepare()'
[slyfox-gentoo.git] / dev-ruby / dbi / dbi-0.4.5.ebuild
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/dbi/dbi-0.4.5.ebuild,v 1.1 2012/09/02 13:28:06 flameeyes Exp $
4
5 EAPI=4
6 USE_RUBY="ruby18"
7
8 RUBY_FAKEGEM_RECIPE_TEST="none"
9 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
10
11 RUBY_FAKEGEM_BINWRAP=""
12
13 RUBY_FAKEGEM_EXTRADOC="README ChangeLog"
14
15 inherit ruby-fakegem
16
17 DESCRIPTION="Database independent interface for accessing databases"
18 HOMEPAGE="http://ruby-dbi.rubyforge.org/"
19
20 LICENSE="BSD"
21 SLOT="0"
22 KEYWORDS="~amd64 ~ppc ~x86"
23 IUSE="odbc postgres mysql sqlite sqlite3 test"
24
25 ruby_add_bdepend "test? ( >=dev-ruby/test-unit-2.5.1-r1 )"
26 ruby_add_rdepend "dev-ruby/deprecated:2"
27
28 PDEPEND="
29         mysql?    ( dev-ruby/dbd-mysql )
30         postgres? ( dev-ruby/dbd-pg )
31         odbc?     ( dev-ruby/dbd-odbc )
32         sqlite?   ( dev-ruby/dbd-sqlite )
33         sqlite3?  ( dev-ruby/dbd-sqlite3 )"
34
35 RUBY_PATCHES=( ${P}-gentoo.patch )
36
37 each_ruby_test() {
38         ruby-ng_testrb-2 -Ilib test/ts_dbi.rb
39 }
40
41 pkg_postinst() {
42         if ! (use mysql || use postgres || use odbc || use sqlite || use sqlite3)
43         then
44                 elog "${P} now comes with external database drivers."
45                 elog "Be sure to set the right USE flags for ${PN} or emerge the drivers manually:"
46                 elog "They are called dev-ruby/dbd-{mysql,odbc,pg,sqlite,sqlite3}"
47         fi
48 }