aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2009-08-03 15:15:58 +0100
committerMax Howell2009-08-06 20:25:59 +0100
commit1cf339388b40adfc327379d8a4a4fd69deffbadb (patch)
treebb2e78a36b1740aae2990798fc63b7c99b464fea /Library
parent432faa4146c570f7e6c03457540ac33310dc0ba7 (diff)
downloadhomebrew-1cf339388b40adfc327379d8a4a4fd69deffbadb.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.
Diffstat (limited to 'Library')
-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