blob: f06d26ca75667e7b82002ee1b4de3212f134add1 (
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
 | class Sary < Formula
  homepage "http://sary.sourceforge.net/"
  url "http://sary.sourceforge.net/sary-1.2.0.tar.gz"
  sha256 "d4b16e32c97a253b546922d2926c8600383352f0af0d95e2938b6d846dfc6a11"
  bottle do
    cellar :any
    sha256 "1ef3eadf64fd9bcaeed1f01e7b03504fdcfbbe5bb65fe7e5da5aece9b73055a3" => :yosemite
    sha256 "b41f84ca9dc8bb27eeba82e1d13008f8b56a357ede1ab1987337561347cd6d94" => :mavericks
    sha256 "a1f528db66834372eac1e85513cbbfa8bc1242988bd31a986a9ea0fcec768b37" => :mountain_lion
  end
  depends_on "pkg-config" => :build
  depends_on "glib"
  def install
    system "./configure", "--prefix=#{prefix}",
                          "--mandir=#{man}"
    system "make", "install"
  end
  test do
    (testpath/"test").write <<-EOS.undent
      Some text,
      this is the Sary formula, a suffix array library and tools,
      more text.
      more. text.
    EOS
    system "#{bin}/mksary", "test"
    assert File.exist? "test.ary"
    assert_equal "Some text,\nmore text.\nmore. text.",
      shell_output("#{bin}/sary text test").chomp
  end
end
 |