# $Id: Portfile,v 1.10 2006/07/19 07:42:21 takanori Exp $

PortSystem		1.0
name			qdbm
version         1.8.61
categories      databases
maintainers     rsky0711@gmail.com pelopor@nifty.com
platforms       darwin
description		QDBM is a library of routines for managing a database.
long_description	\
	QDBM is a library of routines for managing a database. The database is a\
	simple data file containing records, each is a pair of a key and a\
	value. Every key and value is serial bytes with variable length. Both binary\
	data and character string can be used as a key and a value. There is neither\
	concept of data tables nor data types. Records are organized in hash table\
	or B+ tree.
homepage	 	http://qdbm.sourceforge.net/
master_sites    ${homepage}
checksums       md5    d8717587912cf31b78f5a9583dfd5cbf \
                sha1   23e2068e0695c104c633952c0ffd748acf69cdd1 \
                rmd160 37cddda42d90e901f1fd2e8c5840e2173b07b62d

depends_lib		port:libiconv port:zlib

configure.args  --mandir=${prefix}/share/man \
                --datadir=${prefix}/share/doc \
                --enable-pthread \
                --enable-zlib --enable-iconv

post-extract	{
				#configure
				reinplace "s|\$HOME|\${prefix}|g" \
					${worksrcpath}/configure
				# Makefile.in
				reinplace "s|\$(HOME)|\$(prefix)|g" \
					${worksrcpath}/Makefile.in
    # myconf.c
    reinplace "s|lzo/|lzo2/|g" \
        ${worksrcpath}/myconf.c
				}

test.run yes

platform macosx   {
		  		build.target	mac
				test.target 	check-mac
				destroot.target	install-mac
}

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

variant bzip2 {
		depends_lib-append      port:bzip2
		configure.args-append   --enable-bzip
}

variant lzo {
		depends_lib-append      port:lzo2
		configure.args-append   --enable-lzo
}
