# $Id: Portfile 30250 2007-10-23 02:16:17Z jmpp@macports.org $
PortSystem		1.0
PortGroup		ruby 1.0

ruby.setup		{sqlite sqlite-ruby} 2.2.2 basic_install.rb \
				{TODO ChangeLog api doc} \
				rubyforge:1901
maintainers		nomaintainer
description		Interface to the SQLite DB engine from Ruby
long_description	Provides an interface for the SQLite DB engine. This \
					differs from the 'ruby-sqlite' project (also on RAA) \
					in that it is more complete, and from the ruby DBI \
					version of SQLite in that it is SQLite specific, so \
					you can do things that would otherwise be more \
					difficult via DBI. If you want portability between \
					backends, use DBI. If you want ease of use with \
					SQLite, use this. \
					Note that this module is NOT compatible with SQLite3.
categories-append	databases
use_bzip2		yes
checksums		md5 274e30cab90f4941984ea5b3273ef058
platforms		darwin

depends_lib-append		port:sqlite2

post-patch {
	reinplace "s|ruby extconf.rb|${ruby.bin} -rvendor-specific extconf.rb|" \
		${worksrcpath}/install.rb
	reinplace "s|make install|& DESTDIR=${destroot}|" \
		${worksrcpath}/install.rb
	reinplace "s|make|& RUBY=${ruby.bin}|" \
		${worksrcpath}/install.rb
}

test.run		yes
test.dir		${worksrcpath}/test
test.cmd		${ruby.bin}
test.target		tests.rb

