Clean-up of databases/py-psycopg:

* Fix package specs in dependencies.
* Make the -examples subpackage not inherit the -main dependencies, and
  instead depend on any flavor of the -main package.
* Allow both the python2.4 and python2.5 flavors to build the -examples
  subpackage.  Its content is identical either way.  Take care that the
  PLIST_DB entry is the same.
* Don't attempt to use MODULES-${SUBPACKAGE}, which doesn't exist.
  We can't use the zope module here, anyway.
* Make FLAVOR references robust against mIXeD cAsE.

This is a bit complicated; I may have missed something.

Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/py-psycopg/Makefile,v
retrieving revision 1.34
diff -u -p -r1.34 Makefile
--- Makefile    26 Apr 2009 11:01:04 -0000      1.34
+++ Makefile    18 Jul 2009 22:51:16 -0000
@@ -8,10 +8,11 @@ COMMENT-zope=         database adapter for Zope
 
 VERSION=               1.1.21
 DISTNAME=              psycopg-${VERSION}
-PKGNAME=               py-${DISTNAME}p6
-PKGNAME-main=          py-${DISTNAME}p7
-FULLPKGNAME-examples=  py-psycopg-examples-${VERSION}p0
-FULLPKGNAME-zope=      py-psycopg-zope-${VERSION}p3
+PKGNAME=               py-${DISTNAME}
+PKGNAME-main=          py-${DISTNAME}p8
+FULLPKGNAME-examples=  py-psycopg-examples-${VERSION}p1
+FULLPKGPATH-examples=  databases/py-psycopg,-examples
+FULLPKGNAME-zope=      py-psycopg-zope-${VERSION}p4
 CATEGORIES=            databases
 
 HOMEPAGE=              http://initd.org/projects/psycopg1
@@ -27,27 +28,29 @@ WANTLIB-main=               crypto util pq
 MASTER_SITES=  http://initd.org/pub/software/psycopg/
 
 MODULES=       lang/python
-MODULES-zope=  www/zope
 
-BUILD_DEPENDS= :postgresql-server-*:databases/postgresql,-server
-RUN_DEPENDS=   :postgresql-client-*:databases/postgresql
+BUILD_DEPENDS= ::databases/postgresql,-server
+RUN_DEPENDS=   ::databases/postgresql
 
 FLAVORS=       python2.4 python2.5
 FLAVOR?=       python2.5
 
 .if ${FLAVOR:L:Mpython2.4} && !${FLAVOR:L:Npython2.4}
-MULTI_PACKAGES=        -main -zope
+MULTI_PACKAGES=        -main -examples -zope
 .elif ${FLAVOR:L:Mpython2.5} && !${FLAVOR:L:Npython2.5}
 MULTI_PACKAGES=        -main -examples
 .else
 ERRORS+=       "Fatal: You must select one version: ${FLAVORS}"
 .endif
 
-MODPY_VERSION= ${FLAVOR:S/python//}
-BUILD_DEPENDS+=        
:py-mxDateTime->=2.0.0*-${FLAVOR}:devel/py-mxDateTime,${FLAVOR}
-RUN_DEPENDS+=  :py-mxDateTime->=2.0.0*-${FLAVOR}:devel/py-mxDateTime,${FLAVOR}
+MODPY_VERSION= ${FLAVOR:L:S/python//}
+BUILD_DEPENDS+=        
:py-mxDateTime->=2.0.0-${FLAVOR:L}:devel/py-mxDateTime,${FLAVOR:L}
+RUN_DEPENDS+=  
:py-mxDateTime->=2.0.0-${FLAVOR:L}:devel/py-mxDateTime,${FLAVOR:L}
 
-RUN_DEPENDS-zope=      
:py-psycopg-${VERSION}*-python${MODZOPE_PYTHON_VERSION}:${BUILD_PKGPATH} \
+RUN_DEPENDS-examples=  :py-psycopg-${VERSION}:${PKGPATH}
+PKG_ARCH-examples=     *
+
+RUN_DEPENDS-zope=      :py-psycopg-${VERSION}-python2.4:${BUILD_PKGPATH} \
                        ${MODPY_RUN_DEPENDS}
 PKG_ARCH-zope=         *
 
Index: pkg/PLIST-examples
===================================================================
RCS file: /cvs/ports/databases/py-psycopg/pkg/PLIST-examples,v
retrieving revision 1.1
diff -u -p -r1.1 PLIST-examples
--- pkg/PLIST-examples  11 Jan 2008 09:09:22 -0000      1.1
+++ pkg/PLIST-examples  18 Jul 2009 22:51:16 -0000
@@ -1,4 +1,5 @@
 @comment $OpenBSD: PLIST-examples,v 1.1 2008/01/11 09:09:22 winiger Exp $
+...@pkgpath databases/py-psycopg,-examples,python2.5
 share/examples/py-psycopg/
 share/examples/py-psycopg/binary.py
 share/examples/py-psycopg/bool.py
-- 
Christian "naddy" Weisgerber                          [email protected]

Reply via email to