aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Formula/whitedb.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/Library/Formula/whitedb.rb b/Library/Formula/whitedb.rb
new file mode 100644
index 000000000..052a4474b
--- /dev/null
+++ b/Library/Formula/whitedb.rb
@@ -0,0 +1,28 @@
+require "formula"
+
+class Whitedb < Formula
+ homepage "http://whitedb.org/"
+ url "http://whitedb.org/whitedb-0.7.2.tar.gz"
+ sha1 "055b6162e4c0eb225ab95347643fda583c0bbddd"
+
+ depends_on "python" => :optional
+
+ def install
+ # https://github.com/priitj/whitedb/issues/15
+ ENV.append "CFLAGS", "-std=gnu89"
+
+ args = ["--prefix=#{prefix}"]
+ args << "--with-python" if build.with? "python"
+ system "./configure", *args
+
+ system "make"
+ system "make", "install"
+ end
+
+ test do
+ system "#{bin}/wgdb", "create", "512k"
+ system "#{bin}/wgdb", "add", "42"
+ system "#{bin}/wgdb", "select", "1"
+ system "#{bin}/wgdb", "free"
+ end
+end