# $Id: Portfile 59923 2009-10-27 10:59:33Z css@macports.org $

PortSystem 1.0

name			palm-db-tools
version			0.3.6
revision		1
categories		palm databases
maintainers		css
description		convert between CSV text files and Palm databases
long_description	This package contains several utilities that allow \
			you to convert text files to and from several      \
			different Palm Pilot flat-file database formats.   \
			The utilities support DB, MobileDB, List, and      \
			JFile v3.x formats.

homepage		http://palm-db-tools.sourceforge.net/
platforms		darwin

master_sites		sourceforge
master_sites.mirror_subdir	${name}
distname		${name}-0_3_6
checksums		md5 483d2b18dcc2ef8cd5f7e27715d43bfe
patchfiles		patch-flatfile-Makefile.in

worksrcdir		${name}
configure.args		--disable-warnings --enable-static

destroot {
	xinstall -m 755 -W ${worksrcpath}/flatfile csv2pdb pdb2csv \
		${destroot}${prefix}/bin
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath}/docs manual.html manual.txt \
		${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 ${worksrcpath}/models/xldbtools.xlt \
		${destroot}${prefix}/share/doc/${name}
}

# Add support for reading and writing MobileDB 4 databases.
# http://sourceforge.net/tracker/index.php?func=detail&aid=1566691&group_id=10524&atid=360524
variant mobiledb4 {
	patchfiles-append	patch-libflatfile-MobileDB.cpp.diff
}

