Ticket #48376: root6-WithPythonFix.diff
File root6-WithPythonFix.diff, 5.2 KB (added by cjones051073 (Chris Jones), 9 years ago) |
---|
-
Portfile
10 10 PortGroup select 1.0 11 11 12 12 # don't forget to update both the git tag and the version 13 #github.setup root-mirror root 9ab0642adeca5d3703783bdbfeebfca86ea22af914 github.setup root-mirror root 6-04-00v15 version 6.04.0 013 github.setup root-mirror root b43f80bccfd6b67be37708c4a5a9386b7c850d29 14 #github.setup root-mirror root 6-04-02 v 15 version 6.04.02.99 16 16 17 17 # this could be a better way to set the version (unless we use a sha sum for the git tag ;) 18 18 # version [string map {- .} $version] 19 19 set version_major [lindex [split ${version} .] 0] 20 20 21 checksums rmd160 41daa7cd2b04fd6a78bd60e626ad550383a87b05\22 sha256 1fae9b33e18a613a90619b5c0a5c950e0897319db2f045d1414bd76628547a3721 checksums rmd160 d4025bb6e0fe4157a145de142fd2f40490c68ac4 \ 22 sha256 9bf93ef6b52e3aaedbaf6c6b2aa78d6dba5c7ec9672d7d78fb173fbab7ac7b9a 23 23 24 24 name root${version_major} 25 25 categories science … … 60 60 compiler.blacklist-append *gcc* {clang < 500} \ 61 61 macports-clang-2.9 macports-clang-3.0 macports-clang-3.1 \ 62 62 macports-clang-3.2 macports-clang-3.3 63 compiler.fallback-append macports-clang-3.6 macports-clang-3.5 macports-clang-3.4 63 compiler.fallback-append macports-clang-3.7 macports-clang-3.6 macports-clang-3.5 \ 64 macports-clang-3.4 64 65 65 66 # port specific location 66 67 set install_prefix ${prefix}/libexec/root${version_major} … … 102 103 -Dbonjour=OFF \ 103 104 -Dgviz=OFF \ 104 105 -Dsoversion=OFF \ 105 -Dc ++11=ON \106 -Dcxx11=ON \ 106 107 -Dlibcxx=ON \ 107 108 -Dxrootd=OFF \ 108 109 -Dbuiltin_ftgl=ON \ … … 126 127 ui_error "${name} is not supported on this OSX release." 127 128 return -code error "Unsupported OSX version" 128 129 } 129 } 130 130 } 131 131 132 # Note that we are forcing this choice. This means that anything linking 132 133 # against root6 needs to also be using libc++. This is possibly 133 134 # problematic, but luckily there is just a limited set of such dependents. … … 138 139 depends_lib-append port:libcxx 139 140 } 140 141 141 # replace142 # -DCMAKE_OSX_SYSROOT="/Developer/SDKs/MacOSX10.6.sdk"143 # -DCMAKE_OSX_DEPLOYMENT_TARGET="10.6"144 # with145 # -DCMAKE_OSX_SYSROOT="/"146 # -DCMAKE_OSX_DEPLOYMENT_TARGET=""147 142 pre-configure { 143 144 # replace 145 # -DCMAKE_OSX_SYSROOT="/Developer/SDKs/MacOSX10.6.sdk" 146 # -DCMAKE_OSX_DEPLOYMENT_TARGET="10.6" 147 # with 148 # -DCMAKE_OSX_SYSROOT="/" 149 # -DCMAKE_OSX_DEPLOYMENT_TARGET="" 148 150 configure.args-strsed "s|CMAKE_OSX_SYSROOT=\[^\[:blank:\]\]*|CMAKE_OSX_SYSROOT=\"/\"|" 149 151 configure.args-strsed "s|CMAKE_OSX_DEPLOYMENT_TARGET=\[^\[:blank:\]\]*|CMAKE_OSX_DEPLOYMENT_TARGET=\"\"|" 152 153 # Force use of system python in build scripts 154 # Find command finds text files containing the string to be replaced. 155 # shtest-encoding.py intentionally includes an unreadable character, so have to skip it ... 156 set pystringtoreplace "/usr/bin/env python" 157 foreach f [ exec find ${worksrcpath} -type f -and -not -name "shtest-encoding.py" -and -name "*.py" ] { 158 reinplace "s|${pystringtoreplace}|/usr/bin/python|g" $f 159 } 160 150 161 } 162 151 163 } 152 164 153 165 post-destroot { … … 216 228 set default_gui_variant +x11 217 229 } 218 230 231 variant cxx14 description {Enable c++14 compiler support} { 232 configure.args-append -Dcxx14=ON 233 } 234 219 235 variant valgrind description {Build internal LLVM library with valgrind support} { 220 236 depends_lib-append port:valgrind 221 237 } … … 376 392 depends_lib-append port:python${py_ver_no_dot} 377 393 378 394 post-destroot { 395 # Install PyROOT lib in the correct place 379 396 set mypylibdir ${prefix}/Library/Frameworks/Python.framework/Versions/${active_python_version}/lib/python${active_python_version} 380 397 set mypysitedir ${mypylibdir}/site-packages/ 381 398 file mkdir ${destroot}${mypysitedir} 382 399 foreach pyfile [glob ${destroot}${install_prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir}/ } 383 400 ln -sf ${install_prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/ 401 # Fix python version in scripts 402 set pystringtoreplace "/usr/bin/python" 403 foreach f [ exec find ${destroot}${install_prefix} -type f -and -name "*.py" ] { 404 reinplace "s|${pystringtoreplace}|${prefix}/bin/python${active_python_version}|g" $f 405 } 384 406 } 385 407 386 408 } … … 566 588 # ======================================================================================== 567 589 568 590 set gcc_versions { 4.7 4.8 4.9 5 } 569 set default_fortran_variant +gcc 48591 set default_fortran_variant +gcc5 570 592 571 593 foreach gcc_ver ${gcc_versions} { 572 594 set gcc_ver_no_dot [join [split ${gcc_ver} "."] ""]