aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2013-11-16 18:03:46 -0800
committerAdam Vandenberg2013-11-16 18:04:03 -0800
commit03286740ec1a628aeeefb1d506ad42a30e9dcd90 (patch)
tree17e56b19a7cae9335f2c758b97c7be4afb466215 /Library
parent6dc6918ec621e3c5e341bbf9cd62c0a8b96239c2 (diff)
downloadhomebrew-03286740ec1a628aeeefb1d506ad42a30e9dcd90.tar.bz2
aamath: fix build with clang
Closes #23872.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/aamath.rb66
1 files changed, 66 insertions, 0 deletions
diff --git a/Library/Formula/aamath.rb b/Library/Formula/aamath.rb
index 34e551755..125e00a05 100644
--- a/Library/Formula/aamath.rb
+++ b/Library/Formula/aamath.rb
@@ -5,6 +5,8 @@ class Aamath < Formula
url 'http://fuse.superglue.se/aamath/aamath-0.3.tar.gz'
sha1 'dc68abaf2131c73ddb1a520c95d65596e30f1b0a'
+ def patches; DATA; end
+
def install
ENV.j1
system "make"
@@ -22,3 +24,67 @@ class Aamath < Formula
end
end
end
+
+__END__
+diff --git a/expr.cc b/expr.cc
+index 7bc0ee3..8f4eaf7 100644
+--- a/expr.cc
++++ b/expr.cc
+@@ -1192,7 +1192,7 @@ IntegralOnInterval::render_head() const
+
+ class SumSymbol : public OpSymbol {
+ public:
+- void render(Canvas& c, int r, int c) const;
++ void render(Canvas& canvas, int r, int c) const;
+ };
+
+ void
+@@ -1208,7 +1208,7 @@ SumSymbol::render(Canvas& canvas, int r, int c) const
+
+ class ProductSymbol : public OpSymbol {
+ public:
+- void render(Canvas& c, int r, int c) const;
++ void render(Canvas& canvas, int r, int c) const;
+ };
+
+ void
+@@ -1612,7 +1612,7 @@ Matrix::render() const
+ int cols = num_cols();
+ int rows = num_rows();
+
+- CanvasPtr ec[cols * rows];
++ CanvasPtr *ec = new CanvasPtr[cols * rows];
+ Size sz[cols * rows];
+
+ int row_height[rows];
+@@ -1692,6 +1692,8 @@ Matrix::render() const
+
+ canvas->center();
+
++ delete[] ec;
++
+ return canvas;
+ }
+
+diff --git a/expr.h b/expr.h
+index 000ebd4..d233da9 100644
+--- a/expr.h
++++ b/expr.h
+@@ -451,7 +451,7 @@ class Integral : public OpOnFunction {
+
+ virtual CanvasPtr render_head() const;
+
+- void render_symbol(Canvas& c, int r, int c, int h) const;
++ void render_symbol(Canvas& canvas, int r, int c, int h) const;
+
+ virtual CanvasPtr render() const;
+ };
+@@ -467,7 +467,7 @@ class IntegralOnInterval : public Integral, public OpOverInterval {
+
+ class OpSymbol {
+ public:
+- virtual void render(Canvas& c, int r, int c) const = 0;
++ virtual void render(Canvas& canvas, int r, int c) const = 0;
+ };
+
+ class SumOrProduct : public OpOnFunction {