summaryrefslogtreecommitdiff
path: root/homebrew/aamath
diff options
context:
space:
mode:
Diffstat (limited to 'homebrew/aamath')
-rw-r--r--homebrew/aamath/.beer88
-rw-r--r--homebrew/aamath/.make.sh-auto6
-rw-r--r--homebrew/aamath/_metadata/description1
-rw-r--r--homebrew/aamath/_metadata/homepage1
-rw-r--r--homebrew/aamath/_metadata/name1
-rw-r--r--homebrew/aamath/_metadata/version1
-rwxr-xr-xhomebrew/aamath/download.sh1
-rwxr-xr-xhomebrew/aamath/patches.sh65
8 files changed, 164 insertions, 0 deletions
diff --git a/homebrew/aamath/.beer b/homebrew/aamath/.beer
new file mode 100644
index 000000000..2b189b165
--- /dev/null
+++ b/homebrew/aamath/.beer
@@ -0,0 +1,88 @@
+{
+ "name": "Aamath",
+ "description": "Renders mathematical expressions as ASCII art",
+ "url": "http://fuse.superglue.se/aamath/aamath-0.3.tar.gz",
+ "mirror": null,
+ "homepage": "http://fuse.superglue.se/aamath/",
+ "depends": [],
+ "resource": [],
+ "conflicts": [],
+ "patches": [
+ {
+ "url": null,
+ "data": [
+ "diff --git a/expr.cc b/expr.cc\n",
+ "index 7bc0ee3..8f4eaf7 100644\n",
+ "--- a/expr.cc\n",
+ "+++ b/expr.cc\n",
+ "@@ -1192,7 +1192,7 @@ IntegralOnInterval::render_head() const\n",
+ " \n",
+ " class SumSymbol : public OpSymbol {\n",
+ " public:\n",
+ "-\tvoid render(Canvas& c, int r, int c) const;\n",
+ "+\tvoid render(Canvas& canvas, int r, int c) const;\n",
+ " };\n",
+ " \n",
+ " void\n",
+ "@@ -1208,7 +1208,7 @@ SumSymbol::render(Canvas& canvas, int r, int c) const\n",
+ " \n",
+ " class ProductSymbol : public OpSymbol {\n",
+ " public:\n",
+ "-\tvoid render(Canvas& c, int r, int c) const;\n",
+ "+\tvoid render(Canvas& canvas, int r, int c) const;\n",
+ " };\n",
+ " \n",
+ " void\n",
+ "@@ -1612,7 +1612,7 @@ Matrix::render() const\n",
+ " \tint cols = num_cols();\n",
+ " \tint rows = num_rows();\n",
+ " \n",
+ "-\tCanvasPtr ec[cols * rows];\n",
+ "+\tCanvasPtr *ec = new CanvasPtr[cols * rows];\n",
+ " \tSize sz[cols * rows];\n",
+ " \n",
+ " \tint row_height[rows];\n",
+ "@@ -1692,6 +1692,8 @@ Matrix::render() const\n",
+ " \n",
+ " \tcanvas->center();\n",
+ " \n",
+ "+ delete[] ec;\n",
+ "+\n",
+ " \treturn canvas;\n",
+ " }\n",
+ " \n",
+ "diff --git a/expr.h b/expr.h\n",
+ "index 000ebd4..d233da9 100644\n",
+ "--- a/expr.h\n",
+ "+++ b/expr.h\n",
+ "@@ -451,7 +451,7 @@ class Integral : public OpOnFunction {\n",
+ " \n",
+ " \tvirtual CanvasPtr render_head() const;\n",
+ " \n",
+ "-\tvoid render_symbol(Canvas& c, int r, int c, int h) const;\n",
+ "+\tvoid render_symbol(Canvas& canvas, int r, int c, int h) const;\n",
+ " \n",
+ " \tvirtual CanvasPtr render() const;\n",
+ " };\n",
+ "@@ -467,7 +467,7 @@ class IntegralOnInterval : public Integral, public OpOverInterval {\n",
+ " \n",
+ " class OpSymbol {\n",
+ " public:\n",
+ "-\tvirtual void render(Canvas& c, int r, int c) const = 0;\n",
+ "+\tvirtual void render(Canvas& canvas, int r, int c) const = 0;\n",
+ " };\n",
+ " \n",
+ " class SumOrProduct : public OpOnFunction {\n"
+ ]
+ }
+ ],
+ "install": [
+ "ENV.deparallelize",
+ "system \"make\"",
+ "bin.install \"aamath\"",
+ "man1.install \"aamath.1\"",
+ "prefix.install \"testcases\""
+ ],
+ "version": "0.3",
+ "file": "aamath.rb"
+} \ No newline at end of file
diff --git a/homebrew/aamath/.make.sh-auto b/homebrew/aamath/.make.sh-auto
new file mode 100644
index 000000000..103e24787
--- /dev/null
+++ b/homebrew/aamath/.make.sh-auto
@@ -0,0 +1,6 @@
+pkg:setup
+ENV.deparallelize
+make
+bin.install "aamath"
+man1.install "aamath.1"
+prefix.install "testcases"
diff --git a/homebrew/aamath/_metadata/description b/homebrew/aamath/_metadata/description
new file mode 100644
index 000000000..34f0d4fc1
--- /dev/null
+++ b/homebrew/aamath/_metadata/description
@@ -0,0 +1 @@
+Renders mathematical expressions as ASCII art
diff --git a/homebrew/aamath/_metadata/homepage b/homebrew/aamath/_metadata/homepage
new file mode 100644
index 000000000..f6e14b7eb
--- /dev/null
+++ b/homebrew/aamath/_metadata/homepage
@@ -0,0 +1 @@
+http://fuse.superglue.se/aamath/
diff --git a/homebrew/aamath/_metadata/name b/homebrew/aamath/_metadata/name
new file mode 100644
index 000000000..d589e43dc
--- /dev/null
+++ b/homebrew/aamath/_metadata/name
@@ -0,0 +1 @@
+Aamath
diff --git a/homebrew/aamath/_metadata/version b/homebrew/aamath/_metadata/version
new file mode 100644
index 000000000..be5863417
--- /dev/null
+++ b/homebrew/aamath/_metadata/version
@@ -0,0 +1 @@
+0.3
diff --git a/homebrew/aamath/download.sh b/homebrew/aamath/download.sh
new file mode 100755
index 000000000..7820eb1a9
--- /dev/null
+++ b/homebrew/aamath/download.sh
@@ -0,0 +1 @@
+wget http://fuse.superglue.se/aamath/aamath-0.3.tar.gz \ No newline at end of file
diff --git a/homebrew/aamath/patches.sh b/homebrew/aamath/patches.sh
new file mode 100755
index 000000000..4429bcbd6
--- /dev/null
+++ b/homebrew/aamath/patches.sh
@@ -0,0 +1,65 @@
+echo 'Creating brew-patch.diff'
+cat << EOF >> brew-patch.diff
+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 {
+EOF