Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Aug 2013 08:30:01 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-python@FreeBSD.org
Subject:   Re: ports/174242: commit references a PR
Message-ID:  <201308170830.r7H8U1QL060589@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/174242; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/174242: commit references a PR
Date: Sat, 17 Aug 2013 08:29:23 +0000 (UTC)

 Author: vanilla
 Date: Sat Aug 17 08:29:14 2013
 New Revision: 324833
 URL: http://svnweb.freebsd.org/changeset/ports/324833
 
 Log:
   1: Upgrade to 3.0.6.
   2: trim Makefile header, fix pkg-plist.
   
   PR:		ports/174242
   Submitted by:	maintainer [1], me [2]
 
 Added:
   head/databases/py-odbc/files/patch-src_pyodbc.h   (contents, props changed)
 Modified:
   head/databases/py-odbc/Makefile
   head/databases/py-odbc/distinfo
   head/databases/py-odbc/files/patch-setup-libs
   head/databases/py-odbc/pkg-plist
 
 Modified: head/databases/py-odbc/Makefile
 ==============================================================================
 --- head/databases/py-odbc/Makefile	Sat Aug 17 08:28:01 2013	(r324832)
 +++ head/databases/py-odbc/Makefile	Sat Aug 17 08:29:14 2013	(r324833)
 @@ -1,9 +1,5 @@
 -# New ports collection makefile for:   pyodbc
 -# Date created:        April 15 2009
 -# Whom:                rkruus
 -#
 +# Created by: April 15 2009
  # $FreeBSD$
 -#
  
  # Like they say in the postgres-odbc Makefile (and I quote):
  #
 @@ -18,12 +14,11 @@
  #
  
  PORTNAME=	pyodbc
 -PORTVERSION=	2.1.5
 -PORTREVISION=	2
 +PORTVERSION=	3.0.6
  CATEGORIES=	databases python
  MASTER_SITES=	GOOGLE_CODE
  PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 -DISTNAME=		pyodbc-${PORTVERSION}
 +#DISTNAME=		pyodbc-${PORTVERSION}
  
  MAINTAINER=	rob.kruus@gmail.com
  COMMENT=	ODBC connections for python
 @@ -31,7 +26,8 @@ COMMENT=	ODBC connections for python
  USE_ZIP=	yes
  USE_GMAKE=	yes
  USE_PYTHON=	2.5+
 -USE_PYDISTUTILS=	yes
 +USE_PYDISTUTILS=	easy_install
 +PYEASYINSTALL_ARCHDEP=	yes
  
  # again, shamelessly copied from datebase/postgres-odbc
  .if !defined(WITH_IODBC)
 @@ -40,28 +36,17 @@ WITH_UNIXODBC=	yes
  
  .if defined(WITH_UNIXODBC)
  # I.e. even if WITH_IODBC is defined
 -LIB_DEPENDS+=	odbc.2:${PORTSDIR}/databases/unixODBC
 +LIB_DEPENDS+=	odbc:${PORTSDIR}/databases/unixODBC
  BUILD_DEPENDS+=	unixODBC>=2.2.14_1:${PORTSDIR}/databases/unixODBC
  .else
 -LIB_DEPENDS+=	iodbc.3:${PORTSDIR}/databases/libiodbc
 +LIB_DEPENDS+=	iodbc:${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
 +	${MKDIR} ${PYTHONPREFIX_SITELIBDIR}
 +	@(cd ${WRKSRC}; ${SETENV} PYTHONPATH=${PYTHONPREFIX_SITELIBDIR} ${PYTHON_CMD} setup.py install --prefix=${PREFIX})
  
  .include <bsd.port.mk>
 
 Modified: head/databases/py-odbc/distinfo
 ==============================================================================
 --- head/databases/py-odbc/distinfo	Sat Aug 17 08:28:01 2013	(r324832)
 +++ head/databases/py-odbc/distinfo	Sat Aug 17 08:29:14 2013	(r324833)
 @@ -1,2 +1,2 @@
 -SHA256 (pyodbc-2.1.5.zip) = 0e47fbe829e2295ea43c00ddcb268c274dc37a8a5a7963fb6f64080203278793
 -SIZE (pyodbc-2.1.5.zip) = 147862
 +SHA256 (pyodbc-3.0.6.zip) = e5a7f12deddf4b258bed904b5a071dd43c40c78de8e24c9228f8174e69f5366d
 +SIZE (pyodbc-3.0.6.zip) = 85518
 
 Modified: head/databases/py-odbc/files/patch-setup-libs
 ==============================================================================
 --- head/databases/py-odbc/files/patch-setup-libs	Sat Aug 17 08:28:01 2013	(r324832)
 +++ head/databases/py-odbc/files/patch-setup-libs	Sat Aug 17 08:29:14 2013	(r324833)
 @@ -1,22 +1,18 @@
 ---- setup.py.orig	2009-04-15 14:10:36.000000000 -0600
 -+++ setup.py	2009-06-24 09:15:04.203757061 -0600
 -@@ -54,8 +54,16 @@
 -     else:
 -         # Other posix-like: Linux, Solaris, etc.
 +--- setup.py.orig	2012-06-24 17:49:34.000000000 -0600
 ++++ setup.py	2012-12-06 11:47:02.121782861 -0600
 +@@ -156,6 +156,15 @@
 +         # What is the proper way to detect iODBC, MyODBC, unixODBC, etc.?
 +         settings['libraries'].append('odbc')
   
 -+        try:
 -+            include = '-I'+os.environ['PREFIX']+'/include'
 -+            lib = '-L'+os.environ['PREFIX']+'/lib'
 -+        except:
 -+            include = '-I/usr/local/include'
 -+            lib = '-L/usr/local/lib'
 ++        if sys.platform.startswith('freebsd'):
 ++            settings['library_dirs'] = ['/usr/local/lib/']
 ++            settings['include_dirs'] = ['/usr/local/include/']
 ++            freebsd_prefix = '/usr/local'
 ++            if 'PREFIX' in os.environ:
 ++                freebsd_prefix = os.environ['PREFIX']
 ++            if 'PYTHONPREFIX_SITELIBDIR' in os.environ:
 ++                sys.path.append('/'.join(freebsd_prefix, os.environ['PYTHONPREFIX_SITELIBDIR']))
  +
 -         # Python functions take a lot of 'char *' that really should be const.  gcc complains about this *a lot*
 --        extra_compile_args = ['-Wno-write-strings']
 -+        extra_compile_args = ['-Wno-write-strings', include, lib]
 -+        extra_link_args = [ lib ]
 +     return settings
 + 
   
 -         # What is the proper way to detect iODBC, MyODBC, unixODBC, etc.?
 -         libraries.append('odbc')
 -
 -
 
 Added: head/databases/py-odbc/files/patch-src_pyodbc.h
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/databases/py-odbc/files/patch-src_pyodbc.h	Sat Aug 17 08:29:14 2013	(r324833)
 @@ -0,0 +1,12 @@
 +--- src/pyodbc.h.orig	2012-01-13 13:10:48.000000000 -0600
 ++++ src/pyodbc.h	2012-12-06 10:21:36.527165345 -0600
 +@@ -76,7 +76,9 @@
 + #include <stdarg.h>
 + 
 + #if defined(__SUNPRO_CC) || defined(__SUNPRO_C) || (defined(__GNUC__) && !defined(__MINGW32__))
 ++#ifndef __FreeBSD__
 + #include <alloca.h>
 ++#endif
 + #define CDECL cdecl
 + #define min(X,Y) ((X) < (Y) ? (X) : (Y))
 + #define max(X,Y) ((X) > (Y) ? (X) : (Y))
 
 Modified: head/databases/py-odbc/pkg-plist
 ==============================================================================
 --- head/databases/py-odbc/pkg-plist	Sat Aug 17 08:28:01 2013	(r324832)
 +++ head/databases/py-odbc/pkg-plist	Sat Aug 17 08:29:14 2013	(r324833)
 @@ -1,7 +1 @@
 -%%PYTHON_SITELIBDIR%%/pyodbc.so
 -%%PORTDOCS%%%%DOCSDIR%%/docs.html
 -%%PORTDOCS%%%%DOCSDIR%%/index.html
 -%%PORTDOCS%%%%DOCSDIR%%/license.html
 -%%PORTDOCS%%%%DOCSDIR%%/styles.css
 -%%PORTDOCS%%%%DOCSDIR%%/tutorial.html
 -%%PORTDOCS%%@dirrm %%DOCSDIR%%
 +%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308170830.r7H8U1QL060589>