diff options
Diffstat (limited to 'dev-ruby/sqlite3-ruby/sqlite3-ruby-1.2.1.ebuild')
-rw-r--r-- | dev-ruby/sqlite3-ruby/sqlite3-ruby-1.2.1.ebuild | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/dev-ruby/sqlite3-ruby/sqlite3-ruby-1.2.1.ebuild b/dev-ruby/sqlite3-ruby/sqlite3-ruby-1.2.1.ebuild new file mode 100644 index 000000000000..9fb75963948e --- /dev/null +++ b/dev-ruby/sqlite3-ruby/sqlite3-ruby-1.2.1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/sqlite3-ruby/sqlite3-ruby-1.2.1.ebuild,v 1.1 2007/02/23 11:08:03 rbrown Exp $ + +inherit ruby + +DESCRIPTION="An extension library to access a SQLite database from Ruby" +HOMEPAGE="http://rubyforge.org/projects/sqlite-ruby/" +LICENSE="BSD" + +SRC_URI="http://rubyforge.org/frs/download.php/17096/${P}.tar.bz2" + +KEYWORDS="~x86" +SLOT="0" +IUSE="doc swig" + +USE_RUBY="ruby18 ruby19" +DEPEND="=dev-db/sqlite-3* + swig? ( dev-lang/swig )" + +pkg_setup() { + if use swig && ! built_with_use dev-lang/swig ruby ; then + eerror "You must compile swig with ruby bindings. Please add" + eerror "'ruby' to your USE flags and recompile swig" + die "swig needs ruby bindings" + elif ! use swig ; then + einfo "${PN} will work a lot better with swig; it is suggested" + einfo "that you install swig with the 'ruby' USE flag, and then" + einfo "install ${PN} with the swig USE flag" + ebeep + epause 5 + fi +} + +src_compile() { + myconf="" + if ! use swig ; then + myconf="--without-ext" + fi + + ${RUBY} setup.rb config --prefix=/usr ${myconf} \ + || die "setup.rb config failed" + ${RUBY} setup.rb setup \ + || die "setup.rb setup failed" +} + +src_install() { + ${RUBY} setup.rb install --prefix=${D} \ + || die "setup.rb install failed" + + dodoc README ChangeLog + dohtml doc/faq/faq.html + + if use doc ; then + dohtml -r -V api + fi +} |