# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem		1.0
PortGroup		xcode 1.0

name			BiggerSQL
version			1.3.8
categories		aqua databases
maintainers		nomaintainer
description		SQL front-end to the postgresql DBMS

long_description	BiggerSQL is a tool that (like psql) allows you to \
				execute SQL on a PostgreSQL server. Type text into the \
				top pane,  see if it is successful in the middle pane, \
				and see the results of a query in the table at the \
				bottom.  Using tool tips, you can see the type of the \
				result -- just let your cursor linger over the column. \
				BiggerSQL builds on BigSQL.

homepage		http://homepage.mac.com/levanj/Cocoa/
master_sites	${homepage}programs/
extract.suffix	.tgz

checksums		md5 3efd182ff810d6bceae5b2486bd25c85 \
				sha1 3a8cee4e4009bff0c8c2a7a19b4815f61b780c04 \
				rmd160 9d6a68dae8ae7f5f92abb8f5cce086e35bd28b26

worksrcdir		${name}

set pgglob [glob -directory ${prefix}/lib -nocomplain -tails postgresql*]
if {[llength ${pgglob}]} {
	set postgresql	[lindex ${pgglob} end]
} else {
	set postgresql	postgresql82
}

set pglibdir ${prefix}/lib/${postgresql}
depends_lib path:${pglibdir}:${postgresql}

post-patch {
	foreach {subdir} {include lib} {
		reinplace "s|/usr/local/pgsql/${subdir}|${prefix}/${subdir}/${postgresql}|" \
			${worksrcpath}/${name}.xcode/project.pbxproj
	}
}

universal_variant no

livecheck.type	regex
livecheck.url	${homepage}
livecheck.regex	"${name} v(\\d+(?:(\\.\\d+)*))"

