homebrew-core/Formula/vpnc.rb
Adam Vandenberg e1bb919734 Add "fails_with_llvm" to formula to document LLVM build breaks.
Replaced ENV.gcc_4_2 + comments with calls to "fails_with_llvm",
to specifically message to the user when a formula is known or suspected
to not build with LLVM. If the user specifies "--use-llvm", the message
will be displayed, but compilation will be tried anyway.

Since using LLVM is now an advanced/hidden feature instead of the
default on 10.6, we'll let the user try anyway (and submit patches
if things are now working.)
2010-06-16 11:50:36 -07:00

58 lines
1.3 KiB
Ruby

require 'formula'
class Vpnc <Formula
url 'http://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-0.5.3.tar.gz'
homepage 'http://www.unix-ag.uni-kl.de/~massar/vpnc/'
sha256 '46cea3bd02f207c62c7c6f2f22133382602baeda1dc320747809e94881414884'
depends_on 'libgcrypt'
depends_on 'libgpg-error'
def skip_clean? path
path == etc or path == var
end
def options
[
["--hybrid", "Use vpnc hybrid authentication."]
]
end
def install
fails_with_llvm
ENV.no_optimization
ENV.deparallelize
inreplace ["vpnc-script.in", "vpnc-disconnect"] do |s|
s.gsub! "/var/run/vpnc", (var + 'run/vpnc')
end
inreplace "vpnc.8.template" do |s|
s.gsub! "/etc/vpnc", (etc + 'vpnc')
end
inreplace "Makefile" do |s|
s.change_make_var! "PREFIX", prefix
s.change_make_var! "ETCDIR", (etc + 'vpnc')
s.gsub! /^#OPENSSL/, "OPENSSL" if ARGV.include? "--hybrid"
end
inreplace "config.c" do |s|
s.gsub! "/etc/vpnc", (etc + 'vpnc')
s.gsub! "/var/run/vpnc", (var + 'run/vpnc')
end
system "make"
(var + 'run/vpnc').mkpath
system "make install"
end
def caveats
<<-END_CAVEATS
Formula contribute hybrid option for vpnc hybrid authentification.
To install use:
brew install vpnc --hybrid
END_CAVEATS
end
end