aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/clhep.rb
blob: 4aaf79773273a8eb1c63cfd7bf93ef355ce2d477 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
require "formula"

class Clhep < Formula
  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"

  depends_on "cmake" => :build

  # Patch for clang compatibility, adapted from MacPorts
  patch :DATA

  def install
    mkdir "clhep-build" do
      system "cmake", "../CLHEP",
                      "-DCMAKE_PREFIX_PATH=#{prefix}",
                      *std_cmake_args
      system "make install"
    end
  end
end

__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()