diff options
| author | Jacob Howard | 2012-08-06 11:46:25 +0200 |
|---|---|---|
| committer | Adam Vandenberg | 2012-08-06 09:46:08 -0700 |
| commit | 5439b7fe9545dd968b761be9ef6f3c6275a5069e (patch) | |
| tree | bbb4283cdfc2111f7b403dd1435dde92a93b30cd /Library/Formula | |
| parent | 5fee2feb7f3e95f8af3981bcc678015a11f77d4b (diff) | |
| download | homebrew-5439b7fe9545dd968b761be9ef6f3c6275a5069e.tar.bz2 | |
ROOT 5.34.01
This commit adds a formula to install the ROOT data analysis
framework developed by CERN. ROOT is widely used in the
particle physics community, both inside and outside of CERN.
Closes #10534.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/root.rb | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Library/Formula/root.rb b/Library/Formula/root.rb new file mode 100644 index 000000000..74e132ad1 --- /dev/null +++ b/Library/Formula/root.rb @@ -0,0 +1,56 @@ +require 'formula' + +class Root < Formula + homepage 'http://root.cern.ch' + url 'ftp://root.cern.ch/root/root_v5.34.01.source.tar.gz' + version '5.34.01' + md5 '114ea7f18b48ed0b3bb0287f5a6d593f' + + depends_on 'fftw' => :optional + depends_on :x11 + + 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", + "--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 |
