# $Id: Portfile,v 1.3 2006/01/26 20:01:16 markd Exp $

PortSystem			1.0
PortGroup			perl5 1.0
perl5.setup			DB_File 1.814
maintainers			darwinports@opendarwin.org
description			Access to Berkeley DB version 1.x
long_description \
	DB_File is a module which allows Perl programs to make use of the \
	facilities provided by Berkeley DB version 1. (DB_File can be built \
	version 2, 3 or 4 of Berkeley DB, but it will only support the 1.x \
	features).

platforms			darwin sunos

checksums			md5 5ae102fe172f2aaf771a8d9cae23ca3a

depends_lib-append	lib:libdb-4:db4

post-extract {
	reinplace "s|/usr/local/BerkeleyDB/include|${prefix}/include/db4|" \
		${worksrcpath}/config.in
	reinplace "s|/usr/local/BerkeleyDB/lib|${prefix}/lib|" \
		${worksrcpath}/config.in
	reinplace "s|#DBNAME = -ldb-2.4.10|DBNAME = -ldb-4|" \
		${worksrcpath}/config.in
}

# Dang Makefile.PL overrides INSTALLDIRS, so we need to over-override it...
build.args-append	INSTALLDIRS=vendor

destroot.args-append	INSTALLDIRS=vendor

