[87615] trunk/dports/gis/cgal/Portfile

ryandesign at macports.org ryandesign at macports.org
Mon Nov 28 13:12:21 PST 2011


Revision: 87615
          http://trac.macports.org/changeset/87615
Author:   ryandesign at macports.org
Date:     2011-11-28 13:12:21 -0800 (Mon, 28 Nov 2011)
Log Message:
-----------
cgal: prevent build failure when old version is active; see #31562

Modified Paths:
--------------
    trunk/dports/gis/cgal/Portfile

Modified: trunk/dports/gis/cgal/Portfile
===================================================================
--- trunk/dports/gis/cgal/Portfile	2011-11-28 21:11:56 UTC (rev 87614)
+++ trunk/dports/gis/cgal/Portfile	2011-11-28 21:12:21 UTC (rev 87615)
@@ -49,6 +49,19 @@
     }
 }
 
+pre-build {
+    # When building 3.9 with 3.8 active:
+    # error: 'CGAL_CORE_finite' was not declared in this scope
+    if {[file exists ${prefix}/include/CGAL/version.h]} {
+        set installed_version [exec awk {/^#define +CGAL_VERSION +/ {print $3}} ${prefix}/include/CGAL/version.h]
+        if {${version} != ${installed_version}} {
+            ui_error "${name} ${version} cannot be built while ${name} ${installed_version} is installed and active."
+            ui_error "Please deactivate ${name} ${installed_version} first."
+            return -code error "incompatible ${name} version active"
+        }
+    }
+}
+
 variant demos description {Create demos} {
 	PortGroup				qt4 1.0
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111128/d48a7c86/attachment.html>


More information about the macports-changes mailing list