Skip to content

Instantly share code, notes, and snippets.

@marc-etienne
Created September 14, 2017 18:05
Show Gist options
  • Save marc-etienne/d1ebd91f5622430eb3b518f3d8f93098 to your computer and use it in GitHub Desktop.
Save marc-etienne/d1ebd91f5622430eb3b518f3d8f93098 to your computer and use it in GitHub Desktop.
diff --git a/Formula/p7zip.rb b/Formula/p7zip.rb
index a102437388..0e97ac74ee 100644
--- a/Formula/p7zip.rb
+++ b/Formula/p7zip.rb
@@ -12,11 +12,18 @@ class P7zip < Formula
sha256 "78981de13a763ab595e073360e2848ca0ad65d9a13b7f7728e0c255945cdd00e" => :mavericks
end
+ option "with-nsis-decompiler", "Build with NSIS decompiler support"
+
def install
+ if build.with? "nsis-decompiler"
+ flags = "$(ALLFLAGS) -DNSIS_SCRIPT"
+ else
+ flags = "$(ALLFLAGS)"
+ end
mv "makefile.macosx_llvm_64bits", "makefile.machine"
system "make", "all3",
- "CC=#{ENV.cc} $(ALLFLAGS)",
- "CXX=#{ENV.cxx} $(ALLFLAGS)"
+ "CC=#{ENV.cc} #{flags}",
+ "CXX=#{ENV.cxx} #{flags}"
system "make", "DEST_HOME=#{prefix}",
"DEST_MAN=#{man}",
"install"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment