Portfile

# $Id: Portfile 23053 2007-03-23 20:35:47Z pipping@macports.org $

PortSystem 1.0
name db4
version 4.3.29
categories databases
maintainers nomaintainer@macports.org
description The Berkely DB package, revision 4
homepage http://www.sleepycat.com/update/
platforms darwin freebsd sunos
master_sites http://downloads.sleepycat.com/ freebsd
distname db-${version}
dist_subdir db4/${version}
checksums sha1 49c31bb12144e3a8fb8b7f64e7bf989b72f2981a
worksrcdir ${distname}/build_unix
configure.cmd ../dist/configure
configure.args --enable-compat185 --enable-dump185 --enable-cxx \
--includedir=${prefix}/include/db4 \
--program-transform-name="s,^db,db4,"

platform darwin 7 { configure.args-append --enable-tcl \
--with-tcl=/usr/lib }
platform darwin 8 { configure.args-append --enable-tcl \
--with-tcl=/usr/lib
configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 \
CXX=/usr/bin/g++-4.0 }

platform darwin 6 { depends_lib-append bin:tclsh8.4:tcl
configure.args-append --enable-tcl \
--with-tcl=${prefix}/lib }

variant java { configure.args-append --enable-java }

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

post-destroot { system "rm '${destroot}${prefix}/lib/libdb.a'
rm '${destroot}${prefix}/lib/libdb.dylib'
rm '${destroot}${prefix}/lib/libdb_cxx.a'
rm '${destroot}${prefix}/lib/libdb_cxx.dylib'
cd '${destroot}${prefix}/bin/'
mv db_archive db4_archive
mv db_dump db4_dump
mv db_printlog db4_printlog
mv db_upgrade db4_upgrade
mv db_checkpoint db4_checkpoint
mv db_dump185 db4_dump185
mv db_recover db4_recover
mv db_verify db4_verify
mv db_deadlock db4_deadlock
mv db_load db4_load
mv db_stat db4_stat"
}


long_description Revision 4 of the Berkeley DB library. This version \
uses an incompatible underlying database format than \
revision 1 and a different standard API. Utilities are \
included in the distribution to convert v1.85 databases \
to v4 databases, and a backwards compatible API is \
provided to maintain compatibility with programs using \
the v1.85 interface. There are minor interface changes \
in this release which may require that DB applications \
be modified and recompiled. For a complete discussion \
of interface changes, see: http://www.sleepycat.com/update/

variant sunos {
configure.args-delete --enable-dump185
}