Commits
Chris Jones authored 196dcfe81fb
66 66 | |
67 67 | cmake.out_of_source yes |
68 68 | |
69 69 | # TODO: the file ${filespath}/${name} would have to be generated on the fly instead |
70 70 | select.group root |
71 71 | select.file ${filespath}/${name} |
72 72 | |
73 73 | # Force a compatible compiler |
74 74 | compiler.blacklist-append *gcc* {clang < 900} macports-clang-3.3 macports-clang-3.4 \ |
75 75 | macports-clang-3.5 macports-clang-3.6 macports-clang-3.7 \ |
76 - | macports-clang-3.8 |
77 - | compiler.whitelist clang macports-clang-5.0 macports-clang-4.0 macports-clang-3.9 |
76 + | macports-clang-3.8 macports-clang-4.0 macports-clang-3.9 |
77 + | compiler.whitelist clang macports-clang-6.0 macports-clang-5.0 |
78 78 | |
79 79 | # port specific location |
80 80 | set install_prefix ${prefix}/libexec/root${version_major} |
81 81 | |
82 82 | # Patch to disable hsimple macro running during build. |
83 83 | # To be removed once MacPorts allows access to /dev/random in the build sandbox. |
84 84 | #patchfiles-append patch-disable-hsimple-macro.diff |
85 85 | |
86 86 | configure.args-append \ |
87 87 | -Dgnuinstall=ON \ |
266 266 | ui_msg " Making root${version_major} your default root version. To change this run 'sudo port select root'" |
267 267 | catch { system "port select root root${version_major}" } |
268 268 | } else { |
269 269 | ui_msg " To make root${version_major} your default root version, run 'sudo port select root root${version_major}'" |
270 270 | } |
271 271 | ui_msg "======================================================================================" |
272 272 | } |
273 273 | |
274 274 | universal_variant no |
275 275 | |
276 - | default_variants +cocoa +ssl +xml +gsl +minuit2 +tmva +roofit +graphviz +opengl +soversion +http +xrootd |
276 + | default_variants +cocoa +ssl +xml +gsl +minuit2 +tmva +roofit +graphviz +opengl +soversion +http +xrootd +cxx17 |
277 277 | |
278 278 | variant root7 description {Enable ROOT7 preview} { |
279 279 | configure.args-replace -Droot7=OFF -Droot7=ON |
280 280 | } |
281 281 | |
282 282 | variant qt4 description {Enable QT4 support} { |
283 283 | configure.args-replace -Dqt=OFF -Dqt=ON |
284 284 | PortGroup qt4 1.0 |
285 285 | } |
286 286 | |
616 616 | -DX11_Xpm_LIB=${prefix}/lib/libXpm.dylib \ |
617 617 | -DOPENGL_glu_LIBRARY=${prefix}/lib/libGLU.dylib |
618 618 | } |
619 619 | |
620 620 | # ======================================================================================== |
621 621 | # Setup various clang variants, to provide alternative C++ compilers that support cocoa |
622 622 | # ======================================================================================== |
623 623 | |
624 624 | # List of possible clang versions that work |
625 625 | # REMEMBER - Update the logic below when changing this list ... |
626 - | set clang_versions { 3.9 4.0 5.0 6.0 } |
626 + | set clang_versions { 5.0 6.0 } |
627 627 | |
628 628 | # Define the available variants |
629 629 | foreach clang_ver ${clang_versions} { |
630 630 | set clang_ver_no_dot [join [split ${clang_ver} "."] ""] |
631 631 | set variant_line {variant clang${clang_ver_no_dot} description "Compile using MacPorts clang ${clang_ver}"} |
632 632 | foreach clang_over ${clang_versions} { |
633 633 | if { ${clang_ver} == ${clang_over} } { continue } |
634 634 | set clang_over_no_dot [join [split ${clang_over} "."] ""] |
635 635 | append variant_line " conflicts clang${clang_over_no_dot}" |
636 636 | } |
637 637 | append variant_line { { } } |
638 638 | eval $variant_line |
639 639 | } |
640 640 | |
641 641 | # make sure that the proper variant is automatically selected |
642 642 | # (ROOT crashes if the compiler it was built with doesn't exist) |
643 - | if { ![variant_isset clang39] && |
644 - | ![variant_isset clang40] && |
645 - | ![variant_isset clang50] && |
643 + | if { ![variant_isset clang50] && |
646 644 | ![variant_isset clang60] } { |
647 - | if { ${configure.compiler} eq "macports-clang-3.9" } { |
648 - | default_variants-append +clang39 |
649 - | } elseif { ${configure.compiler} eq "macports-clang-4.0" } { |
650 - | default_variants-append +clang40 |
651 - | } elseif { ${configure.compiler} eq "macports-clang-5.0" } { |
645 + | if { ${configure.compiler} eq "macports-clang-5.0" } { |
652 646 | default_variants-append +clang50 |
653 647 | } elseif { ${configure.compiler} eq "macports-clang-6.0" } { |
654 648 | default_variants-append +clang60 |
655 649 | } |
656 650 | } |
657 651 | |
658 652 | # Is a variant active ? |
659 653 | set active_clang_variant "" |
660 654 | foreach clang_ver ${clang_versions} { |
661 655 | set clang_ver_no_dot [join [split ${clang_ver} "."] ""] |
667 661 | # If so, set it up. |
668 662 | if { ${active_clang_variant} != "" } { |
669 663 | configure.compiler macports-clang-${active_clang_variant} |
670 664 | # TODO |
671 665 | # configure.args-append --with-llvm-config="${prefix}/bin/llvm-config-mp-"${active_clang_variant} |
672 666 | depends_run-append port:clang-${active_clang_variant} |
673 667 | } |
674 668 | |
675 669 | # Enable variants that only seem to work when not using macports clang... |
676 670 | if [expr ![string match macports-clang-* ${configure.compiler}] ] { |
677 - | default_variants-append +veccore +cxx17 |
671 + | default_variants-append +veccore |
678 672 | #default_variants-append +davix |
679 - | } else { |
680 - | default_variants-append +cxx14 |
673 + | #} else { |
674 + | # default_variants-append +cxx14 |
681 675 | } |
682 676 | |
683 677 | # ======================================================================================== |
684 678 | # Following is for fortran support |
685 679 | # Might eventually move to a portgroup, or similar, so could be simplified. |
686 680 | # Based on recipe from https://trac.macports.org/wiki/PortfileRecipes#fortran |
687 681 | # Note that g95 does not work here, so that variant is removed |
688 682 | # ======================================================================================== |
689 683 | |
690 - | set gcc_versions { 4.9 5 6 7 8 } |
684 + | set gcc_versions { 6 7 8 } |
691 685 | set default_fortran_variant +gcc7 |
692 686 | |
693 687 | foreach gcc_ver ${gcc_versions} { |
694 688 | set gcc_ver_no_dot [join [split ${gcc_ver} "."] ""] |
695 689 | |
696 690 | set variant_line {variant gcc${gcc_ver_no_dot} description "Build with gfortran from gcc${gcc_ver_no_dot}"} |
697 691 | |
698 692 | foreach gcc_over ${gcc_versions} { |
699 693 | if {${gcc_ver} == ${gcc_over}} { |
700 694 | continue |