Import of pkgsrc-2014Q1

This commit is contained in:
2014-04-17 16:38:45 +02:00
parent 785076ae39
commit 9a8c06dafb
19365 changed files with 828089 additions and 278039 deletions

View File

@@ -1,19 +1,20 @@
# $NetBSD: Makefile,v 1.68 2013/01/08 15:09:59 darcy Exp $
# $NetBSD: Makefile,v 1.70 2014/03/05 11:14:00 darcy Exp $
DISTNAME= PyGreSQL-4.1.1
PKGNAME= ${PYPKGPREFIX}-postgresql-4.1.1
CATEGORIES= databases python
MASTER_SITES= http://pygresql.org/files/
EXTRACT_SUFX= .tgz
PKGREVISION= 1
OWNER= darcy@NetBSD.org
HOMEPAGE= http://www.PyGreSQL.org/
COMMENT= Python interface to PostgreSQL
LICENSE= postgresql-license
MAKE_ENV+= MANDIR=${PREFIX}/${PKGMANDIR}
MAKE_ENV+= BINDIR=${PREFIX}/bin
USE_TOOLS+= gmake
LICENSE= postgresql-license
MAKE_FILE= GNUmakefile
MAKE_ENV+= INSTALLED_LIBPQ=1
@@ -21,8 +22,8 @@ MAKE_ENV+= INSTALLED_LIBPQ=1
PY_PATCHPLIST= yes
PLIST_SUBST+= PYPKGPREFIX=${PYPKGPREFIX:Q}
REPLACE_PYTHON= pg.py pgdb.py
PYTHON_VERSIONS_INCOMPATIBLE= 33 # not yet ported as of 4.1.1
PYDISTUTILSPKG= yes
DOCDIR= ${PREFIX}/share/doc/${PYPKGPREFIX}-postgresql
INSTALLATION_DIRS= ${DOCDIR}/tutorial ${DOCDIR}/docs

View File

@@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.16 2013/01/08 15:09:59 darcy Exp $
$NetBSD: distinfo,v 1.17 2014/03/05 11:14:00 darcy Exp $
SHA1 (PyGreSQL-4.1.1.tgz) = eafd5b9ae92102bec088c7f2fe3ce3b359eb60c4
RMD160 (PyGreSQL-4.1.1.tgz) = 5cd30aceb7cb82acb2e3a36045be30b21112dd3f
Size (PyGreSQL-4.1.1.tgz) = 100883 bytes
SHA1 (patch-setup.py) = 7b81bbd56e35b6449173480595bce4e74b2de641

View File

@@ -0,0 +1,50 @@
$NetBSD: patch-setup.py,v 1.1 2014/03/05 11:14:00 darcy Exp $
* Fix when building against PostgreSQL < 9.0:
http://shell.vex.net/viewvc.cgi/pygresql?view=revision&revision=517
http://thread.gmane.org/gmane.comp.python.db.pygresql/1175
--- setup.py.orig 2013-01-08 14:47:33.000000000 +0000
+++ setup.py
@@ -68,6 +68,17 @@ def pg_config(s):
return d
+def pg_version():
+ """Return the PostgreSQL version as a tuple of integers."""
+ parts = []
+ for part in pg_config('version').split()[-1].split('.'):
+ if part.isdigit():
+ part = int(part)
+ parts.append(part)
+ return tuple(parts or [8])
+
+
+pg_version = pg_version()
py_modules = ['pg', 'pgdb']
libraries = ['pq']
# Make sure that the Python header files are searched before
@@ -95,7 +106,7 @@ class build_pg_ext(build_ext):
"enable string escaping functions")]
boolean_options = build_ext.boolean_options + [
- 'direct-access', 'large-objects', 'default-vars']
+ 'direct-access', 'large-objects', 'default-vars', 'escaping-funcs']
def get_compiler(self):
"""Return the C compiler used for building the extension."""
@@ -103,10 +114,10 @@ class build_pg_ext(build_ext):
def initialize_options(self):
build_ext.initialize_options(self)
- self.direct_access = 1
- self.large_objects = 1
- self.default_vars = 1
- self.escaping_funcs = 1
+ self.direct_access = True
+ self.large_objects = True
+ self.default_vars = True
+ self.escaping_funcs = pg_version[0] >= 9
def finalize_options(self):
"""Set final values for all build_pg options."""