From 182ce1eff69eb9ee4133a5e3abebbd27a9909986 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Mon, 3 Aug 2009 15:15:58 +0100 Subject: [PATCH] Formula::std_cmake_parameters Because cmake syntax is batshit-insane, this stops people having to memorize which parameters to supply, and thus prevents error. I didn't do the same for Autotools deliberately as I have found that which parameters are supported is somewhat inconsistent. Plenty don't even support --disable-debug, thus I want the parameters getting used in the contributors face so they can easily diagnose what is going on. --- Library/Homebrew/formula.rb | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 450ba5d139..56525be1ee 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -93,6 +93,15 @@ public raise BuildError.new(cmd) unless $? == 0 end + # we don't have a std_autotools variant because autotools is a lot less + # consistent and the standard parameters are more memorable + # really Homebrew should determine what works inside brew() then + # we could add --disable-dependency-tracking when it will work + def std_cmake_parameters + # The None part makes cmake use the environment's CFLAGS etc. settings + "-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None" + end + # yields self with current working directory set to the uncompressed tarball def brew ohai "Downloading #{@url}" @@ -105,7 +114,9 @@ public if @md5 and not @md5.empty? raise "MD5 mismatch: #{md5}" unless md5 == @md5.downcase else - opoo "Formula does not provide an MD5 hash." + opoo "Cannot verify package integrity" + puts "The formula did not provide a download checksum" + puts "For your reference the MD5 is: #{md5}" end # we make an additional subdirectory so know exactly what we are