# $Id: Portfile,v 1.5 2005/09/29 21:14:29 mww Exp $

PortSystem 1.0
name			freetds
version			0.63
categories		databases
platforms		darwin
maintainers		darwinports@opendarwin.org
description		A set of libraries for Unix and Linux that allows your programs to natively talk to Microsoft SQL Server and Sybase databases
long_description FreeTDS is an open source implementation of the TDS (Tabular DataStream) protocol used by these databases for their own clients. It supports many different flavors of the protocol and supports several APIs to access it. Additionally FreeTDS works with other software such as Perl and PHP, providing access from those languages as well. There is also a native (type 4) JDBC driver available for platform-independent Java clients (including Java Server Pages applications), with support for most of the JDBC 1 API and portions of the JDBC 2 API.

homepage	http://www.freetds.org/
master_sites	ftp://ftp.ibiblio.org/pub/Linux/ALPHA/${name}/stable/
checksums	md5 a0a5038cfb708180308b381f848baf75
depends_lib	port:libiconv
worksrcdir	freetds-${version}

configure.args	--mandir=${prefix}/share/man \
		--includedir=${prefix}/include/${name} \
		--sysconfdir=${prefix}/etc/${name} \
		--with-libiconv-prefix=${prefix}

post-destroot {
	file rename ${destroot}${prefix}/share/doc/${name}-${version} \
		${destroot}${prefix}/share/doc/${name}
}

platform darwin 7 {
	patchfiles	patch-src-tds-Makefile.in patch-src-server-Makefile.in \
		patch-src-ctlib-Makefile.in patch-src-odbc-Makefile.in \
		patch-src-dblib-Makefile.in

	pre-build {
		system "cp /usr/bin/glibtool ${worksrcpath}/libtool"
	}
}

platform darwin 8 {
	patchfiles      patch-src-tds-Makefile.in patch-src-server-Makefile.in \
		patch-src-ctlib-Makefile.in patch-src-odbc-Makefile.in \
		patch-src-dblib-Makefile.in
	configure.env	CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}

