require 'formula' class GnupgIdea NoUnzipCurlDownloadStrategy md5 '9dc3bc086824a8c7a331f35e09a3e57f' end class Gnupg DATA} end def options [["--idea", "Build with (patented) IDEA cipher"]] end def install 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 "/usr/bin/autoconf" system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "--disable-asm" system "make" system "make check" # 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 __END__ Index: configure.ac =================================================================== --- configure.ac (revision 5458) +++ configure.ac (working copy) @@ -730,6 +730,17 @@ [[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ); dn_skipname(0,0); dn_expand(0,0,0,0,0);]])],[have_resolver=yes ; need_compat=yes]) AC_MSG_RESULT($have_resolver) fi + if test x"$have_resolver" != xyes ; then + AC_MSG_CHECKING([whether I can make the resolver usable by linking -lresolv]) + LIBS="-lresolv $LIBS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([#define BIND_8_COMPAT +#include +#include +#include +#include ], +[[unsigned char answer[PACKETSZ]; res_query("foo.bar",C_IN,T_A,answer,PACKETSZ); dn_skipname(0,0); dn_expand(0,0,0,0,0);]])],[have_resolver=yes ; need_compat=yes]) + AC_MSG_RESULT($have_resolver) + fi fi if test x"$have_resolver" = xyes ; then Index: ChangeLog =================================================================== --- ChangeLog (revision 5458) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2010-10-19 Peter Gerdes + + * configure.ac: Add test to see if -lresolv needs to be added to DNSLIBS to enable DNS resolution on OS X + 2010-10-18 Werner Koch Release 1.4.11.