2014-09-28 18:08:51 +00:00
|
|
|
require "formula"
|
2011-01-12 14:48:37 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Dar < Formula
|
2014-09-28 18:08:51 +00:00
|
|
|
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"
|
2011-01-12 14:48:37 +00:00
|
|
|
|
2014-05-21 17:26:48 +00:00
|
|
|
bottle do
|
2014-09-28 18:34:12 +00:00
|
|
|
sha1 "e7320da542a160fbad03ccec820e671d3db2312e" => :mavericks
|
|
|
|
sha1 "e1ecd4f0f946d0672c3d7733911455daf474a621" => :mountain_lion
|
|
|
|
sha1 "072c3583b7e85feb5685a28ebcecf37428158fe1" => :lion
|
2014-05-21 17:26:48 +00:00
|
|
|
end
|
|
|
|
|
2014-09-28 18:08:51 +00:00
|
|
|
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"
|
dar: fix build, add new options, disable static.
The Mavericks build is fixed by using ENV.libstdcxx with clang. The
Mavericks build also can succeed without using ENV.libstdcxx if the
compiler is gcc-4.8 (or perhaps others, as well).
New options are provided for docs, lzo, gcrypt, gettext, and upx.
Accordingly, gettext is no longer a required dependency.
The build uses the sed -r option, which is not available in the
system sed, but is, in Homebrew's gnu-sed. Specifically, this
resolves the error:
/usr/bin/sed: illegal option -- r
Similarly, when --docs is enabled, the build uses the cp -d option,
which is not available in the system cp, but is, in gnu cp, which
is part of the coreutils Homebrew formula. In particular, this
avoids the error:
./portable_cp html /usr/local/Cellar/dar/2.4.13/share/dar
cp: illegal option -- d
The configure option --disable-dar-static is now always passed in
order to decrease the time it takes for configure to run. This is
suggested by the output from configure when configure finds that
static is not possible.
2014-05-11 16:39:53 +00:00
|
|
|
|
2014-11-14 20:35:07 +00:00
|
|
|
if build.with? "docs"
|
|
|
|
depends_on "coreutils" => :build
|
|
|
|
depends_on "doxygen" => :build
|
|
|
|
end
|
|
|
|
|
2014-09-28 18:08:51 +00:00
|
|
|
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"
|
2011-01-12 14:48:37 +00:00
|
|
|
|
|
|
|
def install
|
2014-10-27 03:30:28 +00:00
|
|
|
ENV.prepend_path 'PATH', "#{Formula['gnu-sed'].opt_libexec}/gnubin"
|
|
|
|
ENV.prepend_path 'PATH', "#{Formula['coreutils'].opt_libexec}/gnubin" if build.with? "docs"
|
dar: fix build, add new options, disable static.
The Mavericks build is fixed by using ENV.libstdcxx with clang. The
Mavericks build also can succeed without using ENV.libstdcxx if the
compiler is gcc-4.8 (or perhaps others, as well).
New options are provided for docs, lzo, gcrypt, gettext, and upx.
Accordingly, gettext is no longer a required dependency.
The build uses the sed -r option, which is not available in the
system sed, but is, in Homebrew's gnu-sed. Specifically, this
resolves the error:
/usr/bin/sed: illegal option -- r
Similarly, when --docs is enabled, the build uses the cp -d option,
which is not available in the system cp, but is, in gnu cp, which
is part of the coreutils Homebrew formula. In particular, this
avoids the error:
./portable_cp html /usr/local/Cellar/dar/2.4.13/share/dar
cp: illegal option -- d
The configure option --disable-dar-static is now always passed in
order to decrease the time it takes for configure to run. This is
suggested by the output from configure when configure finds that
static is not possible.
2014-05-11 16:39:53 +00:00
|
|
|
ENV.libstdcxx if ENV.compiler == :clang && MacOS.version >= :mavericks
|
|
|
|
|
|
|
|
args = %W[
|
|
|
|
--disable-debug
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--disable-dar-static
|
|
|
|
--prefix=#{prefix}
|
|
|
|
]
|
|
|
|
|
2014-09-28 18:08:51 +00:00
|
|
|
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"
|
dar: fix build, add new options, disable static.
The Mavericks build is fixed by using ENV.libstdcxx with clang. The
Mavericks build also can succeed without using ENV.libstdcxx if the
compiler is gcc-4.8 (or perhaps others, as well).
New options are provided for docs, lzo, gcrypt, gettext, and upx.
Accordingly, gettext is no longer a required dependency.
The build uses the sed -r option, which is not available in the
system sed, but is, in Homebrew's gnu-sed. Specifically, this
resolves the error:
/usr/bin/sed: illegal option -- r
Similarly, when --docs is enabled, the build uses the cp -d option,
which is not available in the system cp, but is, in gnu cp, which
is part of the coreutils Homebrew formula. In particular, this
avoids the error:
./portable_cp html /usr/local/Cellar/dar/2.4.13/share/dar
cp: illegal option -- d
The configure option --disable-dar-static is now always passed in
order to decrease the time it takes for configure to run. This is
suggested by the output from configure when configure finds that
static is not possible.
2014-05-11 16:39:53 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
2014-09-28 18:08:51 +00:00
|
|
|
system "make" ,"install"
|
2011-01-12 14:48:37 +00:00
|
|
|
end
|
|
|
|
end
|