1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-21 20:38:45 +00:00

- 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.
This commit is contained in:
Johann Visagie 2002-10-23 14:33:47 +00:00
parent 7ffcc2733f
commit 6cd163c1f8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=68661
9 changed files with 74 additions and 77 deletions

View File

@ -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>

View File

@ -1 +1 @@
MD5 (PyGreSQL-3.1.tgz) = 6c7cef080d3c3b732ff7090dc9e051c1
MD5 (PyGreSQL-3.2.tgz) = 3c8533442da556b548f63150034e5e74

View File

@ -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=}'

View File

@ -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"

View File

@ -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])

View File

@ -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

View File

@ -1 +1 @@
A Python interface for PostgreSQL database
A Python interface to PostgreSQL, including a DP-API 2.0 wrapper

View File

@ -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

View File

@ -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