aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/shmcat.rb
blob: acaffcd1fa49b5ab6cc2f5720aabcac75080c5f1 (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
require "formula"

class Shmcat < Formula
  homepage "http://shmcat.sourceforge.net/"
  url "https://downloads.sourceforge.net/project/shmcat/shmcat-1.7.tar.bz2"
  sha1 "30f6bc931859e1544e783edc84f137e9c4a0b5f6"

  option "with-ftok", "Build the ftok utility"
  option "with-nls", "Use Native Language Support"

  depends_on "gettext" if build.with? "nls"

  def install
    args = %W[
      --disable-dependency-tracking
      --prefix=#{prefix}
    ]
    args << "--disable-ftok" if build.without? "ftok"
    if build.with? "nls"
      gettext = Formula["gettext"]
      args << "--with-libintl-prefix=#{gettext.include}"
    else
      args << "--disable-nls"
    end

    system "./configure", *args
    system "make install"
  end
end