# $Id: Portfile,v 1.1 2006/02/14 13:05:46 mww Exp $

PortSystem 1.0
name			db42
version			4.2.52
categories		databases
maintainers		darwinports@opendarwin.org
platforms		darwin
description		The Berkely DB package, version 4.2
long_description	\
			Version 4.2 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.2 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 a7eae0ce16dd12d030c2843e14a84a37881ec4b1

worksrcdir		${distname}/build_unix

configure.cmd	../dist/configure
configure.args	--enable-cxx --enable-compat185 --enable-dump185 \
				--includedir=\\\${prefix}/include/db42 \
				--libdir=\\\${prefix}/lib/db42 \
				--program-transform-name="s,^db,db42," \
				--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/db42/${lib}
	}
	foreach bin { archive dump dump185 printlog upgrade checkpoint recover verify deadlock load stat } {
		file rename ${destroot}${prefix}/bin/db_${bin} \
			${destroot}${prefix}/bin/db42_${bin}
	}
}

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

