Ticket #44267: root-python-check.diff
File root-python-check.diff, 1.9 KB (added by cjones051073 (Chris Jones), 10 years ago) |
---|
-
science/root6/Portfile
344 344 set py_ver_no_dot [join [split ${py_ver} "."] ""] 345 345 if {[variant_isset python${py_ver_no_dot}]} { 346 346 347 set active_python_version ${py_ver} 348 set active_python_version_no_dot ${py_ver_no_dot} 349 347 350 # Check root5 variants 348 set portname root5 349 if {![catch {set result [active_variants ${portname} python${py_ver_no_dot}]}]} { 350 if {$result} { 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 pre-activate { 352 set portname root5 353 if {![catch {set result [active_variants ${portname} python${active_python_version_no_dot}]}]} { 354 if {$result} { 355 ui_error "Cannot install ${name} with +python${active_python_version_no_dot} variant" 356 return -code error "${portname} port is already installed with +python${active_python_version_no_dot} and both cannot be active at once. Pick a different python variant." 357 } 353 358 } 354 359 } 355 360 … … 360 365 -DPYTHON_LIBRARY="${prefix}/lib/libpython${py_ver}.dylib" \ 361 366 -DPYTHON_EXECUTABLE="${prefix}/bin/python${py_ver}" 362 367 depends_lib-append port:python${py_ver_no_dot} 363 set active_python_version ${py_ver}368 364 369 post-destroot { 365 370 set mypylibdir ${prefix}/Library/Frameworks/Python.framework/Versions/${active_python_version}/lib/python${active_python_version} 366 371 set mypysitedir ${mypylibdir}/site-packages/