2014-04-19 18:55:57 +00:00
|
|
|
require "formula"
|
2011-09-29 03:11:06 +00:00
|
|
|
|
|
|
|
class Clhep < Formula
|
2014-04-19 18:55:57 +00:00
|
|
|
homepage "http://proj-clhep.web.cern.ch/proj-clhep/"
|
|
|
|
url "http://proj-clhep.web.cern.ch/proj-clhep/DISTRIBUTION/tarFiles/clhep-2.1.3.1.tgz"
|
|
|
|
sha1 "3ef0b7410d71ca25bb2f5b5ba6d928a338e30e6e"
|
2011-09-29 03:11:06 +00:00
|
|
|
|
2014-04-19 18:55:57 +00:00
|
|
|
depends_on "cmake" => :build
|
|
|
|
|
|
|
|
# Patch for clang compatibility, adapted from MacPorts
|
|
|
|
patch :DATA
|
2011-09-29 03:11:06 +00:00
|
|
|
|
|
|
|
def install
|
2014-04-19 18:55:57 +00:00
|
|
|
mkdir "clhep-build" do
|
2012-05-22 21:37:04 +00:00
|
|
|
system "cmake", "../CLHEP",
|
|
|
|
"-DCMAKE_PREFIX_PATH=#{prefix}",
|
|
|
|
*std_cmake_args
|
2011-09-29 03:11:06 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2014-04-19 18:55:57 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
# https://savannah.cern.ch/bugs/?104110
|
|
|
|
# https://trac.macports.org/ticket/42841
|
|
|
|
#
|
|
|
|
--- a/CLHEP/Matrix/src/Vector.cc.orig
|
|
|
|
+++ b/CLHEP/Matrix/src/Vector.cc
|
|
|
|
@@ -114,9 +114,9 @@ HepVector::HepVector(const HepMatrix &hm1)
|
|
|
|
|
|
|
|
// trivial methods
|
|
|
|
|
|
|
|
-inline int HepVector::num_row() const {return nrow;}
|
|
|
|
-inline int HepVector::num_size() const {return nrow;}
|
|
|
|
-inline int HepVector::num_col() const { return 1; }
|
|
|
|
+int HepVector::num_row() const {return nrow;}
|
|
|
|
+int HepVector::num_size() const {return nrow;}
|
|
|
|
+int HepVector::num_col() const { return 1; }
|
|
|
|
|
|
|
|
// operator()
|
|
|
|
|