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"
|
2015-04-20 01:14:13 +00:00
|
|
|
url "https://downloads.sourceforge.net/project/dar/dar/2.4.17/dar-2.4.17.tar.gz"
|
|
|
|
sha256 "5d861c39698b77124680914741e1e40e7e9bedb3fcedc6df8d468e619479833c"
|
2011-01-12 14:48:37 +00:00
|
|
|
|
2014-05-21 17:26:48 +00:00
|
|
|
bottle do
|
2015-04-20 02:21:24 +00:00
|
|
|
sha256 "23e1c63d1796575d398c12ed4d2d30b727f4f1df015965d1decfb8fc233b9d96" => :yosemite
|
|
|
|
sha256 "26098cdd3e59ddd9598cd71d5c018c89ba48f803eb43924a7e8cded84c768ab9" => :mavericks
|
|
|
|
sha256 "bc09f5b9d90b75d1c98fb70887e08b3fbd325477b03f70b1837f3a3ae754b77e" => :mountain_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
|
2014-11-16 03:28:09 +00:00
|
|
|
depends_on "upx" => [:build, :optional]
|
2011-01-12 14:48:37 +00:00
|
|
|
|
|
|
|
def install
|
2015-04-20 01:14:13 +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
|
2015-04-20 01:14:13 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system bin/"dar", "-c", "test", "-R", "./Library"
|
|
|
|
system bin/"dar", "-d", "test", "-R", "./Library"
|
2011-01-12 14:48:37 +00:00
|
|
|
end
|
|
|
|
end
|