2009-05-05 00:21:12 +00:00
|
|
|
# New ports collection makefile for: pyodbc
|
|
|
|
# Date created: April 15 2009
|
|
|
|
# Whom: rkruus
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
# Like they say in the postgres-odbc Makefile (and I quote):
|
|
|
|
#
|
|
|
|
# This ODBC driver should work under either unixODBC or iODBC
|
|
|
|
# driver manager, when compliled against one. (Important: Do not try
|
|
|
|
# to have both installed -- they have overlapping files).
|
|
|
|
|
|
|
|
# It looks like most people are using unixODBC these days, rather than
|
|
|
|
# iODBC, so let's make unixODBC the default choice: to select iODBC,
|
|
|
|
# set WITH_IODBC, without setting WITH_UNIXODBC. When the latter is
|
|
|
|
# set or when neither is set, we go with WITH_UNIXODBC.
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= pyodbc
|
|
|
|
PORTVERSION= 2.1.5
|
2012-02-06 12:25:50 +00:00
|
|
|
PORTREVISION= 2
|
2009-05-05 00:21:12 +00:00
|
|
|
CATEGORIES= databases python
|
|
|
|
MASTER_SITES= GOOGLE_CODE
|
|
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
|
|
DISTNAME= pyodbc-${PORTVERSION}
|
|
|
|
|
|
|
|
MAINTAINER= rob.kruus@gmail.com
|
|
|
|
COMMENT= ODBC connections for python
|
|
|
|
|
|
|
|
USE_ZIP= yes
|
|
|
|
USE_GMAKE= yes
|
2011-02-25 00:12:12 +00:00
|
|
|
USE_PYTHON= 2.5+
|
2009-05-05 00:21:12 +00:00
|
|
|
USE_PYDISTUTILS= yes
|
|
|
|
|
|
|
|
# again, shamelessly copied from datebase/postgres-odbc
|
|
|
|
.if !defined(WITH_IODBC)
|
|
|
|
WITH_UNIXODBC= yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_UNIXODBC)
|
|
|
|
# I.e. even if WITH_IODBC is defined
|
2012-02-06 12:25:50 +00:00
|
|
|
LIB_DEPENDS+= odbc.2:${PORTSDIR}/databases/unixODBC
|
2009-05-05 00:21:12 +00:00
|
|
|
BUILD_DEPENDS+= unixODBC>=2.2.14_1:${PORTSDIR}/databases/unixODBC
|
|
|
|
.else
|
|
|
|
LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
|
|
|
|
.endif
|
|
|
|
|
|
|
|
do-build:
|
|
|
|
@(cd ${WRKSRC}; ${PYTHON_CMD} setup.py build)
|
|
|
|
|
|
|
|
do-install:
|
|
|
|
@(cd ${WRKSRC}; ${PYTHON_CMD} setup.py install)
|
|
|
|
|
|
|
|
DOCSDIR= ${PREFIX}/share/doc/py-odbc
|
|
|
|
|
|
|
|
DOCS= docs.html index.html license.html styles.css tutorial.html
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${DOCSDIR}
|
|
|
|
.for f in ${DOCS}
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/web/${f} ${DOCSDIR}
|
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|