2014-02-06 16:16:28 +00:00
|
|
|
class Cask < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Emacs dependency management"
|
2015-05-08 10:48:23 +00:00
|
|
|
homepage "https://cask.readthedocs.org/"
|
2014-09-23 05:49:03 +00:00
|
|
|
url "https://github.com/cask/cask/archive/v0.7.2.tar.gz"
|
2015-05-08 07:52:53 +00:00
|
|
|
sha256 "5c8804933dd395ec79e957c96179bf6ac20af24066928685a713e54f44107a2c"
|
2014-02-06 16:16:28 +00:00
|
|
|
head "https://github.com/cask/cask.git"
|
2015-08-04 02:23:14 +00:00
|
|
|
revision 1
|
2014-02-06 16:16:28 +00:00
|
|
|
|
2015-10-23 07:39:27 +00:00
|
|
|
bottle :unneeded
|
2015-05-08 08:35:10 +00:00
|
|
|
|
2015-08-30 16:15:26 +00:00
|
|
|
depends_on :emacs => ["24", :run]
|
2014-02-06 16:16:28 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
bin.install "bin/cask"
|
|
|
|
prefix.install "templates"
|
2015-07-05 19:09:26 +00:00
|
|
|
# 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"
|
|
|
|
|
2014-02-06 16:16:28 +00:00
|
|
|
# Stop cask performing self-upgrades.
|
|
|
|
touch prefix/".no-upgrade"
|
|
|
|
end
|
2015-05-08 07:52:53 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.el").write <<-EOS.undent
|
2015-07-05 19:09:26 +00:00
|
|
|
(add-to-list 'load-path "#{share}/emacs/site-lisp/cask")
|
2015-05-08 07:52:53 +00:00
|
|
|
(require 'cask)
|
|
|
|
(print (minibuffer-prompt-width))
|
|
|
|
EOS
|
2015-07-05 19:09:26 +00:00
|
|
|
assert_equal "0", shell_output("emacs -Q --batch -l #{testpath}/test.el").strip
|
2015-05-08 07:52:53 +00:00
|
|
|
end
|
2014-02-06 16:16:28 +00:00
|
|
|
end
|