2011-03-10 05:11:03 +00:00
|
|
|
class Gdbm < Formula
|
2015-02-08 03:17:52 +00:00
|
|
|
homepage "https://www.gnu.org/software/gdbm/"
|
|
|
|
url "https://ftpmirror.gnu.org/gdbm/gdbm-1.11.tar.gz"
|
|
|
|
mirror "https://ftp.gnu.org/gnu/gdbm/gdbm-1.11.tar.gz"
|
2015-01-04 08:46:34 +00:00
|
|
|
sha1 "ce433d0f192c21d41089458ca5c8294efe9806b4"
|
2009-12-05 01:52:02 +00:00
|
|
|
|
2014-02-22 22:42:44 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2014-10-22 14:41:52 +00:00
|
|
|
revision 1
|
|
|
|
sha1 "51d9c80b023a12571843e10984aa026c55d487f9" => :yosemite
|
|
|
|
sha1 "73f8a00866a510eb8b6aac08ab0462aec6aa56ff" => :mavericks
|
|
|
|
sha1 "11e8b6c44f03db030339aaaf05187b208d67d168" => :mountain_lion
|
2014-02-22 22:42:44 +00:00
|
|
|
end
|
|
|
|
|
2012-08-09 05:35:31 +00:00
|
|
|
option :universal
|
2015-02-08 03:17:52 +00:00
|
|
|
option "with-libgdbm-compat", "Build libgdbm_compat, a compatibility layer which provides UNIX-like dbm and ndbm interfaces."
|
2012-06-19 15:59:44 +00:00
|
|
|
|
2009-12-05 01:52:02 +00:00
|
|
|
def install
|
2012-08-09 05:35:31 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2015-02-08 03:17:52 +00:00
|
|
|
|
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--disable-silent-rules
|
|
|
|
--prefix=#{prefix}
|
|
|
|
]
|
|
|
|
|
|
|
|
args << "--enable-libgdbm-compat" if build.with? "libgdbm-compat"
|
|
|
|
|
|
|
|
system "./configure", *args
|
2014-11-01 15:31:44 +00:00
|
|
|
system "make", "install"
|
2009-12-05 01:52:02 +00:00
|
|
|
end
|
2015-01-04 08:46:34 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
pipe_output("#{bin}/gdbmtool --norc --newdb test", "store 1 2\nquit\n")
|
|
|
|
assert File.exist?("test")
|
|
|
|
assert_match /2/, pipe_output("#{bin}/gdbmtool --norc test", "fetch 1\nquit\n")
|
|
|
|
end
|
2009-12-05 01:52:02 +00:00
|
|
|
end
|