# $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $

PortSystem 1.0

name				javasqlite
version				20060714
categories			java databases
platforms			darwin

maintainers			kallisys.net:pguyot
description			Java wrapper for sqlite
long_description	Java wrapper including a basic JDBC driver for the SQLite \
					2/3 database engine. It is designed using JNI to \
					interface to the SQLite API. 
homepage			http://www.ch-werner.de/javasqlite/
master_sites		${homepage}
checksums			md5 ac9b2a256a657b2717659acea7f2e41a \
					sha1 f9d74f6c891b27713ecaa1444b4bee1bb6841cf0 \
					rmd160 725b2455208ca40b9c0edd9769431c637f0b8d3b
patchfiles			patch-configure \
					patch-Makefile.in

depends_lib			port:sqlite2 \
					port:sqlite3

configure.args-append	--with-jardir=${prefix}/share/java/ \
						--with-sqlite=${prefix} \
						--with-sqlite3=${prefix}

test.run			yes
post-test {
	# This test function could be improved. We probably want a diff method
	# in base/
	system "cd ${worksrcpath} && java test > ${worksrcpath}/test.output 2>&1"
	system "exit `diff ${filespath}/test.output ${worksrcpath}/test.output | wc -l`"
}

platform darwin {
	patchfiles-append patch-Makefile.in-jnilib
}

livecheck.url	http://www.ch-werner.de/javasqlite/overview-summary.html
livecheck.check	regexm
livecheck.regex	{<H1>\s+SQLite Java Wrapper/JDBC Driver\s+<br><small>\s+(.*)\s+</small>\s+</H1>}
livecheck.version	2006-07-14
