blob: 0d8c4aef59157474c65d78d8f402c7c4a0c14f84 (
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
  | 
require "formula"
class Dar < Formula
  homepage "http://dar.linux.free.fr/doc/index.html"
  url "https://downloads.sourceforge.net/project/dar/dar/2.4.15/dar-2.4.15.tar.gz"
  sha1 "6c175b735410a905fcb07a4549f8b6cbf86b08d8"
  bottle do
    sha1 "e7320da542a160fbad03ccec820e671d3db2312e" => :mavericks
    sha1 "e1ecd4f0f946d0672c3d7733911455daf474a621" => :mountain_lion
    sha1 "072c3583b7e85feb5685a28ebcecf37428158fe1" => :lion
  end
  option "with-docs", "build programming documentation (in particular libdar API documentation) and html man page"
  option "with-libgcrypt", "enable strong encryption support"
  option "with-lzo", "enable lzo compression support"
  option "with-upx", "make executables compressed at installation time"
  if build.with? "docs"
    depends_on "coreutils" => :build
    depends_on "doxygen" => :build
  end
  depends_on "gettext" => :optional
  depends_on "gnu-sed" => :build
  depends_on "libgcrypt" => :optional
  depends_on "lzo" => :optional
  depends_on "upx" => [:build, :optional]
  def install
    ENV.prepend_path 'PATH', "#{Formula['gnu-sed'].opt_libexec}/gnubin"
    ENV.prepend_path 'PATH', "#{Formula['coreutils'].opt_libexec}/gnubin" if build.with? "docs"
    ENV.libstdcxx if ENV.compiler == :clang && MacOS.version >= :mavericks
    args = %W[
      --disable-debug
      --disable-dependency-tracking
      --disable-dar-static
      --prefix=#{prefix}
    ]
    args << "--disable-build-html" if build.without? "docs"
    args << "--disable-libgcrypt-linking" if build.without? "libgcrypt"
    args << "--disable-liblzo2-linking" if build.without? "lzo"
    args << "--disable-upx" if build.without? "upx"
    system "./configure", *args
    system "make" ,"install"
  end
end
  |