Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blackhat: new formula #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ install:
- brew tap --repair
env:
- PACKAGE=applgrid
- PACKAGE=blackhat
- PACKAGE=fastjet
- PACKAGE=fastnlo
- PACKAGE=fjcontrib
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ All packages are tested on OS X 10.9 (Mavericks) on [Travis CI](https://travis-c
Thanks to [**braumeister.org**](http://braumeister.org/repos/davidchall/homebrew-hep/browse/a), package metadata can now be browsed visually! Here is a quick list though:

* `applgrid`
* `blackhat`
* `fastjet`
* `fastnlo`
* `fjcontrib`
Expand Down
36 changes: 36 additions & 0 deletions blackhat.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
class Blackhat < Formula
homepage "https://blackhat.hepforge.org/"
url "http://www.hepforge.org/archive/blackhat/blackhat-0.9.9.tar.gz"
sha1 "950ba2ccfa2da942e43b2b53e6472cde9614e8a1"

depends_on "qd"
depends_on :python => :optional

patch :p1 do
url "https://gist.githubusercontent.com/veprbl/b93e5487dfb8a8e6df2a/raw/3846aae47aa044e35c20c918f47a93eee3a9c79c/blackhat_0.9.9_fix.patch"
sha1 "b22f8a72a7ba44dfe2801f5c57a31ff19cd96091"
end

def install
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--with-QDpath=#{Formula["qd"].prefix}
]

args << "--enable-pythoninterface" if build.with? "python"

system "./configure", *args
system "make", "install"

mv share/"blackhat/assembly", share/"blackhat/datafiles/assembly"
mv share/"blackhat/parents", share/"blackhat/datafiles/parents"
end

test do
args = `#{bin}/blackhat-config --libs`.split
system ENV.cxx, share/"blackhat/examples/cpp_example.cpp", "-o", (testpath/"test"), *args
cp share/"blackhat/examples/contract_file.lh", testpath/"contract_file.lh"
system (testpath/"test")
end
end
2 changes: 2 additions & 0 deletions sherpa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Sherpa < Formula
depends_on 'lhapdf' => :recommended
depends_on 'fastjet' => :optional
depends_on 'homebrew/science/root' => :optional
depends_on 'blackhat' => :optional
depends_on :mpi => [:cc, :cxx, :f90, :optional]
depends_on :fortran
cxxstdlib_check :skip
Expand Down Expand Up @@ -51,6 +52,7 @@ def install
args << "--enable-lhapdf=#{Formula['lhapdf'].prefix}" if build.with? "lhapdf"
args << "--enable-fastjet=#{Formula['fastjet'].prefix}" if build.with? "fastjet"
args << "--enable-root=#{Formula['root'].prefix}" if build.with? "root"
args << "--enable-blackhat=#{Formula['blackhat'].prefix}" if build.with? "blackhat"

if build.with? "mcfm"
mcfm_path = buildpath/'mcfm'
Expand Down