2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-26 11:58:00 +00:00
|
|
|
|
2010-09-24 18:01:31 +00:00
|
|
|
def build_32bit?; ARGV.include? '--32-bit' or Hardware.is_32_bit?; end
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class P7zip < Formula
|
2011-04-04 20:00:22 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/p7zip/p7zip/9.20.1/p7zip_9.20.1_src_all.tar.bz2'
|
2010-07-16 18:05:35 +00:00
|
|
|
homepage 'http://p7zip.sourceforge.net/'
|
2011-04-04 20:00:22 +00:00
|
|
|
md5 'bd6caaea567dc0d995c990c5cc883c89'
|
2010-07-16 18:05:35 +00:00
|
|
|
|
|
|
|
def options
|
|
|
|
[["--32-bit", "Force 32-bit."]]
|
|
|
|
end
|
|
|
|
|
2009-06-26 11:58:00 +00:00
|
|
|
def install
|
2010-07-16 18:05:35 +00:00
|
|
|
if build_32bit?
|
|
|
|
mv 'makefile.macosx_32bits', 'makefile.machine'
|
|
|
|
else
|
|
|
|
mv 'makefile.macosx_64bits', 'makefile.machine'
|
|
|
|
end
|
|
|
|
|
2010-09-24 18:01:31 +00:00
|
|
|
system "make all3"
|
|
|
|
system "make", "DEST_HOME=#{prefix}", "DEST_MAN=#{man}", "install"
|
2009-06-26 11:58:00 +00:00
|
|
|
end
|
2010-07-16 18:05:35 +00:00
|
|
|
end
|