34 lines
1.1 KiB
Ruby
34 lines
1.1 KiB
Ruby
class Cask < Formula
|
|
desc "Emacs dependency management"
|
|
homepage "https://cask.readthedocs.org/"
|
|
url "https://github.com/cask/cask/archive/v0.7.2.tar.gz"
|
|
sha256 "5c8804933dd395ec79e957c96179bf6ac20af24066928685a713e54f44107a2c"
|
|
head "https://github.com/cask/cask.git"
|
|
revision 1
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on :emacs => ["24", :run]
|
|
|
|
def install
|
|
bin.install "bin/cask"
|
|
prefix.install "templates"
|
|
# Lisp files must stay here: https://github.com/cask/cask/issues/305
|
|
prefix.install Dir["*.el"]
|
|
(share/"emacs/site-lisp/cask").install_symlink "#{prefix}/cask.el"
|
|
(share/"emacs/site-lisp/cask").install_symlink "#{prefix}/cask-bootstrap.el"
|
|
zsh_completion.install "etc/cask_completion.zsh"
|
|
|
|
# Stop cask performing self-upgrades.
|
|
touch prefix/".no-upgrade"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.el").write <<-EOS.undent
|
|
(add-to-list 'load-path "#{share}/emacs/site-lisp/cask")
|
|
(require 'cask)
|
|
(print (minibuffer-prompt-width))
|
|
EOS
|
|
assert_equal "0", shell_output("emacs -Q --batch -l #{testpath}/test.el").strip
|
|
end
|
|
end
|