[118672] users/mojca

mojca at macports.org mojca at macports.org
Mon Apr 7 15:26:49 PDT 2014


Revision: 118672
          https://trac.macports.org/changeset/118672
Author:   mojca at macports.org
Date:     2014-04-07 15:26:48 -0700 (Mon, 07 Apr 2014)
Log Message:
-----------
mojca/root: proposal for root5 by Chris

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

Added Paths:
-----------
    users/mojca/backup/
    users/mojca/backup/root/
    users/mojca/backup/root5/
    users/mojca/ports/science/root/
    users/mojca/ports/science/root/Portfile
    users/mojca/ports/science/root5/

Removed Paths:
-------------
    users/mojca/ports/science/root/
    users/mojca/ports/science/root5/

Added: users/mojca/ports/science/root/Portfile
===================================================================
--- users/mojca/ports/science/root/Portfile	                        (rev 0)
+++ users/mojca/ports/science/root/Portfile	2014-04-07 22:26:48 UTC (rev 118672)
@@ -0,0 +1,13 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+
+replaced_by         root5
+PortGroup           obsolete 1.0
+
+name                root
+version             5.34.18
+revision            1
+
+categories          science


Property changes on: users/mojca/ports/science/root/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Modified: users/mojca/ports/science/root5/Portfile
===================================================================
--- trunk/dports/science/root/Portfile	2014-04-03 20:15:53 UTC (rev 118522)
+++ users/mojca/ports/science/root5/Portfile	2014-04-07 22:26:48 UTC (rev 118672)
@@ -3,8 +3,11 @@
 
 PortSystem          1.0
 
-name                root
+PortGroup           active_variants 1.1
+
+name                root5
 version             5.34.18
+set version_major   5
 
 categories          science
 maintainers         gmail.com:mattiafrancescomoro hep.phy.cam.ac.uk:jonesc
@@ -15,7 +18,7 @@
                     of data in a very efficient way
 homepage            http://root.cern.ch/
 platforms           darwin
-distname            ${name}_v${version}.source
+distname            root_v${version}.source
 master_sites        http://root.cern.ch/download/ \
                     ftp://root.cern.ch/root/
 
@@ -32,7 +35,8 @@
                     port:giflib \
                     port:tiff \
                     port:gmp \
-                    port:expat
+                    port:expat \
+                    port:lzma
                   # port:freetype
 
 post-patch {
@@ -57,11 +61,20 @@
     }
 }
 
-configure.args      --docdir=${prefix}/share/doc/${name} \
-                    --libdir=${prefix}/lib/${name} \
-                    --testdir=${prefix}/share/${name}/test \
-                    --tutdir=${prefix}/share/${name}/tutorials \
-                    --etcdir=${prefix}/etc/${name} \
+# port specific location. For 'port select'
+set install_bindir ${prefix}/libexec/root${version_major}
+# Install directly into prefix
+#set install_bindir ${prefix}/bin
+
+configure.args      --bindir=${install_bindir}\
+                    --incdir=${prefix}/include/root${version_major}\
+                    --docdir=${prefix}/share/doc/root${version_major}\
+                    --libdir=${prefix}/lib/root${version_major} \
+                    --testdir=${prefix}/share/root${version_major}/test \
+                    --tutdir=${prefix}/share/root${version_major}/tutorials \
+                    --etcdir=${prefix}/etc/root${version_major} \
+                    --datadir=${prefix}/share/root${version_major} \
+                    --mandir=${prefix}/share/man/root${version_major} \
                     --disable-builtin-glew \
                     --disable-builtin-pcre \
                     --disable-builtin-zlib \
@@ -140,7 +153,7 @@
 }
 
 post-destroot {
-    reinplace "s|lib/python/genreflex|lib/root/python/genreflex|g" ${destroot}${prefix}/bin/genreflex
+    reinplace "s|lib/python/genreflex|lib/root5/python/genreflex|g" ${destroot}${install_bindir}/genreflex
 }
 
 variant debug description {Enable a debug build} {
@@ -225,7 +238,7 @@
     configure.args-delete   --disable-tmva
     configure.args-append   --enable-tmva
     post-destroot {
-        set tmvaTuts ${destroot}${prefix}/share/${name}/tutorials/tmva
+        set tmvaTuts ${destroot}${prefix}/share/root${version_major}/tutorials/tmva
         file mkdir ${tmvaTuts}
         foreach f [glob ${worksrcpath}/tmva/test/*] { file copy $f ${tmvaTuts}/ }
     }
@@ -258,7 +271,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
 }
 
@@ -274,6 +287,12 @@
 # If so, set it up.
 if { ${active_python_variant} != "" } {
     set ver_no_dot [join [split ${active_python_variant} "."] ""]
+    if {![catch {set result [active_variants root6 python${ver_no_dot}]}]} {
+        if {$result} {
+            ui_error "Cannot install ${name} with +python${ver_no_dot} variant"
+            return -code error "root5 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-delete   --disable-python
     configure.args-append   --enable-python \
@@ -284,8 +303,8 @@
         set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/${active_python_variant}/lib/python${active_python_variant}
         set mypysitedir ${mypylibdir}/site-packages/
         file mkdir ${destroot}${mypysitedir}
-        foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} }
-        ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
+        foreach pyfile [glob ${destroot}${prefix}/lib/root${version_major}/*.py*] { move $pyfile ${destroot}${mypysitedir} }
+        ln -sf ${prefix}/lib/root${version_major}/libPyROOT.so ${destroot}${mypylibdir}/
     }
 }
 
@@ -386,15 +405,11 @@
     depends_lib-append      port:pythia
 }
 
-# The cocoa variant doesn't work on 10.6; source code uses functions first introduced in 10.7,
-# but fixing the code is doable if someone had sufficient motivation
 variant cocoa conflicts x11 description {Enables native OSX graphical backend} {
     # Force a compatible clang compiler
     PortGroup compiler_blacklist_versions 1.0
-    # it works with clang 3.0 and later (clang < 425 might not be exact)
     compiler.blacklist-append {clang < 425} *gcc* macports-clang-2.9
-    # compiler fallback is probably only relevant on 10.6 (where +cocoa doesn't work at all)
-    compiler.fallback-append macports-clang-3.2 macports-clang-3.1 macports-clang-3.4 macports-clang-3.3
+    compiler.fallback-append macports-clang-3.4 macports-clang-3.3 macports-clang-3.2
     # Enable cocoa support in configure
     configure.args-delete --disable-cocoa
     configure.args-append --enable-cocoa
@@ -419,7 +434,7 @@
 # ========================================================================================
 
 # List of possible clang versions that work
-set clang_versions { 3.0 3.1 3.2 3.3 3.4 3.5 }
+set clang_versions { 3.3 3.4 3.5 }
 
 # Define the available variants
 foreach ver ${clang_versions} {
@@ -510,7 +525,7 @@
         set over_no_dot [join [split ${over} "."] ""]
         append variant_line " conflicts gcc${over_no_dot}"
     }
-    append variant_line { {}}
+    append variant_line { { } }
 
     eval $variant_line
 
@@ -542,7 +557,7 @@
 
 livecheck.type              regex
 livecheck.url               [lindex ${master_sites} 0]
-livecheck.regex             ${name}_v(\[0-9a-z.\]+)\\.source
+livecheck.regex             root_v(\[0-9a-z.\]+)\\.source
 
 # ========================================================================================
 # The following have build issues, are obsolete or experimental.

Modified: users/mojca/ports/science/root6/Portfile
===================================================================
--- users/mojca/ports/science/root6/Portfile	2014-04-07 22:04:35 UTC (rev 118671)
+++ users/mojca/ports/science/root6/Portfile	2014-04-07 22:26:48 UTC (rev 118672)
@@ -478,8 +478,6 @@
         configure.f90 ${prefix}/bin/gfortran-mp-${ver}
 
         configure.args-replace -Dfortran=OFF -Dfortran=ON
-
-        configure.args-append -DCMAKE_F_COMPILER=${prefix}/bin/gfortran-mp-${ver}
     }
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140407/1f456391/attachment.html>


More information about the macports-changes mailing list