Ticket #44230: root6-6.00.02-revision2.diff
File root6-6.00.02-revision2.diff, 7.8 KB (added by cjones051073 (Chris Jones), 10 years ago) |
---|
-
Portfile
13 13 # don't forget to update both the git tag and the version 14 14 github.setup root-mirror root 6-00-02 v 15 15 version 6.00.02 16 revision 1 16 17 # this could be a better way to set the version (unless we use a sha sum for the git tag ;) 17 18 # version [string map {- .} $version] 18 19 set version_major [lindex [split ${version} .] 0] … … 316 317 set default_python_variant +python27 317 318 318 319 # Define the available variants 319 foreach ver ${python_versions} {320 set ver_no_dot [join [split ${ver} "."] ""]321 set variant_line {variant python${ ver_no_dot} description "Build with python ${ver} support"}322 foreach over ${python_versions} {323 if { ${ ver} == ${over} } { continue }324 set over_no_dot [join [split ${over} "."] ""]325 append variant_line " conflicts python${ over_no_dot}"320 foreach py_ver ${python_versions} { 321 set py_ver_no_dot [join [split ${py_ver} "."] ""] 322 set variant_line {variant python${py_ver_no_dot} description "Build with python ${py_ver} support"} 323 foreach py_over ${python_versions} { 324 if { ${py_ver} == ${py_over} } { continue } 325 set py_over_no_dot [join [split ${py_over} "."] ""] 326 append variant_line " conflicts python${py_over_no_dot}" 326 327 } 327 328 append variant_line { { } } 328 329 eval $variant_line 329 if {[variant_isset python${ ver_no_dot}]} {330 if {${default_python_variant} != "+python${ ver_no_dot}"} {330 if {[variant_isset python${py_ver_no_dot}]} { 331 if {${default_python_variant} != "+python${py_ver_no_dot}"} { 331 332 set default_python_variant "" 332 333 } 333 334 } … … 338 339 } 339 340 340 341 # If a python variant is enabled, activate it 341 foreach ver ${python_versions} { 342 set ver_no_dot [join [split ${ver} "."] ""] 343 if {[variant_isset python${ver_no_dot}]} { 342 set active_python_version "" 343 foreach py_ver ${python_versions} { 344 set py_ver_no_dot [join [split ${py_ver} "."] ""] 345 if {[variant_isset python${py_ver_no_dot}]} { 344 346 345 347 # Check root5 variants 346 348 set portname root5 347 if {![catch {set result [active_variants ${portname} python${ ver_no_dot}]}]} {349 if {![catch {set result [active_variants ${portname} python${py_ver_no_dot}]}]} { 348 350 if {$result} { 349 ui_error "Cannot install ${name} with +python${ ver_no_dot} variant"350 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."351 ui_error "Cannot install ${name} with +python${py_ver_no_dot} variant" 352 return -code error "${portname} port is already installed with +python${py_ver_no_dot} and both cannot be active at once. Pick a different python variant." 351 353 } 352 354 } 353 355 354 356 # Setup python 355 set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/${ ver}357 set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/${py_ver} 356 358 configure.args-replace -Dpython=OFF -Dpython=ON 357 359 configure.args-append -DPYTHON_INCLUDE_DIR="${mypydir}/Headers" \ 358 -DPYTHON_LIBRARY="${prefix}/lib/libpython${ver}.dylib" \ 359 -DPYTHON_EXECUTABLE="${prefix}/bin/python${ver}" 360 depends_lib-append port:python${ver_no_dot} 360 -DPYTHON_LIBRARY="${prefix}/lib/libpython${py_ver}.dylib" \ 361 -DPYTHON_EXECUTABLE="${prefix}/bin/python${py_ver}" 362 depends_lib-append port:python${py_ver_no_dot} 363 set active_python_version ${py_ver} 361 364 post-destroot { 362 set mypylibdir ${prefix}/Library/Frameworks/Python.framework/Versions/${ ver}/lib/python${ver}365 set mypylibdir ${prefix}/Library/Frameworks/Python.framework/Versions/${active_python_version}/lib/python${active_python_version} 363 366 set mypysitedir ${mypylibdir}/site-packages/ 364 367 file mkdir ${destroot}${mypysitedir} 365 368 foreach pyfile [glob ${destroot}${install_prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir}/ } … … 488 491 set clang_versions { 3.3 3.4 3.5 } 489 492 490 493 # Define the available variants 491 foreach ver ${clang_versions} {492 set ver_no_dot [join [split ${ver} "."] ""]493 set variant_line {variant clang${ ver_no_dot} description "Compile using MacPorts clang ${ver}"}494 foreach over ${clang_versions} {495 if { ${ ver} == ${over} } { continue }496 set over_no_dot [join [split ${over} "."] ""]497 append variant_line " conflicts clang${ over_no_dot}"494 foreach clang_ver ${clang_versions} { 495 set clang_ver_no_dot [join [split ${clang_ver} "."] ""] 496 set variant_line {variant clang${clang_ver_no_dot} description "Compile using MacPorts clang ${clang_ver}"} 497 foreach clang_over ${clang_versions} { 498 if { ${clang_ver} == ${clang_over} } { continue } 499 set clang_over_no_dot [join [split ${clang_over} "."] ""] 500 append variant_line " conflicts clang${clang_over_no_dot}" 498 501 } 499 502 append variant_line { { } } 500 503 eval $variant_line … … 514 517 515 518 # Is a variant active ? 516 519 set active_clang_variant "" 517 foreach ver ${clang_versions} {518 set ver_no_dot [join [split ${ver} "."] ""]519 if {[variant_isset clang${ ver_no_dot}]} {520 set active_clang_variant ${ ver}520 foreach clang_ver ${clang_versions} { 521 set clang_ver_no_dot [join [split ${clang_ver} "."] ""] 522 if {[variant_isset clang${clang_ver_no_dot}]} { 523 set active_clang_variant ${clang_ver} 521 524 } 522 525 } 523 526 … … 539 542 set gcc_versions { 4.7 4.8 4.9 } 540 543 set default_fortran_variant +gcc48 541 544 542 foreach ver ${gcc_versions} {543 set ver_no_dot [join [split ${ver} "."] ""]545 foreach gcc_ver ${gcc_versions} { 546 set gcc_ver_no_dot [join [split ${gcc_ver} "."] ""] 544 547 545 set variant_line {variant gcc${ ver_no_dot} description "Build with gfortran from gcc${ver_no_dot}"}548 set variant_line {variant gcc${gcc_ver_no_dot} description "Build with gfortran from gcc${gcc_ver_no_dot}"} 546 549 547 foreach over ${gcc_versions} {548 if {${ ver} == ${over}} {550 foreach gcc_over ${gcc_versions} { 551 if {${gcc_ver} == ${gcc_over}} { 549 552 continue 550 553 } 554 set gcc_over_no_dot [join [split ${gcc_over} "."] ""] 555 append variant_line " conflicts gcc${gcc_over_no_dot}" 556 } 551 557 552 set over_no_dot [join [split ${over} "."] ""]553 append variant_line " conflicts gcc${over_no_dot}"554 }555 558 append variant_line { {} } 556 559 557 560 eval $variant_line 558 561 559 if {[variant_isset gcc${ ver_no_dot}]} {560 if {${default_fortran_variant} != "+gcc${ ver_no_dot}"} {562 if {[variant_isset gcc${gcc_ver_no_dot}]} { 563 if {${default_fortran_variant} != "+gcc${gcc_ver_no_dot}"} { 561 564 set default_fortran_variant "" 562 565 } 563 566 } … … 567 570 default_variants-append "${default_fortran_variant}" 568 571 } 569 572 570 foreach ver ${gcc_versions} {571 set ver_no_dot [join [split ${ver} "."] ""]573 foreach gcc_ver ${gcc_versions} { 574 set gcc_ver_no_dot [join [split ${gcc_ver} "."] ""] 572 575 573 if {[variant_isset gcc${ ver_no_dot}]} {576 if {[variant_isset gcc${gcc_ver_no_dot}]} { 574 577 depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc 575 depends_build-append port:gcc${ ver_no_dot}578 depends_build-append port:gcc${gcc_ver_no_dot} 576 579 577 configure.fc ${prefix}/bin/gfortran-mp-${ ver}578 configure.f77 ${prefix}/bin/gfortran-mp-${ ver}579 configure.f90 ${prefix}/bin/gfortran-mp-${ ver}580 configure.fc ${prefix}/bin/gfortran-mp-${gcc_ver} 581 configure.f77 ${prefix}/bin/gfortran-mp-${gcc_ver} 582 configure.f90 ${prefix}/bin/gfortran-mp-${gcc_ver} 580 583 581 584 configure.args-replace -Dfortran=OFF -Dfortran=ON 582 585 }