aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2014-04-19 11:55:57 -0700
committerAdam Vandenberg2014-04-19 11:55:57 -0700
commit47f23bec629087e24823f0606b613ba2eec9bff7 (patch)
treee9f98591b44532db6bb48cd8b54abf4e10e98027 /Library
parent366765f5991c832ac412681b8593ce6fa90af9fe (diff)
downloadhomebrew-47f23bec629087e24823f0606b613ba2eec9bff7.tar.bz2
clhep: patch for clang
Fixes #28514.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/clhep.rb35
1 files changed, 29 insertions, 6 deletions
diff --git a/Library/Formula/clhep.rb b/Library/Formula/clhep.rb
index 8ba5c6894..4aaf79773 100644
--- a/Library/Formula/clhep.rb
+++ b/Library/Formula/clhep.rb
@@ -1,14 +1,17 @@
-require 'formula'
+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'
+ 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
+ depends_on "cmake" => :build
+
+ # Patch for clang compatibility, adapted from MacPorts
+ patch :DATA
def install
- mkdir 'clhep-build' do
+ mkdir "clhep-build" do
system "cmake", "../CLHEP",
"-DCMAKE_PREFIX_PATH=#{prefix}",
*std_cmake_args
@@ -16,3 +19,23 @@ class Clhep < Formula
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()
+