homebrew-core/Formula/yafc.rb
Jack Nagel d87063d32f Remove remaining explicit xz build-time deps
These dependencies are automatically detected from the URL, so declaring
them is redundant. If these formulae ever get a head or devel spec, then
explicit xz deps would need to be re-scoped appropriately. Thus we
should remove them.
2014-03-14 23:40:32 -05:00

46 lines
1.2 KiB
Ruby

require 'formula'
class Yafc < Formula
homepage 'http://www.yafc-ftp.com/'
url 'http://www.yafc-ftp.com/upload/yafc-1.3.2.tar.xz'
sha1 'a4cd5518b84cd40c4503f2e022ba946a8bd5484a'
depends_on 'readline'
depends_on 'libssh' => :recommended
def patches
DATA
end
def install
readline = Formula["readline"].opt_prefix
args = ["--prefix=#{prefix}",
"--with-readline=#{readline}"]
args << "--without-ssh" if build.without? "libssh"
system "./configure", *args
system "make", "install"
end
test do
system "#{bin}/yafc", "-V"
end
end
__END__
# The bash-completion script assumes GNU sed and its 'r' option for
# extended regular expressions. OSX's sed calls this 'E' (they're not
# entirely compatible, but enough for this use case).
diff --git a/completion/yafc b/completion/yafc
index 03c452a..87f02e2 100644
--- a/completion/yafc
+++ b/completion/yafc
@@ -8,7 +8,7 @@ _yafc()
cur=`_get_cword`
if [ $COMP_CWORD -eq 1 ] && [ -f ~/.yafc/bookmarks ]; then
- COMPREPLY=( $( compgen -W '$( sed -nre "/machine/ s/.* alias '\''([^'\'']*)'\''/\1/ p" \
+ COMPREPLY=( $( compgen -W '$( sed -nEe "/machine/ s/.* alias '\''([^'\'']*)'\''/\1/ p" \
~/.yafc/bookmarks )' -- "$cur" ) )
fi