aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2012-10-23 16:32:53 -0500
committerJack Nagel2012-10-23 16:33:10 -0500
commitd03c1b4583dc4d3ca2a457df5ef6e316f6c7c723 (patch)
treebe71eb266a76c4e43cf574f5ae0fda98dda76902 /Library/Formula
parentea9e5b07ef052b4e0878f5f2d7dccbaa76463441 (diff)
downloadhomebrew-d03c1b4583dc4d3ca2a457df5ef6e316f6c7c723.tar.bz2
gnupg: superenv fix
Fixes #14803. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/gnupg.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/Library/Formula/gnupg.rb b/Library/Formula/gnupg.rb
index e9581cd39..b2d34dc5d 100644
--- a/Library/Formula/gnupg.rb
+++ b/Library/Formula/gnupg.rb
@@ -13,12 +13,13 @@ class Gnupg < Formula
option 'idea', 'Build with the patented IDEA cipher'
option '8192', 'Build with support for private keys of up to 8192 bits'
- def install
- if ENV.compiler == :clang
- ENV.append 'CFLAGS', '-std=gnu89'
- ENV.append 'CFLAGS', '-fheinous-gnu-extensions'
- end
+ def cflags
+ cflags = ENV.cflags.to_s
+ cflags += ' -std=gnu89 -fheinous-gnu-extensions' if ENV.compiler == :clang
+ cflags
+ end
+ def install
if build.include? 'idea'
GnupgIdea.new.brew { (buildpath/'cipher').install Dir['*'] }
system 'gunzip', 'cipher/idea.c.gz'
@@ -29,7 +30,7 @@ class Gnupg < Formula
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--disable-asm"
- system "make"
+ system "make", "CFLAGS=#{cflags}"
system "make check"
# we need to create these directories because the install target has the