2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-26 11:58:00 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class P7zip < Formula
|
2010-07-16 18:05:35 +00:00
|
|
|
homepage 'http://p7zip.sourceforge.net/'
|
2012-09-07 20:37:22 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/p7zip/p7zip/9.20.1/p7zip_9.20.1_src_all.tar.bz2'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '1cd567e043ee054bf08244ce15f32cb3258306b7'
|
2010-07-16 18:05:35 +00:00
|
|
|
|
2012-08-13 14:35:59 +00:00
|
|
|
option '32-bit'
|
2010-07-16 18:05:35 +00:00
|
|
|
|
2009-06-26 11:58:00 +00:00
|
|
|
def install
|
2012-08-13 14:35:59 +00:00
|
|
|
if Hardware.is_32_bit? or build.build_32_bit?
|
2010-07-16 18:05:35 +00:00
|
|
|
mv 'makefile.macosx_32bits', 'makefile.machine'
|
|
|
|
else
|
|
|
|
mv 'makefile.macosx_64bits', 'makefile.machine'
|
|
|
|
end
|
|
|
|
|
2012-09-07 20:37:22 +00:00
|
|
|
system "make", "all3",
|
|
|
|
"CC=#{ENV.cc} $(ALLFLAGS)",
|
|
|
|
"CXX=#{ENV.cxx} $(ALLFLAGS)"
|
|
|
|
system "make", "DEST_HOME=#{prefix}",
|
|
|
|
"DEST_MAN=#{man}",
|
|
|
|
"install"
|
|
|
|
|
|
|
|
# install.sh chmods to 444, which is bullshit and breaks uninstalling
|
|
|
|
system "chmod -R +w #{doc}"
|
2009-06-26 11:58:00 +00:00
|
|
|
end
|
2010-07-16 18:05:35 +00:00
|
|
|
end
|