2000-05-29 20:12:26 -04:00
|
|
|
# New ports collection makefile for: MyODBC
|
2000-10-25 09:11:09 -04:00
|
|
|
# Date created: 24 Oct 2000
|
|
|
|
# Whom: ebakke@trolltech.com
|
2000-05-29 20:12:26 -04:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2001-10-09 06:33:49 -04:00
|
|
|
PORTNAME= myodbc
|
|
|
|
PORTVERSION= 2.50.39
|
2000-05-29 20:12:26 -04:00
|
|
|
CATEGORIES= databases
|
2001-10-09 06:33:49 -04:00
|
|
|
MASTER_SITES= http://www.mysql.com/Downloads/MyODBC/ \
|
|
|
|
ftp://sunsite.dk/mirrors/mysql/Downloads/MyODBC/ \
|
|
|
|
ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/MyODBC/
|
|
|
|
DISTNAME= MyODBC-${PORTVERSION}
|
2000-05-29 20:12:26 -04:00
|
|
|
|
2000-10-25 09:11:09 -04:00
|
|
|
MAINTAINER= ebakke@trolltech.com
|
2003-02-21 06:15:57 -05:00
|
|
|
COMMENT= ODBC driver for MySQL
|
2000-05-29 20:12:26 -04:00
|
|
|
|
2001-10-09 06:33:49 -04:00
|
|
|
LIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
|
2000-05-29 20:12:26 -04:00
|
|
|
|
|
|
|
USE_GMAKE= yes
|
2001-10-09 06:33:49 -04:00
|
|
|
USE_LIBTOOL= yes
|
|
|
|
CONFIGURE_ARGS= --with-mysql-libs=${LOCALBASE}/lib/mysql \
|
|
|
|
--with-mysql-includes=${LOCALBASE}/include/mysql
|
|
|
|
|
|
|
|
# MyODBC needs an ODBC driver manager to be installed, and it supports both
|
|
|
|
# iODBC and unixODBC. The following variable may be set at built-time to
|
|
|
|
# either "iodbc" or "unixodbc", with the former being the default:
|
|
|
|
DRIVER_MANAGER?= iodbc
|
|
|
|
|
|
|
|
.if ${DRIVER_MANAGER} == "unixodbc"
|
2002-05-04 09:14:57 -04:00
|
|
|
CONFIGURE_ARGS+= --with-odbc-ini=${LOCALBASE}/etc/odbc.ini \
|
|
|
|
--with-unixODBC=${LOCALBASE}
|
2001-10-09 06:33:49 -04:00
|
|
|
LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
|
|
|
|
.else # assume we're using iodbc
|
|
|
|
LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
|
|
|
|
CONFIGURE_ARGS+= --with-odbc-ini=${LOCALBASE}/etc/libiodbc/odbc.ini
|
|
|
|
.endif
|
|
|
|
|
2002-03-01 16:32:07 -05:00
|
|
|
# Allow a new value of ODBCVER to be set at build-time
|
|
|
|
.if defined(ODBCVER)
|
|
|
|
post-patch:
|
|
|
|
cd ${WRKSRC}; \
|
|
|
|
${MV} myodbc.h myodbc.h.orig; \
|
|
|
|
${SED} -e "s/ODBCVER 0x0250/ODBCVER ${ODBCVER}/" < myodbc.h.orig > myodbc.h
|
|
|
|
.endif
|
|
|
|
|
2001-10-09 06:33:49 -04:00
|
|
|
# XXX untested
|
|
|
|
.if defined(STATIC)
|
|
|
|
CONFIGURE_ARGS+= --enable-shared=no \
|
|
|
|
--enable-static=yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@ ${MKDIR} ${DOCSDIR}
|
|
|
|
# Install the INSTALL file as well, since it describes how to set up odbc.ini
|
|
|
|
@ ${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCSDIR}
|
|
|
|
@ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
|
|
|
|
.endif
|
2000-05-29 20:12:26 -04:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|