aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libqalculate.rb
blob: 70a76fab3f470d14da0c949615b4f3c87d81c2bb (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
require 'formula'

class Libqalculate < Formula
  homepage 'http://qalculate.sourceforge.net/'
  url 'https://downloads.sourceforge.net/project/qalculate/libqalculate/libqalculate-0.9.7/libqalculate-0.9.7.tar.gz'
  sha1 'c15f7f3a97995decf62cc964956fc1e374ecd78c'

  bottle do
    sha1 "334b9bbf28268f858997dda432dd1ee6c48ca168" => :mavericks
    sha1 "b25b47d582d12a3017eb57fe42463f2ddfd859c7" => :mountain_lion
  end

  depends_on 'pkg-config' => :build
  depends_on 'cln'
  depends_on 'glib'
  depends_on 'gnuplot'
  depends_on 'gettext'
  depends_on 'readline'
  depends_on 'wget'

  # Patches against version 0.9.7, should not be needed in the future
  patch :DATA

  def install
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    system "make install"
  end

  test do
    system "#{bin}/qalc", "-nocurrencies", "(2+2)/4 hours to minutes"
  end
end

__END__
diff -ur a/src/defs2doc.cc b/src/defs2doc.cc
--- a/src/defs2doc.cc 2009-12-02 14:24:28.000000000 -0600
+++ b/src/defs2doc.cc 2012-01-10 18:47:50.000000000 -0600
@@ -16,7 +16,9 @@
 #include <time.h>
 #include <pthread.h>
 #include <dirent.h>
+#if !defined(__APPLE__)
 #include <malloc.h>
+#endif
 #include <stdio.h>
 #include <vector>
 #include <glib.h>
diff -ur a/src/qalc.cc b/src/qalc.cc
--- a/src/qalc.cc 2010-01-05 09:17:29.000000000 -0600
+++ b/src/qalc.cc 2012-01-10 18:47:42.000000000 -0600
@@ -16,7 +16,9 @@
 #include <time.h>
 #include <pthread.h>
 #include <dirent.h>
+#if !defined(__APPLE__)
 #include <malloc.h>
+#endif
 #include <stdio.h>
 #include <vector>
 #include <glib.h>