aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornbm <nbm@FreeBSD.org>2001-11-02 23:00:28 +0800
committernbm <nbm@FreeBSD.org>2001-11-02 23:00:28 +0800
commit79e662491f09106ab494d726c03978bcbee10e64 (patch)
tree47dac22703b6e287efcc48fd764c988793ad8807
parentb4ca25b847799e86a5dbddc3309786998af4dd0c (diff)
downloadfreebsd-ports-gnome-79e662491f09106ab494d726c03978bcbee10e64.tar.gz
freebsd-ports-gnome-79e662491f09106ab494d726c03978bcbee10e64.tar.zst
freebsd-ports-gnome-79e662491f09106ab494d726c03978bcbee10e64.zip
Add pyPgSQL, a Python DB-API 2 compliant library for using PostgreSQL
databases PR: 31705 Submitted by: Gerhard Häring <gerhard@bigfoot.de>
-rw-r--r--databases/Makefile1
-rw-r--r--databases/py-pyPgSQL/Makefile50
-rw-r--r--databases/py-pyPgSQL/distinfo1
-rw-r--r--databases/py-pyPgSQL/pkg-comment1
-rw-r--r--databases/py-pyPgSQL/pkg-descr12
-rw-r--r--databases/py-pyPgSQL/pkg-plist6
6 files changed, 71 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile
index 4e8fdf89877b..41ec30034bda 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -86,6 +86,7 @@
SUBDIR += py-SQLDict
SUBDIR += py-bsddb3
SUBDIR += py-gdbm
+ SUBDIR += py-pyPgSQL
SUBDIR += py-sqlrelay
SUBDIR += rdb
SUBDIR += ruby-bdb
diff --git a/databases/py-pyPgSQL/Makefile b/databases/py-pyPgSQL/Makefile
new file mode 100644
index 000000000000..680859814d44
--- /dev/null
+++ b/databases/py-pyPgSQL/Makefile
@@ -0,0 +1,50 @@
+# New ports collection makefile for: py-pypgsql
+# Date created: 01 Nov 2001
+# Whom: Gerhard Haering <gerhard@bigfoot.de>
+#
+# $FreeBSD$
+#
+
+PORTNAME= pyPgSQL
+PORTVERSION= 1.6
+CATEGORIES= databases python
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= pypgsql
+PKGNAMEPREFIX= py-
+DISTNAME= pypgsql-${PORTVERSION}
+
+MAINTAINER= gerhard@bigfoot.de
+
+BUILD_DEPENDS= ${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base
+RUN_DEPENDS= ${DATETIME_DEP}:${PORTSDIR}/lang/py-mx-base
+LIB_DEPENDS= pq.2:${PORTSDIR}/databases/postgresql7
+
+WRKSRC= ${WRKDIR}/pypgsql
+USE_PYTHON= yes
+SETUP_CMD= cd ${WRKSRC} && ${PYTHON_CMD} setup.py
+
+DOCS= README
+
+PLIST_SUB+= PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S/^${LOCALBASE}\///g}
+
+DATETIME_DEP= ${PYTHON_SITELIBDIR}/mx/DateTime/__init__.py
+
+post-patch:
+ perl -i -p \
+ -e 's#^include_dirs = \[ "/usr/local/pgsql/include" \]#include_dirs = [ "${LOCALBASE}/include/pgsql" ]# ;' \
+ -e 's#^library_dirs = \[ "/usr/local/pgsql/lib" \]#library_dirs = [ "${LOCALBASE}/lib" ]#' \
+ ${WRKSRC}/setup.py
+
+do-build:
+ ${SETUP_CMD} build_ext --inplace
+
+do-install:
+ ${SETUP_CMD} install
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+.for file in ${DOCS}
+ @${INSTALL_MAN} ${WRKSRC}/${file} ${DOCSDIR}
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/databases/py-pyPgSQL/distinfo b/databases/py-pyPgSQL/distinfo
new file mode 100644
index 000000000000..d40100d58b7e
--- /dev/null
+++ b/databases/py-pyPgSQL/distinfo
@@ -0,0 +1 @@
+MD5 (pypgsql-1.6.tar.gz) = 3804f543cbe6cb2805eecc4c44913aea
diff --git a/databases/py-pyPgSQL/pkg-comment b/databases/py-pyPgSQL/pkg-comment
new file mode 100644
index 000000000000..bd8c0b14b657
--- /dev/null
+++ b/databases/py-pyPgSQL/pkg-comment
@@ -0,0 +1 @@
+A Python DB-API 2 compliant library for using PostgreSQL databases
diff --git a/databases/py-pyPgSQL/pkg-descr b/databases/py-pyPgSQL/pkg-descr
new file mode 100644
index 000000000000..fca21ad66902
--- /dev/null
+++ b/databases/py-pyPgSQL/pkg-descr
@@ -0,0 +1,12 @@
+pyPgSQL is a package of two modules that provide a Python DB-API 2.0 compliant
+interface to PostgreSQL databases. The first module, libpq, exports the
+PostgreSQL C API to Python. This module is written in C and can be compiled
+into Python or can be dynamically loaded on demand. The second module, PgSQL,
+provides the DB-API 2.0 compliant interface and support for various PostgreSQL
+data types, such as INT8, NUMERIC, MONEY, BOOL, ARRAYS, etc. This module is
+written in Python.
+
+WWW: http://pypgsql.sourceforge.net/
+developed by Bill Allie et al
+
+- Gerhard Haering <gerhard@bigfoot.de>
diff --git a/databases/py-pyPgSQL/pkg-plist b/databases/py-pyPgSQL/pkg-plist
new file mode 100644
index 000000000000..94fd9c4e06a6
--- /dev/null
+++ b/databases/py-pyPgSQL/pkg-plist
@@ -0,0 +1,6 @@
+%%PYTHON_SITELIBDIR%%/libpqmodule.so
+%%PYTHON_SITELIBDIR%%/PgSQL.py
+%%PYTHON_SITELIBDIR%%/PgSQL.pyc
+%%PORTDOCS%%share/doc/py-pyPgSQL/README
+@dirrm %%PORTDOCS%%share/doc/py-pyPgSQL
+