# $Id: Portfile,v 1.1 2006/02/14 18:36:03 mww Exp $

PortSystem 1.0
name			db41
version			4.1.25
categories		databases
maintainers		darwinports@opendarwin.org
platforms		darwin
description		The Berkely DB package, version 4.1
long_description	\
			Version 4.1 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.1 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 1c595d43c062cd340f430cb051c7d6a106ad5191

worksrcdir		${distname}/build_unix

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

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

