[88877] trunk/dports/python/py-mysql/Portfile

ryandesign at macports.org ryandesign at macports.org
Fri Jan 13 22:00:51 PST 2012


Revision: 88877
          http://trac.macports.org/changeset/88877
Author:   ryandesign at macports.org
Date:     2012-01-13 22:00:50 -0800 (Fri, 13 Jan 2012)
Log Message:
-----------
py-mysql: fix install of stub port; see http://lists.macosforge.org/pipermail/macports-users/2012-January/027021.html

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

Modified: trunk/dports/python/py-mysql/Portfile
===================================================================
--- trunk/dports/python/py-mysql/Portfile	2012-01-14 04:54:52 UTC (rev 88876)
+++ trunk/dports/python/py-mysql/Portfile	2012-01-14 06:00:50 UTC (rev 88877)
@@ -21,45 +21,48 @@
 checksums           rmd160  e394e7bf08127068795aeebfbaea7dc3b2127c86 \
                     sha256  7de66fbbf923634e7c965aeaefa74642ba75ae20ee1cefcefc3009595b7a7e6e
 
-patch.pre_args      -p1
-patchfiles          patch-site.cfg.diff
-
 python.versions     24 25 26 27
 python.default_version 27
 
-pre-fetch {
-    if {![variant_isset mysql4] && ![variant_isset mysql5]} {
-        return -code error "you must select either mysql4 or mysql5"
-    }
-}
-
 if {$subport != $name} {
     depends_lib-append	port:py${python.version}-distribute
+    
+    patch.pre_args      -p1
+    patchfiles          patch-site.cfg.diff
+    
     post-patch {
     reinplace "s|@PREFIX@|${prefix}|g" \
         ${worksrcpath}/site.cfg
     reinplace "s|@MYSQL_SUFFIX@|${mysql_suffix}|g" \
         ${worksrcpath}/site.cfg
     }
+    
+    pre-configure {
+        if {![variant_isset mysql4] && ![variant_isset mysql5]} {
+            return -code error "you must select either mysql4 or mysql5"
+        }
+    }
+    
     post-destroot {
         xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}
         xinstall -m 644 -W ${worksrcpath} \
             HISTORY README \
             ${destroot}${prefix}/share/doc/${subport}
     }
+    
+    variant mysql4 conflicts mysql5 description {Build with MySQL 4} {
+        depends_lib-append	port:mysql4
+    }
+    
+    variant mysql5 conflicts mysql4 description {Build with MySQL 5} {
+        depends_lib-append	path:bin/mysql_config5:mysql5
+    }
+    
+    set mysql_suffix    {}
+    if {![variant_isset mysql4]} {
+        set mysql_suffix 5
+        default_variants +mysql5
+    }
+    
     livecheck.type      none
 }
-
-variant mysql4 conflicts mysql5 description {Build with MySQL 4} {
-depends_lib-append	port:mysql4
-}
-
-variant mysql5 conflicts mysql4 description {Build with MySQL 5} {
-depends_lib-append	path:bin/mysql_config5:mysql5
-}
-
-set mysql_suffix    {}
-if {![variant_isset mysql4]} {
-set mysql_suffix 5
-default_variants +mysql5
-}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120113/e7785ffc/attachment.html>


More information about the macports-changes mailing list