# $Id: Portfile,v 1.2 2006/02/14 18:58:25 mww Exp $

PortSystem 1.0
name			db43
version			4.3.29
categories		databases
maintainers		darwinports@opendarwin.org
platforms		darwin
description		The Berkely DB package, version 4.3
long_description	\
			Version 4.3 of the Berkeley Data Base library which offers \
			(key/value) storage with optional concurrent access or \
			transactions interface. This port will install the AES (American \
			Encryption Standard) enabled version. Utilities are included in \
			the distribution to convert v1.85 databases to v4.3 databases, and \
			a backwards compatible API is provided to maintain compatibility \
			with programs using the v1.85 interface.

homepage		http://www.sleepycat.com/update/
master_sites	http://downloads.sleepycat.com/
distname		db-${portversion}
dist_subdir		db4
checksums		sha1 49c31bb12144e3a8fb8b7f64e7bf989b72f2981a

worksrcdir		${distname}/build_unix

configure.cmd	../dist/configure
configure.args	--enable-cxx --enable-compat185 --enable-dump185 \
				--includedir=\\\${prefix}/include/db43 \
				--libdir=\\\${prefix}/lib/db43 \
				--program-transform-name="s,^db,db43," \
				--disable-tcl

destroot.destdir	prefix=${destroot}${prefix} \
				docdir=${destroot}${prefix}/share/${name}-${version}/

post-destroot {
	file delete -force ${destroot}${prefix}/share
	foreach lib { libdb.a libdb_cxx.a } {
		file delete ${destroot}${prefix}/lib/db43/${lib}
	}
	foreach bin { archive dump dump185 printlog upgrade checkpoint recover verify deadlock load stat } {
		file rename ${destroot}${prefix}/bin/db_${bin} \
			${destroot}${prefix}/bin/db43_${bin}
	}
}

platform darwin 8 {
	configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}

