From bf29ec40c20b1ef0d84781efc15d1b5641abe02c Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 19 Feb 2012 16:09:07 -0600 Subject: gnupg 1.4.12 - Adjust CFLAGS to preserve building with clang - Remove the patch, which fails to apply. It was not submitted upstream prior to the 1.4.12 release; users who need this patch preserved should see that it is sent to the GnuPG maintainer. We will consider carrying it again once that is done. Signed-off-by: Jack Nagel --- Library/Formula/gnupg.rb | 54 ++++++------------------------------------------ 1 file changed, 6 insertions(+), 48 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/gnupg.rb b/Library/Formula/gnupg.rb index b7341defe..c207754bd 100644 --- a/Library/Formula/gnupg.rb +++ b/Library/Formula/gnupg.rb @@ -6,15 +6,9 @@ class GnupgIdea < Formula end class Gnupg < Formula - url 'ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.11.tar.bz2' homepage 'http://www.gnupg.org/' - sha1 '78e22f5cca88514ee71034aafff539c33f3c6676' - - # Fix from https://bugs.g10code.com/gnupg/issue1292 - # Inline because it is being served w/ a broken cert. - def patches - {:p0 => DATA} - end + url 'ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.12.tar.bz2' + sha1 '9b78e20328d35525af7b8a9c1cf081396910e937' def options [ @@ -24,7 +18,10 @@ class Gnupg < Formula end def install - ENV.append 'CFLAGS', '-std=gnu89' if ENV.compiler == :clang + if ENV.compiler == :clang + ENV.append 'CFLAGS', '-std=gnu89' + ENV.append 'CFLAGS', '-fheinous-gnu-extensions' + end if ARGV.include? '--idea' opoo "You are building with support for the patented IDEA cipher." @@ -35,8 +32,6 @@ class Gnupg < Formula inreplace 'g10/keygen.c', 'max=4096', 'max=8192' if ARGV.include? '--8192' - system "/usr/bin/autoconf" - system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "--disable-asm" @@ -61,40 +56,3 @@ class Gnupg < Formula 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. -- cgit v1.2.3