aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorSaket Choudhary2015-01-08 14:21:00 -0800
committerMike McQuaid2015-01-23 17:57:06 +0100
commite35a08c7c3ad7d0d46895da11577fa143df857bf (patch)
tree0b275c66b040375014a69d73522538e642ca6b66 /Library
parent53e9a98dc06c1002d7d3960e155d372704b4019f (diff)
downloadhomebrew-e35a08c7c3ad7d0d46895da11577fa143df857bf.tar.bz2
p7zip: modernize, fix audit warnings
Signed-off-by: Saket Choudhary <saketkc@gmail.com> Closes #35675. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/p7zip.rb20
1 files changed, 9 insertions, 11 deletions
diff --git a/Library/Formula/p7zip.rb b/Library/Formula/p7zip.rb
index 299f04a43..4d10764a0 100644
--- a/Library/Formula/p7zip.rb
+++ b/Library/Formula/p7zip.rb
@@ -1,9 +1,7 @@
-require 'formula'
-
class P7zip < Formula
- homepage 'http://p7zip.sourceforge.net/'
- url 'https://downloads.sourceforge.net/project/p7zip/p7zip/9.20.1/p7zip_9.20.1_src_all.tar.bz2'
- sha1 '1cd567e043ee054bf08244ce15f32cb3258306b7'
+ homepage "http://p7zip.sourceforge.net/"
+ url "https://downloads.sourceforge.net/project/p7zip/p7zip/9.20.1/p7zip_9.20.1_src_all.tar.bz2"
+ sha1 "1cd567e043ee054bf08244ce15f32cb3258306b7"
bottle do
sha1 "c734e7052a1e3e9e280b189db31cf59e9d4f98e6" => :yosemite
@@ -11,23 +9,23 @@ class P7zip < Formula
sha1 "0d6f280dcedc67a789bbfd54f0ddef65899f4dfe" => :mountain_lion
end
- option '32-bit'
+ option "32-bit"
def install
if Hardware.is_32_bit? or build.build_32_bit?
- mv 'makefile.macosx_32bits', 'makefile.machine'
+ mv "makefile.macosx_32bits", "makefile.machine"
else
- mv 'makefile.macosx_64bits', 'makefile.machine'
+ mv "makefile.macosx_64bits", "makefile.machine"
end
+ # install.sh chmods to 444, which is bad and breaks uninstalling
+ inreplace "install.sh", /chmod (444|555).*/, ""
+
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 bad and breaks uninstalling
- system "chmod -R +w #{doc}"
end
end