[118666] users/mojca/ports/science/root6/Portfile

mojca at macports.org mojca at macports.org
Mon Apr 7 14:29:10 PDT 2014


Revision: 118666
          https://trac.macports.org/changeset/118666
Author:   mojca at macports.org
Date:     2014-04-07 14:29:10 -0700 (Mon, 07 Apr 2014)
Log Message:
-----------
mojca/root: declare a conflict between root5 and root6, use version 5.99.05 or OS X < 10.9

Modified Paths:
--------------
    users/mojca/ports/science/root6/Portfile

Modified: users/mojca/ports/science/root6/Portfile
===================================================================
--- users/mojca/ports/science/root6/Portfile	2014-04-07 20:33:50 UTC (rev 118665)
+++ users/mojca/ports/science/root6/Portfile	2014-04-07 21:29:10 UTC (rev 118666)
@@ -2,6 +2,8 @@
 # $Id$
 
 PortSystem          1.0
+
+PortGroup           active_variants 1.1
 PortGroup           cmake 1.0
 PortGroup           github 1.0
 github.setup        root-mirror root 5-99-06 v
@@ -27,6 +29,16 @@
 checksums           rmd160  b8b5ae705aae185c0d6ed097a5efa6fbeb961bfb \
                     sha256  c873d536769ff06616c0a9981e7f1db2414eaca0a1bcab045d4073b36644981a
 
+# TODO: try to figure out if one could also build root6 on < 10.9
+# if {(${os.major} < 13 && ! [info exists configure.cxx_stdlib]) || (! [file exists /usr/lib/libc++.dylib])} {
+if {${os.major} < 13 } {
+    github.setup    root-mirror root e3dec6e203
+    name            root6
+    version         5.99.05-beta
+    checksums       rmd160  69f6a99413908eed7789bc30939a621f45eac7a2 \
+                    sha256  10f2956cd821471477a351c01355c2eb802c01e046764d18865e7416dfa810f8
+}
+
 dist_subdir         root
 configure.dir       ${workpath}/build
 build.dir           ${configure.dir}
@@ -243,7 +255,7 @@
         set over_no_dot [join [split ${over} "."] ""]
         append variant_line " conflicts python${over_no_dot}"
     }
-    append variant_line { {} }
+    append variant_line { { } }
     eval $variant_line
 }
 
@@ -259,6 +271,13 @@
 # If so, set it up.
 if { ${active_python_variant} != "" } {
     set ver_no_dot [join [split ${active_python_variant} "."] ""]
+    set portname root5
+    if {![catch {set result [active_variants ${portname} python${ver_no_dot}]}]} {
+        if {$result} {
+            ui_error "Cannot install ${name} with +python${ver_no_dot} variant"
+            return -code error "${portname} port is already installed with +python${ver_no_dot} and both cannot be active at once. Pick a different python variant."
+        }
+    }
     set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/${active_python_variant}
     configure.args-replace  -Dpython=OFF -Dpython=ON
     configure.args-append   -DPYTHON_INCLUDE_DIR="${mypydir}/Headers"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140407/7d7f1911/attachment.html>


More information about the macports-changes mailing list