vis: fix lpeg detection (yes, again)
also install to prefix and rename where necessary Closes #23256. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
58b9f4ad8d
commit
36afda48f6
1 changed files with 8 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
||||||
class Vis < Formula
|
class Vis < Formula
|
||||||
desc "Vim-like text editor"
|
desc "Vim-like text editor"
|
||||||
homepage "https://github.com/martanne/vis"
|
homepage "https://github.com/martanne/vis"
|
||||||
revision 1
|
revision 2
|
||||||
|
|
||||||
head "https://github.com/martanne/vis.git"
|
head "https://github.com/martanne/vis.git"
|
||||||
|
|
||||||
|
@ -38,15 +38,14 @@ class Vis < Formula
|
||||||
system "luarocks", "build", "lpeg", "--tree=#{luapath}"
|
system "luarocks", "build", "lpeg", "--tree=#{luapath}"
|
||||||
end
|
end
|
||||||
|
|
||||||
system "./configure", "--prefix=#{libexec}"
|
system "./configure", "--prefix=#{prefix}"
|
||||||
system "make", "install"
|
system "make", "install"
|
||||||
(bin/"vise").write <<~EOS
|
|
||||||
#!/bin/sh
|
env = { :LUA_PATH => ENV["LUA_PATH"], :LUA_CPATH => ENV["LUA_CPATH"] }
|
||||||
LUA_PATH="#{ENV["LUA_PATH"]}"
|
bin.env_script_all_files(libexec/"bin", env)
|
||||||
LUA_CPATH="#{ENV["LUA_CPATH"]}"
|
# Rename vis & the matching manpage to avoid clashing with the system.
|
||||||
VIS_BASE=#{libexec}
|
mv bin/"vis", bin/"vise"
|
||||||
VIS_PATH=$VIS_BASE/share/vis $VIS_BASE/bin/vis $@
|
mv man1/"vis.1", man1/"vise.1"
|
||||||
EOS
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def caveats; <<~EOS
|
def caveats; <<~EOS
|
||||||
|
|
Loading…
Reference in a new issue