[50884] trunk/dports/graphics/vtk-devel/Portfile

ryandesign at macports.org ryandesign at macports.org
Tue May 12 00:00:12 PDT 2009


Revision: 50884
          http://trac.macports.org/changeset/50884
Author:   ryandesign at macports.org
Date:     2009-05-12 00:00:11 -0700 (Tue, 12 May 2009)
Log Message:
-----------
vtk-devel: don't try to call mysql_config or pg_config until they have been installed

Modified Paths:
--------------
    trunk/dports/graphics/vtk-devel/Portfile

Modified: trunk/dports/graphics/vtk-devel/Portfile
===================================================================
--- trunk/dports/graphics/vtk-devel/Portfile	2009-05-12 06:56:55 UTC (rev 50883)
+++ trunk/dports/graphics/vtk-devel/Portfile	2009-05-12 07:00:11 UTC (rev 50884)
@@ -530,46 +530,50 @@
 
 
 variant mysql5 description {build the MySQL driver for vtkSQLDatabase} {
-    # Find the directory containing mysql.h
-    set includePath [exec ${prefix}/bin/mysql_config5 --include]
-    set includePath [exec ${prefix}/bin/mysql_config5 --include]
-    set includePath [string trim ${includePath} -I ]
-    #if [ exec find $includePath -name "mysql.h" ]
-    set libs [exec ${prefix}/bin/mysql_config5 --libs]
-    set libIdx [lsearch -regex $libs "${prefix}/lib/mysql"]
-    set libPath [lindex $libs $libIdx]
-    set libPath [string trim ${libPath} -L ]
-    set libFile [exec find ${libPath} -name "libmysqlclient.dylib"]
     depends_lib-append \
         path:bin/mysql_config5:mysql5 \
         port:zlib
-    configure.args-append \
-        -DVTK_USE_MYSQL:BOOL=ON \
-        -DMYSQL_INCLUDE_DIRECTORIES:PATH=${includePath} \
-        -DMYSQL_LIBRARY:FILEPATH=${libFile} \
-        -DMYSQL_EXTRA_LIBRARIES:FILEPATH=${prefix}/lib/libz.dylib
-        # A URL for a MySQL server of the form
-        # mysql://[[username[:password]@]hostname[:port]]/[dbname]
-        #VTK_MYSQL_TEST_URL:STRING=
+    pre-configure {
+        # Find the directory containing mysql.h
+        set includePath [exec ${prefix}/bin/mysql_config5 --include]
+        set includePath [exec ${prefix}/bin/mysql_config5 --include]
+        set includePath [string trim ${includePath} -I ]
+        #if [ exec find $includePath -name "mysql.h" ]
+        set libs [exec ${prefix}/bin/mysql_config5 --libs]
+        set libIdx [lsearch -regex $libs "${prefix}/lib/mysql"]
+        set libPath [lindex $libs $libIdx]
+        set libPath [string trim ${libPath} -L ]
+        set libFile [exec find ${libPath} -name "libmysqlclient.dylib"]
+        configure.args-append \
+            -DVTK_USE_MYSQL:BOOL=ON \
+            -DMYSQL_INCLUDE_DIRECTORIES:PATH=${includePath} \
+            -DMYSQL_LIBRARY:FILEPATH=${libFile} \
+            -DMYSQL_EXTRA_LIBRARIES:FILEPATH=${prefix}/lib/libz.dylib
+            # A URL for a MySQL server of the form
+            # mysql://[[username[:password]@]hostname[:port]]/[dbname]
+            #VTK_MYSQL_TEST_URL:STRING=
+    }
 }
 
 
 variant pgsql83 description {build the PostgreSQL 8.3 driver for vtkSQLDatabase} {
-    set pgconf [exec ${prefix}/lib/postgresql83/bin/pg_config ]
-    set includeIdx [lsearch -regex ${pgconf} "^INCLUDEDIR"]
-    set includePath [lindex ${pgconf} [expr ${includeIdx} + 2]]
-    set libIdx [lsearch -regex $pgconf "^LIBDIR"]
-    set libPath [lindex $pgconf [expr $libIdx + 2]]
-    set libFile [exec find ${libPath} -name "libpq.dylib"]
     depends_lib-append \
         path:lib/postgresql83/bin/pg_config:postgresql83
-    configure.args-append \
-        -DVTK_USE_POSTGRES:BOOL=ON \
-        -DPOSTGRES_INCLUDE_DIRECTORIES:PATH=${includePath} \
-        -DPOSTGRES_LIBRARIES:FILEPATH=${libFile}
-        #// A URL for a PostgreSQL server of the form
-        #// psql://[[username[:password]@]hostname[:port]]/[dbname]
-        #VTK_PSQL_TEST_URL:STRING=
+    pre-configure {
+        set pgconf [exec ${prefix}/lib/postgresql83/bin/pg_config ]
+        set includeIdx [lsearch -regex ${pgconf} "^INCLUDEDIR"]
+        set includePath [lindex ${pgconf} [expr ${includeIdx} + 2]]
+        set libIdx [lsearch -regex $pgconf "^LIBDIR"]
+        set libPath [lindex $pgconf [expr $libIdx + 2]]
+        set libFile [exec find ${libPath} -name "libpq.dylib"]
+        configure.args-append \
+            -DVTK_USE_POSTGRES:BOOL=ON \
+            -DPOSTGRES_INCLUDE_DIRECTORIES:PATH=${includePath} \
+            -DPOSTGRES_LIBRARIES:FILEPATH=${libFile}
+            #// A URL for a PostgreSQL server of the form
+            #// psql://[[username[:password]@]hostname[:port]]/[dbname]
+            #VTK_PSQL_TEST_URL:STRING=
+    }
 }
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090512/269957e7/attachment-0001.html>


More information about the macports-changes mailing list