Portfile

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

PortSystem 1.0
name db44
version 4.4.20
revision 1
categories databases
maintainers nomaintainer@macports.org
platforms darwin
description The Berkely DB package, version 4.4
long_description \
Version 4.4 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.4 \
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/
patch_sites http://www.oracle.com/technology/products/berkeley-db/db/update/${version}/
patchfiles patch.${version}.1 \
patch.${version}.2 \
patch.${version}.3 \
patch.${version}.4
distname db-${version}
patch.dir ${workpath}/${distname}
dist_subdir db4
checksums ${distname}${extract.suffix} \
sha1 bb4c68a4afc14712eb2954b7991f5dc9fe93bf7b \
patch.${version}.1 \
sha1 5843380b67561134432f46dce53b67a133ef7962 \
patch.${version}.2 \
sha1 75f0ae6ef06a23a690e5ebe6460552a11448ef32 \
patch.${version}.3 \
sha1 580265cdccc394ed988a6334f6c9a7d2bb15d141 \
patch.${version}.4 \
sha1 8875add3312fdc0548fbd4dedb71b4f8637dc6c9

worksrcdir ${distname}/build_unix

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

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

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

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

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