[34517] trunk/dports/python/py-psycopg/Portfile

raimue at macports.org raimue at macports.org
Wed Feb 27 02:52:31 PST 2008


Revision: 34517
          http://trac.macosforge.org/projects/macports/changeset/34517
Author:   raimue at macports.org
Date:     2008-02-27 02:52:30 -0800 (Wed, 27 Feb 2008)

Log Message:
-----------
python/py-psycopg:
Add +postgresql82 and +postgresql83

Modified Paths:
--------------
    trunk/dports/python/py-psycopg/Portfile

Modified: trunk/dports/python/py-psycopg/Portfile
===================================================================
--- trunk/dports/python/py-psycopg/Portfile	2008-02-27 10:43:25 UTC (rev 34516)
+++ trunk/dports/python/py-psycopg/Portfile	2008-02-27 10:52:30 UTC (rev 34517)
@@ -19,17 +19,32 @@
 distname		psycopg-${version}
 checksums		md5 a31f79f68d6d32898d6f24e11369a106
 
-depends_lib		port:postgresql82 \
-				port:py-mx \
-				port:python24 \
-				port:openssl
+depends_lib		port:py-mx \
+			port:python24 \
+			port:openssl
 
 configure.env	LDFLAGS="-L${prefix}/lib -lssl" \
 				CPPFLAGS="-I${prefix}/lib/python2.4/site-packages/mx/DateTime/mxDateTime/"
-configure.args	--with-postgres-includes=${prefix}/include/postgresql82/ \
-				--with-postgres-libraries=${prefix}/lib/postgresql82/ \
-				--with-python=${prefix}/bin/python2.4
+configure.args	--with-python=${prefix}/bin/python2.4
 
+variant postgresql82 conflicts postgresql83 description {Build against postgresql82} {
+	depends_lib-append	port:postgresql82
+	configure.args-append	--with-postgres-includes=${prefix}/include/postgresql82/ \
+				--with-postgres-libraries=${prefix}/lib/postgresql82/
+}
+
+variant postgresql83 conflicts postgresql82 description {Build against postgresql83} {
+	depends_lib-append	port:postgresql83
+	configure.args-append	--with-postgres-includes=${prefix}/include/postgresql83/ \
+				--with-postgres-libraries=${prefix}/lib/postgresql83/
+}
+
+pre-configure {
+    if {![variant_isset postgresql83] && ![variant_isset postgresql82]} {
+	return -code error "You have to choose either +postgresql82 or +postgresql83"
+    }
+}
+
 post-configure {
 	reinplace "s|PY_LIB_DIR = \$(prefix)|\
 		PY_LIB_DIR = ${destroot}${prefix}|g" ${worksrcpath}/Makefile

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080227/ccb6f00e/attachment-0001.html 


More information about the macports-changes mailing list