aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/dar.rb34
1 files changed, 29 insertions, 5 deletions
diff --git a/Library/Formula/dar.rb b/Library/Formula/dar.rb
index 15927e10a..1f42acae7 100644
--- a/Library/Formula/dar.rb
+++ b/Library/Formula/dar.rb
@@ -5,13 +5,37 @@ class Dar < Formula
url 'https://downloads.sourceforge.net/project/dar/dar/2.4.13/dar-2.4.13.tar.gz'
sha1 'b20471ada21cd0cbe4687e7bdd3c2e6f70f5c0d1'
- depends_on 'gettext'
+ 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'
+
+ depends_on 'coreutils' => :build if build.with? 'docs'
+ depends_on 'doxygen' => :build if build.with? 'docs'
+ depends_on 'gettext' => :optional
+ depends_on 'gnu-sed' => :build
+ depends_on 'libgcrypt' => :optional
+ depends_on 'lzo' => :optional
+ depends_on 'upx' => :build if build.with? 'upx'
def install
- system "./configure", "--disable-debug",
- "--disable-dependency-tracking",
- "--prefix=#{prefix}",
- "--disable-build-html"
+ ENV.prepend_path 'PATH', "#{Formula['gnu-sed'].opt_prefix}/libexec/gnubin"
+ ENV.prepend_path 'PATH', "#{Formula['coreutils'].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