aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-08-03 15:15:58 +0100
committerMax Howell2009-08-06 20:25:59 +0100
commit182ce1eff69eb9ee4133a5e3abebbd27a9909986 (patch)
tree49f53463714533829ea7a17b8129179c29bafae4
parente9dbdadcacba4dda800dedf7511a510a149a4742 (diff)
downloadbrew-182ce1eff69eb9ee4133a5e3abebbd27a9909986.tar.bz2
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.
-rw-r--r--Library/Homebrew/formula.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 450ba5d13..56525be1e 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