mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-11-29 20:29:40 -05:00
ROOT currently does not have a :python dependency, which causes ROOT to link against system python instead of homebrew python. This commit adds a :python dependency, which does not affect users who use system python (since homebrew will still link them to system python), but which does fix linking for users who use a brewed python. The logic behind making this dependency non-optional is: 1) Speaking from first-hand experience, most LHC analyses use PyROOT more than ROOT's built-in CINT interpreter, so it makes sense to have this always-on, as users will expect it. 2) For users who don't have a brewed python, this doesn't add any extra build dependencies. 3) The existing formula is compiled with the --all flag, and has no option to disable python bindings, so this really doesn't change the interface to the formula. Closes #20704. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
59 lines
1.5 KiB
Ruby
59 lines
1.5 KiB
Ruby
require 'formula'
|
|
|
|
class Root < Formula
|
|
homepage 'http://root.cern.ch'
|
|
url 'ftp://root.cern.ch/root/root_v5.34.08.source.tar.gz'
|
|
version '5.34.08'
|
|
sha1 '23ca250f9c66797972f94bb8f20d04cf455d6c53'
|
|
|
|
depends_on 'fftw' => :optional
|
|
depends_on :x11
|
|
depends_on :python
|
|
|
|
def install
|
|
#Determine architecture
|
|
arch = MacOS.prefer_64_bit? ? 'macosx64' : 'macosx'
|
|
|
|
# N.B. that it is absolutely essential to specify
|
|
# the --etcdir flag to the configure script. This is
|
|
# due to a long-known issue with ROOT where it will
|
|
# not display any graphical components if the directory
|
|
# is not specified
|
|
#
|
|
# => http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=15072
|
|
system "./configure",
|
|
"#{arch}",
|
|
"--all",
|
|
"--enable-builtin-glew",
|
|
"--prefix=#{prefix}",
|
|
"--etcdir=#{prefix}/etc/root",
|
|
"--mandir=#{man}"
|
|
system "make"
|
|
system "make install"
|
|
|
|
prefix.install 'test' # needed to run test suite
|
|
|
|
end
|
|
|
|
def test
|
|
system "make -C #{prefix}/test/ hsimple"
|
|
system "#{prefix}/test/hsimple"
|
|
end
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
Because ROOT depends on several installation-dependent
|
|
environment variables to function properly, you should
|
|
add the following commands to your shell initialization
|
|
script (.bashrc/.profile/etc.), or call them directly
|
|
before using ROOT.
|
|
|
|
For csh/tcsh users:
|
|
source `brew --prefix root`/bin/thisroot.csh
|
|
For bash/zsh users:
|
|
. $(brew --prefix root)/bin/thisroot.sh
|
|
|
|
EOS
|
|
end
|
|
end
|