2011-12-16 00:04:42 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Par2tbb < Formula
|
|
|
|
url 'http://chuchusoft.com/par2_tbb/par2cmdline-0.4-tbb-20100203.tar.gz'
|
|
|
|
homepage 'http://chuchusoft.com/par2_tbb/'
|
|
|
|
md5 'b1052a08c3c6eac8a7a0605addb161e7'
|
|
|
|
|
|
|
|
depends_on 'tbb'
|
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :clang do
|
|
|
|
build 318
|
|
|
|
end
|
|
|
|
|
2011-12-16 00:04:42 +00:00
|
|
|
def install
|
|
|
|
# par2tbb ships with bad timestamps and
|
|
|
|
# doesn't respect --disable-maintainer-mode
|
|
|
|
# it ships with broken permissions too
|
|
|
|
chmod 0755, 'install-sh'
|
|
|
|
|
|
|
|
# par2tbb expects to link against 10.4 / 10.5 SDKs,
|
|
|
|
# but only 10.6+ are available on Xcode4
|
|
|
|
inreplace 'Makefile.am', /^.*-mmacosx-version.*$/, ''
|
|
|
|
|
2012-02-02 18:37:26 +00:00
|
|
|
if Formula.factory('par2').installed?
|
|
|
|
opoo "par2tbb conflicts with par2. Your par2 binaries will be overwritten.
|
|
|
|
If this bothers you, you can restore par2 with `brew link par2`."
|
|
|
|
end
|
2011-12-16 00:04:42 +00:00
|
|
|
|
|
|
|
host_triplet = MacOS.prefer_64_bit? ? "x86_64-apple-darwin11" : "i686-apple-darwin11"
|
|
|
|
|
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}", "--build=#{host_triplet}",
|
|
|
|
"--host=#{host_triplet}"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
|
|
|
<<-EOS.undent
|
|
|
|
par2tbb is a modified fork of par2 and conflicts with its binaries.
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
2012-05-05 21:49:00 +00:00
|
|
|
system "#{bin}/par2"
|
2011-12-16 00:04:42 +00:00
|
|
|
end
|
|
|
|
end
|