diff options
author | wjv <wjv@FreeBSD.org> | 2002-10-23 22:33:47 +0800 |
---|---|---|
committer | wjv <wjv@FreeBSD.org> | 2002-10-23 22:33:47 +0800 |
commit | 118efd8d3a741d02eb5b1e49a21e09729dc00a65 (patch) | |
tree | 12a52b4ff0c55fae69307344d2465bfcfc61b247 /databases | |
parent | 2b052d4168858c0d1db491ad05d2171795b45197 (diff) | |
download | freebsd-ports-gnome-118efd8d3a741d02eb5b1e49a21e09729dc00a65.tar.gz freebsd-ports-gnome-118efd8d3a741d02eb5b1e49a21e09729dc00a65.tar.zst freebsd-ports-gnome-118efd8d3a741d02eb5b1e49a21e09729dc00a65.zip |
- Make this port a subport of databases/postgresql7, since the development of
PyGreSQL has been folded into that of PostgreSQL itself.
- This update effectivly takes PyGreSQL to version 3.3, which is distributed
with PostgreSQL 7.2.3.
- Byte-compile installed modules to ensure clean deinstallation.
- Install documentation under $DOCSDIR.
- Remove Makefile from $FILESDIR - not required anymore.
- Remove patch-pgdb.py - not required any longer.
- Add two patches to ensure installation is $PREFIX-clean.
- Update pkg-comment and pkg-descr to reflect the current status of the port.
Diffstat (limited to 'databases')
-rw-r--r-- | databases/py-PyGreSQL/Makefile | 34 | ||||
-rw-r--r-- | databases/py-PyGreSQL/distinfo | 2 | ||||
-rw-r--r-- | databases/py-PyGreSQL/files/Makefile | 26 | ||||
-rw-r--r-- | databases/py-PyGreSQL/files/patch-configure | 11 | ||||
-rw-r--r-- | databases/py-PyGreSQL/files/patch-pgdb.py | 28 | ||||
-rw-r--r-- | databases/py-PyGreSQL/files/patch-src::interfaces::python::GNUmakefile | 28 | ||||
-rw-r--r-- | databases/py-PyGreSQL/pkg-comment | 2 | ||||
-rw-r--r-- | databases/py-PyGreSQL/pkg-descr | 13 | ||||
-rw-r--r-- | databases/py-PyGreSQL/pkg-plist | 7 |
9 files changed, 74 insertions, 77 deletions
diff --git a/databases/py-PyGreSQL/Makefile b/databases/py-PyGreSQL/Makefile index cce6e9802056..12768f05fd94 100644 --- a/databases/py-PyGreSQL/Makefile +++ b/databases/py-PyGreSQL/Makefile @@ -6,33 +6,37 @@ # PORTNAME= PyGreSQL -PORTVERSION= 3.1 -PORTREVISION= 2 CATEGORIES= databases python -MASTER_SITES= ftp://ftp.druid.net/pub/distrib/ -PKGNAMEPREFIX= py- -DISTNAME= PyGreSQL-${PORTVERSION} -EXTRACT_SUFX= .tgz +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= ports@FreeBSD.org +POSTGRESQL_SUBPORT= YES +.include <${.CURDIR}/../postgresql7/Makefile> + 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 USE_PYTHON= yes -MAKE_ENV= PYTHON_VERSION=${PYTHON_VERSION} \ - PYTHON_LIBDIR=${PYTHON_LIBDIR} \ - PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR} \ - PYTHON=${PYTHON_CMD} \ - LN="${LN}" SETENV="${SETENV}" MKDIR="${MKDIR}" +CONFIGURE_ARGS= --with-python --prefix=${PREFIX} +MAKE_ARGS+= -C src/interfaces/python +CFLAGS+= -L${LOCALBASE}/lib +MAKEFILE= GNUmakefile DATETIME_DEP= ${PYTHON_SITELIBDIR}/mx/DateTime/__init__.py -pre-build: - ${CP} ${FILESDIR}/Makefile ${WRKSRC}/Makefile - post-install: - ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/README.PyGreSQL + @ ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py -lf \ + ${PYTHONPREFIX_SITELIBDIR} + @ ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py -lf \ + ${PYTHONPREFIX_SITELIBDIR} +.if !defined(NOPORTDOCS) +.for docfile in Announce ChangeLog README + @ ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/src/interfaces/python/${docfile} \ + ${DOCSDIR} +.endfor +.endif .include <bsd.port.mk> diff --git a/databases/py-PyGreSQL/distinfo b/databases/py-PyGreSQL/distinfo index eea1cb60cbcc..3337d05bba24 100644 --- a/databases/py-PyGreSQL/distinfo +++ b/databases/py-PyGreSQL/distinfo @@ -1 +1 @@ -MD5 (PyGreSQL-3.1.tgz) = 6c7cef080d3c3b732ff7090dc9e051c1 +MD5 (PyGreSQL-3.2.tgz) = 3c8533442da556b548f63150034e5e74 diff --git a/databases/py-PyGreSQL/files/Makefile b/databases/py-PyGreSQL/files/Makefile deleted file mode 100644 index 5b5c5edbdba7..000000000000 --- a/databases/py-PyGreSQL/files/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# grr, commit_prep wants the next line -# $FreeBSD$ -.SUFFIXES: .py .pyc - -all: _pgmodule.so pg.pyc pgdb.pyc - -install: - @${MKDIR} ${PYTHON_SITELIBDIR} - ${BSD_INSTALL_PROGRAM} _pgmodule.so ${PYTHON_SITELIBDIR} - ${BSD_INSTALL_DATA} pg.py pg.pyc pgdb.py pgdb.pyc \ - ${PYTHON_SITELIBDIR} - -clean: - rm -f *.so *.o *.pyc - -_pgmodule.so: pgmodule.o - ${LD} -Bshareable -lc_r -L${PYTHON_LIBDIR}/config \ - -l${PYTHON_VERSION} -L${PREFIX}/lib -L${PREFIX}/pgsql/lib -lpq \ - ${.ALLSRC} -o ${.TARGET} - -pgmodule.o: pgmodule.c - ${CC} -c -I${PREFIX}/include/${PYTHON_VERSION} \ - -I${PREFIX}/include -I${PREFIX}/pgsql/include ${.ALLSRC} - -.py.pyc: - ${SETENV} PYTHONPATH=${.CURDIR} ${PYTHON} -c 'import ${.IMPSRC:.py=}' diff --git a/databases/py-PyGreSQL/files/patch-configure b/databases/py-PyGreSQL/files/patch-configure new file mode 100644 index 000000000000..d52de30b0cc7 --- /dev/null +++ b/databases/py-PyGreSQL/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig Tue Oct 1 05:34:27 2002 ++++ configure Wed Oct 23 15:50:31 2002 +@@ -3239,7 +3239,7 @@ + echo $ac_n "checking Python installation directories""... $ac_c" 1>&6 + echo "configure:3241: checking Python installation directories" >&5 + python_version=`${PYTHON} -c "import sys; print sys.version[:3]"` +-python_prefix=`${PYTHON} -c "import sys; print sys.prefix"` ++python_prefix="${prefix}" + python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"` + python_configdir="${python_execprefix}/lib/python${python_version}/config" + python_moduledir="${python_prefix}/lib/python${python_version}/site-packages" diff --git a/databases/py-PyGreSQL/files/patch-pgdb.py b/databases/py-PyGreSQL/files/patch-pgdb.py deleted file mode 100644 index 1210ef8e5fa0..000000000000 --- a/databases/py-PyGreSQL/files/patch-pgdb.py +++ /dev/null @@ -1,28 +0,0 @@ ---- pgdb.py.orig Sun Nov 5 20:15:26 2000 -+++ pgdb.py Thu Nov 29 17:38:24 2001 -@@ -58,7 +58,7 @@ - import string - import exceptions - import types --import DateTime -+import mx.DateTime - import time - - ### module constants -@@ -384,13 +384,13 @@ - - # mandatory type helpers - def Date(year, month, day): -- return DateTime.DateTime(year, month, day) -+ return mx.DateTime.DateTime(year, month, day) - - def Time(hour, minute, second): -- return DateTime.TimeDelta(hour, minute, second) -+ return mx.DateTime.TimeDelta(hour, minute, second) - - def Timestamp(year, month, day, hour, minute, second): -- return DateTime.DateTime(year, month, day, hour, minute, second) -+ return mx.DateTime.DateTime(year, month, day, hour, minute, second) - - def DateFromTicks(ticks): - return apply(Date, time.localtime(ticks)[:3]) diff --git a/databases/py-PyGreSQL/files/patch-src::interfaces::python::GNUmakefile b/databases/py-PyGreSQL/files/patch-src::interfaces::python::GNUmakefile new file mode 100644 index 000000000000..6b74261b7c1f --- /dev/null +++ b/databases/py-PyGreSQL/files/patch-src::interfaces::python::GNUmakefile @@ -0,0 +1,28 @@ +--- src/interfaces/python/GNUmakefile.orig Thu Dec 13 20:39:04 2001 ++++ src/interfaces/python/GNUmakefile Wed Oct 23 15:52:18 2002 +@@ -34,9 +34,9 @@ + echo "*** become the appropriate user, and do '$(MAKE) install'."; } + + install: all installdirs +- @if test -w $(DESTDIR)$(python_moduleexecdir) && test -w $(DESTDIR)$(python_moduledir); then \ +- echo "$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX)"; \ +- $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX); \ ++ @if test -w $(DESTDIR)$(python_moduledir); then \ ++ echo "$(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduledir)/_pgmodule$(DLSUFFIX)"; \ ++ $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(python_moduledir)/_pgmodule$(DLSUFFIX); \ + \ + echo "$(INSTALL_DATA) $(srcdir)/pg.py $(DESTDIR)$(python_moduledir)/pg.py"; \ + $(INSTALL_DATA) $(srcdir)/pg.py $(DESTDIR)$(python_moduledir)/pg.py; \ +@@ -48,10 +48,10 @@ + fi + + installdirs: +- $(mkinstalldirs) $(DESTDIR)$(python_moduleexecdir) $(DESTDIR)$(python_moduledir) ++ $(mkinstalldirs) $(DESTDIR)$(python_moduledir) + + uninstall: +- rm -f $(DESTDIR)$(python_moduleexecdir)/_pgmodule$(DLSUFFIX) \ ++ rm -f $(DESTDIR)$(python_moduledir)/_pgmodule$(DLSUFFIX) \ + $(DESTDIR)$(python_moduledir)/pg.py \ + $(DESTDIR)$(python_moduledir)/pgdb.py + diff --git a/databases/py-PyGreSQL/pkg-comment b/databases/py-PyGreSQL/pkg-comment index d3d1a6382856..e74d367439fa 100644 --- a/databases/py-PyGreSQL/pkg-comment +++ b/databases/py-PyGreSQL/pkg-comment @@ -1 +1 @@ -A Python interface for PostgreSQL database +A Python interface to PostgreSQL, including a DP-API 2.0 wrapper diff --git a/databases/py-PyGreSQL/pkg-descr b/databases/py-PyGreSQL/pkg-descr index 7d2844cbbdac..0a7ffaabe53b 100644 --- a/databases/py-PyGreSQL/pkg-descr +++ b/databases/py-PyGreSQL/pkg-descr @@ -1,9 +1,12 @@ From the README: -PyGreSQL is a python module that interfaces to a PostgreSQL database. It -embeds the PostgreSQL query library to allow easy use of the powerful -PostgreSQL features from a Python script. + PyGreSQL is a python module that interfaces to a PostgreSQL database. It + embeds the PostgreSQL query library to allow easy use of the powerful + PostgreSQL features from a Python script. -Jacques Vidrine <n@nectar.com> +As of version 3.2, PyGreSQL was folded into the PostgreSQL development tree. +PyGreSQL includes a DB-API 2.0 compliant API wrapper. -WWW: http://www.druid.net/pygresql/ +Author: D'Arcy J.M. Cain <darcy@druid.net> +WWW: http://www.druid.net/pygresql/ +See also: http://www.postgresql.org/idocs/index.php?pygresql.html diff --git a/databases/py-PyGreSQL/pkg-plist b/databases/py-PyGreSQL/pkg-plist index ea0dd1d957f7..ffef5c1b2751 100644 --- a/databases/py-PyGreSQL/pkg-plist +++ b/databases/py-PyGreSQL/pkg-plist @@ -1,6 +1,11 @@ +%%PORTDOCS%%share/doc/PyGreSQL/Announce +%%PORTDOCS%%share/doc/PyGreSQL/ChangeLog +%%PORTDOCS%%share/doc/PyGreSQL/README lib/%%PYTHON_VERSION%%/site-packages/_pgmodule.so lib/%%PYTHON_VERSION%%/site-packages/pg.py lib/%%PYTHON_VERSION%%/site-packages/pg.pyc +lib/%%PYTHON_VERSION%%/site-packages/pg.pyo lib/%%PYTHON_VERSION%%/site-packages/pgdb.py lib/%%PYTHON_VERSION%%/site-packages/pgdb.pyc -share/doc/README.PyGreSQL +lib/%%PYTHON_VERSION%%/site-packages/pgdb.pyo +%%PORTDOCS%%@dirrm share/doc/PyGreSQL |