Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  3 Jul 2003 07:52:55 -0400 (EDT)
From:      Tim Middleton <x@vex.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/54059: New port: psycopg database adapter for zope
Message-ID:  <20030703115255.7EF2E5C76@bee.vii.net>
Resent-Message-ID: <200307031200.h63C0Xlw082265@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         54059
>Category:       ports
>Synopsis:       New port: psycopg database adapter for zope
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 03 05:00:33 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Tim Middleton
>Release:        FreeBSD 5.1-RELEASE i386
>Organization:
The Cain Gang Ltd
>Environment:
System: FreeBSD bee.vii.net 5.1-RELEASE FreeBSD 5.1-RELEASE #3: Tue Jun 10 08:17:29 EDT 2003 toor@bee.vii.net:/usr/src/sys/i386/compile/BEE2 i386


>Description:
This port uses the py-psycopg port to install the Zope adapter portion
of the psycopg package (which is ignored by the other port). This might 
have been implemented as an option on the previous port, but I found it
easier just to make a new port depending on the other port; it makes it
quicker and more obvious to install rather than having to find and 
set environment variables. I hope this is acceptable... it works for me.

>How-To-Repeat:
>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	zope-psycopg
#	zope-psycopg/Makefile
#	zope-psycopg/distinfo
#	zope-psycopg/files
#	zope-psycopg/files/patch-configure
#	zope-psycopg/pkg-plist
#	zope-psycopg/pkg-descr
#	zope-psycopg/pkg-message
#
echo c - zope-psycopg
mkdir -p zope-psycopg > /dev/null 2>&1
echo x - zope-psycopg/Makefile
sed 's/^X//' >zope-psycopg/Makefile << 'END-of-zope-psycopg/Makefile'
X# New ports collection makefile for: zope-psycopg
X# Date created:		1 Jul 2003
X# Whom:			Tim Middleton
X#
X# $FreeBSD: ports/www/zope-cmf/Makefile,v 1.6 2003/03/07 06:12:56 ade Exp $
X#
X
XPORTNAME=		pyscopg
XPORTVERSION=	1.1.5.1
XCATEGORIES=		www zope
XMASTER_SITES=	http://initd.org/pub/software/psycopg/
XPKGNAMEPREFIX=	zope-
XDISTNAME=		psycopg-${PORTVERSION}
X
XMAINTAINER=		x@Vex.Net
XCOMMENT=	ZPsycopgDA - postgresql database adapter for Zope
X
XRUN_DEPENDS=	${PYTHON_LIBDIR}/site-packages/psycopgmodule.so:${PORTSDIR}/databases/py-psycopg
X
XDIST_SUBDIR=	python
XUSE_PYTHON=		yes
XUSE_ZOPE=		yes
XGNU_CONFIGURE=	yes
XUSE_GMAKE=		yes
X
X# Note: the env variable PYTHON_VERSION is used by psycopg configure script,
X# so if you set it using FreeBSD's values it will wreck the configure script.
X# if you need to override the default, uncomment below and hard code it.
X#PYTHON_VERSION=python2.2
X
XCONFIGURE_ARGS=	--with-python=${PYTHON_CMD} \
X		--with-postgres-libraries=${LOCALBASE}/lib \
X		--with-postgres-includes=${LOCALBASE}/include \
X		--with-mxdatetime-includes=${DATETIME_INC} \
X		--with-zope=${ZOPEBASEDIR}
X
XDATETIME_INC=	${PYTHON_SITELIBDIR}/mx/DateTime/mxDateTime/
XZOPEPRODUCTNAME=ZPsycopgDA
X
XPLIST_SUB=	ZOPEBASEDIR=${SZOPEBASEDIR}
XWRKSRC=		${WRKDIR}/${DISTNAME}
XCPIO=		cpio --quiet -pdum -R
X
Xdo-build:
X	@${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/${ZOPEPRODUCTNAME}
X
Xdo-install:
X	@echo ${WRKSRC}
X	@cd ${WRKSRC} && ${MAKE} install-zope
X
Xpost-install:
X.if !defined(BATCH)
X	@${CAT} ${PKGMESSAGE}
X.endif
X
X.include <bsd.port.mk>
END-of-zope-psycopg/Makefile
echo x - zope-psycopg/distinfo
sed 's/^X//' >zope-psycopg/distinfo << 'END-of-zope-psycopg/distinfo'
XMD5 (psycopg-1.1.5.1.tar.gz) = 01ffd2a77d722c736281631ed9537259
END-of-zope-psycopg/distinfo
echo c - zope-psycopg/files
mkdir -p zope-psycopg/files > /dev/null 2>&1
echo x - zope-psycopg/files/patch-configure
sed 's/^X//' >zope-psycopg/files/patch-configure << 'END-of-zope-psycopg/files/patch-configure'
X--- configure.orig	Sun Jun 22 18:42:26 2003
X+++ configure	Wed Jul  2 00:14:16 2003
X@@ -1320,9 +1320,9 @@
X echo $ac_n "checking PostgreSQL type catalog""... $ac_c" 1>&6
X echo "configure:1322: checking PostgreSQL type catalog" >&5
X-if test -d $PGSQLDIR/catalog ; then
X-  PGSQLTYPES="$PGSQLDIR/catalog/pg_type.h"
X+if test -d $PGSQLDIR/postgresql/catalog ; then
X+  PGSQLTYPES="$PGSQLDIR/postgresql/catalog/pg_type.h"
X else
X-  if test -d $PGSQLDIR/server/catalog ; then
X-    PGSQLTYPES="$PGSQLDIR/server/catalog/pg_type.h"
X+  if test -d $PGSQLDIR/postgresql/server/catalog ; then
X+    PGSQLTYPES="$PGSQLDIR/postgresql/server/catalog/pg_type.h"
X     PGSQLDIR="$PGSQLDIR/server"
X     CPPFLAGS="$CPPFLAGS -I$PGSQLDIR"
END-of-zope-psycopg/files/patch-configure
echo x - zope-psycopg/pkg-plist
sed 's/^X//' >zope-psycopg/pkg-plist << 'END-of-zope-psycopg/pkg-plist'
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/DA.py
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/DA.pyc
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/DABase.py
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/DABase.pyc
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/__init__.py
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/__init__.pyc
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/browse.dtml
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/connectionAdd.dtml
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/connectionEdit.dtml
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/db.py
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/db.pyc
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/icons/bin.gif
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/icons/date.gif
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/icons/datetime.gif
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/icons/field.gif
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/icons/float.gif
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/icons/int.gif
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/icons/stable.gif
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/icons/table.gif
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/icons/text.gif
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/icons/time.gif
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/icons/view.gif
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/icons/what.gif
X%%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/table_info.dtml
X@dirrm %%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA/icons
X@dirrm %%ZOPEBASEDIR%%/lib/python/Products/ZPsycopgDA
END-of-zope-psycopg/pkg-plist
echo x - zope-psycopg/pkg-descr
sed 's/^X//' >zope-psycopg/pkg-descr << 'END-of-zope-psycopg/pkg-descr'
XZPsycopgDA is a Zope database adapter for the high performance, 
Xmulti-threaded python interface to PostgreSQL known as Psycopg. 
X
XWWW: http://www.zope.org/Members/fog/psycopg
END-of-zope-psycopg/pkg-descr
echo x - zope-psycopg/pkg-message
sed 's/^X//' >zope-psycopg/pkg-message << 'END-of-zope-psycopg/pkg-message'
XZPsycopgDA
X
X    To complete the installation of the ZPsycopg Database Adaptor:
X
X    - Restart Zope.  This may be done from the Zope Control Panel.
X
X    - Verify that the ZPsycopgDA product is loaded properly by 
X      examining them in Control_Panel/Products.
X
END-of-zope-psycopg/pkg-message
exit


>Release-Note:
>Audit-Trail:
>Unformatted:



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