[35927] trunk/dports/python/py25-psycopg2/Portfile
wsiegrist at apple.com
wsiegrist at apple.com
Wed Apr 9 23:24:30 PDT 2008
Revision: 35927
http://trac.macosforge.org/projects/macports/changeset/35927
Author: wsiegrist at apple.com
Date: 2008-04-09 23:24:28 -0700 (Wed, 09 Apr 2008)
Log Message:
-----------
* Change postgresql82 support to a variant
* Add a postgresql83 variant
* Require that one of the postgresql variants is chosen.
Closes ticket #14929
Modified Paths:
--------------
trunk/dports/python/py25-psycopg2/Portfile
Modified: trunk/dports/python/py25-psycopg2/Portfile
===================================================================
--- trunk/dports/python/py25-psycopg2/Portfile 2008-04-10 05:59:01 UTC (rev 35926)
+++ trunk/dports/python/py25-psycopg2/Portfile 2008-04-10 06:24:28 UTC (rev 35927)
@@ -21,13 +21,35 @@
distname psycopg2-${version}
checksums md5 052e4b97dab47708fdcdc36ffb25af66
-depends_lib-append port:postgresql82 \
- port:openssl
+depends_lib-append port:openssl
patchfiles patch-setup.cfg
-post-patch {
- reinplace \
- s|@PG_CONFIG@|${prefix}/lib/postgresql82/bin/pg_config|g \
- ${worksrcpath}/setup.cfg
+
+variant postgresql82 description "Build using postgresql v8.2" {
+ depends_lib-append port:postgresql82
+
+ post-patch {
+ reinplace \
+ s|@PG_CONFIG@|${prefix}/lib/postgresql82/bin/pg_config|g \
+ ${worksrcpath}/setup.cfg
+ }
+
}
+
+variant postgresql83 description "Build using postgresql v8.3" {
+ depends_lib-append port:postgresql83
+
+ post-patch {
+ reinplace \
+ s|@PG_CONFIG@|${prefix}/lib/postgresql83/bin/pg_config|g \
+ ${worksrcpath}/setup.cfg
+ }
+}
+
+pre-patch {
+ if {![variant_isset postgresql83] && ![variant_isset postgresql82]} {
+ return -code error "You have to choose either +postgresql82 or +postgresql83"
+ }
+}
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080409/92aabfe8/attachment.html
More information about the macports-changes
mailing list