diff options
| author | Adam Vandenberg | 2010-06-30 22:02:09 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-06-30 22:02:09 -0700 |
| commit | 7548b86d8874977cdf6e48cadeb972489516465c (patch) | |
| tree | c5a989098ceb3b0fe0eb68ba3c54099e348fc789 /Library/Formula | |
| parent | 71784db4b7923f3d8589b03339804ce2ea91f947 (diff) | |
| download | homebrew-7548b86d8874977cdf6e48cadeb972489516465c.tar.bz2 | |
GnuPG - add support for patented IDEA cipher
Based on a patch from larseggert.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/gnupg.rb | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/Library/Formula/gnupg.rb b/Library/Formula/gnupg.rb index ede1b9ac2..2c03a6aa4 100644 --- a/Library/Formula/gnupg.rb +++ b/Library/Formula/gnupg.rb @@ -1,21 +1,48 @@ require 'formula' +class GnupgIdea <Formula + head 'http://www.gnupg.dk/contrib-dk/idea.c.gz', :using => NoUnzipCurlDownloadStrategy + md5 '9dc3bc086824a8c7a331f35e09a3e57f' +end + class Gnupg <Formula - @url='ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.10.tar.bz2' - @homepage='http://www.gnupg.org/' - @sha1='fd1b6a5f3b2dd836b598a1123ac257b8f105615d' + url 'ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.10.tar.bz2' + homepage 'http://www.gnupg.org/' + sha1 'fd1b6a5f3b2dd836b598a1123ac257b8f105615d' + + def options + [["--idea", "Build with (patented) IDEA cipher"]] + end def install - system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking", "--disable-asm" + if ARGV.include? '--idea' + opoo "You are building with support for the patented IDEA cipher." + d=Pathname.getwd + GnupgIdea.new.brew { (d+'cipher').install Dir['*'] } + system 'gunzip', 'cipher/idea.c.gz' + end + system "./configure", "--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--disable-asm" system "make" system "make check" - # amazingly even the GNU folks can bugger up their Makefiles, so we need - # to create these directories because the install target has the + # we need to create these directories because the install target has the # dependency order wrong bin.mkpath (libexec+'gnupg').mkpath system "make install" end + + def caveats + if ARGV.include? '--idea' + <<-EOS.undent + Please read http://www.gnupg.org/faq/why-not-idea.en.html before doing so. + You will then need to add the following line to your ~/.gnupg/gpg.conf or + ~/.gnupg/options file: + load-extension idea + EOS + end + end end |
