You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.9 KiB
67 lines
1.9 KiB
10 years ago
|
# Copyright 1999-2014 Gentoo Foundation
|
||
12 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
10 years ago
|
# $Header: /var/cvsroot/gentoo-x86/dev-ruby/pg/pg-0.17.1-r1.ebuild,v 1.1 2014/06/18 13:07:53 mrueg Exp $
|
||
12 years ago
|
|
||
11 years ago
|
EAPI=5
|
||
10 years ago
|
USE_RUBY="ruby19 ruby20 ruby21"
|
||
12 years ago
|
|
||
11 years ago
|
RUBY_FAKEGEM_RECIPE_TEST="rspec"
|
||
12 years ago
|
|
||
10 years ago
|
RUBY_FAKEGEM_TASK_DOC="docs"
|
||
12 years ago
|
RUBY_FAKEGEM_DOCDIR="doc"
|
||
|
RUBY_FAKEGEM_EXTRADOC="ChangeLog Contributors.rdoc README.rdoc History.rdoc"
|
||
|
|
||
11 years ago
|
inherit multilib ruby-fakegem
|
||
12 years ago
|
|
||
|
DESCRIPTION="Ruby extension library providing an API to PostgreSQL"
|
||
|
HOMEPAGE="http://bitbucket.org/ged/ruby-pg/"
|
||
|
|
||
|
LICENSE="|| ( GPL-2 Ruby )"
|
||
|
SLOT="0"
|
||
10 years ago
|
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
||
12 years ago
|
IUSE=""
|
||
|
|
||
|
RDEPEND="${RDEPEND}
|
||
|
dev-db/postgresql-base"
|
||
|
DEPEND="${DEPEND}
|
||
|
dev-db/postgresql-base
|
||
10 years ago
|
test? ( dev-db/postgresql-server dev-db/postgresql-base[threads] )"
|
||
12 years ago
|
|
||
|
ruby_add_bdepend "
|
||
|
doc? (
|
||
|
dev-ruby/hoe
|
||
11 years ago
|
|| ( >=dev-ruby/yard-0.6.1 dev-ruby/rdoc ) )"
|
||
12 years ago
|
|
||
|
all_ruby_prepare() {
|
||
|
# hack the Rakefile to make it sure that it doesn't load
|
||
|
# rake-compiler (so that we don't have to depend on it and it
|
||
|
# actually works when building with USE=doc).
|
||
|
sed -i \
|
||
|
-e '/Rakefile.cross/s:^:#:' \
|
||
|
-e '/ExtensionTask/,/^end$/ s:^:#:' \
|
||
|
Rakefile || die
|
||
12 years ago
|
|
||
|
sed -i -e '18i require "socket"' spec/pg/connection_spec.rb || die
|
||
12 years ago
|
}
|
||
|
|
||
|
each_ruby_configure() {
|
||
|
${RUBY} -C ext extconf.rb || die "extconf.rb failed"
|
||
|
}
|
||
|
|
||
|
each_ruby_compile() {
|
||
11 years ago
|
emake V=1 -C ext CFLAGS="${CFLAGS} -fPIC" archflag="${LDFLAGS}"
|
||
|
cp ext/*$(get_libname) lib || die
|
||
12 years ago
|
}
|
||
|
|
||
|
each_ruby_test() {
|
||
|
if [[ "${EUID}" -ne "0" ]]; then
|
||
|
# Make the rspec call explicit, this way we don't have to depend
|
||
|
# on rake-compiler (nor rubygems) _and_ we don't have to rebuild
|
||
|
# the whole extension from scratch.
|
||
11 years ago
|
ruby-ng_rspec
|
||
12 years ago
|
else
|
||
|
ewarn "The userpriv feature must be enabled to run tests."
|
||
|
eerror "Testsuite will not be run."
|
||
|
fi
|
||
|
}
|