# $Id: Portfile,v 1.4 2006/03/25 06:06:34 markd Exp $
PortSystem		1.0
PortGroup		ruby 1.0

ruby.setup		bdb 0.5.8 extconf.rb {README.en bdb.html bdb.rd docs examples}
maintainers		shu@rufuran.org
description		Ruby interface to the embedded Berkeley DB
long_description	Ruby BDB is an interface for using Berkeley DB \
					versions 2 and above. Developers may choose to store \
					data in any of several different storage structures \
					to satisfy the requirements of a particular \
					application. The library includes support for \
					B+tree, Hashes, and Fixed and Variable-Length \
					Records.
categories-append	databases
homepage		http://moulon.inra.fr/ruby/${ruby.module}.html
master_sites	ftp://moulon.inra.fr/pub/ruby/
checksums		md5 b0c9eb2f4a8456bb71afad353161199c
platforms		darwin

depends_lib-append		lib:libdb-4:db4

configure.args-append	--with-db-dir=${prefix} \
						--with-db-include=${prefix}/include/db4

variant db3 {
	depends_lib-delete		lib:libdb-4:db4
	depends_lib-append		lib:libdb-3:db3
	configure.args-delete	--with-db-include=${prefix}/include/db4
	configure.args-append	--with-db-include=${prefix}/include/db3 \
							--with-db-version=3
}

pre-configure {
	# The trailing space is not a typo
	reinplace "s|extconf.rb |-rvendor-specific & |" ${worksrcpath}/extconf.rb
}

test.run			yes
#test.target			test

