-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify formula to sync with homebrew core, and change python to 3.9
- Loading branch information
Showing
2 changed files
with
16 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,14 @@ | |
class Macvim < Formula | ||
desc "GUI for vim, made for macOS" | ||
homepage "https://github.com/macvim-dev/macvim" | ||
head "https://github.com/macvim-dev/macvim.git" | ||
head "https://github.com/macvim-dev/macvim.git", branch: "master" | ||
|
||
depends_on :xcode => :build | ||
depends_on xcode: :build | ||
depends_on "cscope" | ||
depends_on "gettext" | ||
depends_on "lua" | ||
depends_on "[email protected]" | ||
depends_on :macos | ||
depends_on "[email protected]" | ||
depends_on "ruby" | ||
|
||
def install | ||
|
@@ -34,10 +36,13 @@ def install | |
"--with-lua-prefix=#{Formula["lua"].opt_prefix}", | ||
"--enable-luainterp", | ||
"--enable-python3interp", | ||
"--disable-sparkle" | ||
"--disable-sparkle", | ||
"--with-macarchs=#{Hardware::CPU.arch}" | ||
system "make" | ||
|
||
prefix.install "src/MacVim/build/Release/MacVim.app" | ||
# Remove autoupdating universal binaries | ||
(prefix/"MacVim.app/Contents/Frameworks/Sparkle.framework").rmtree | ||
bin.install_symlink prefix/"MacVim.app/Contents/bin/mvim" | ||
|
||
# Create MacVim vimdiff, view, ex equivalents | ||
|
@@ -48,9 +53,10 @@ def install | |
test do | ||
output = shell_output("#{bin}/mvim --version") | ||
assert_match "+ruby", output | ||
assert_match "+gettext", output | ||
|
||
# Simple test to check if MacVim was linked to Homebrew's Python 3 | ||
py3_exec_prefix = Utils.popen_read(Formula["python@3.8"].opt_bin/"python3-config", "--exec-prefix") | ||
py3_exec_prefix = shell_output(Formula["python@3.9"].opt_bin/"python3-config --exec-prefix") | ||
assert_match py3_exec_prefix.chomp, output | ||
(testpath/"commands.vim").write <<~EOS | ||
:python3 import vim; vim.current.buffer[0] = 'hello python3' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters