mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-10 07:57:59 -05:00
61 lines
2.4 KiB
Ruby
61 lines
2.4 KiB
Ruby
require 'package'
|
|
|
|
class Vim < Package
|
|
description 'Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient.'
|
|
homepage 'http://www.vim.org/'
|
|
version '8.0-3'
|
|
source_url 'ftp://ftp.vim.org/pub/vim/unix/vim-8.0.tar.bz2'
|
|
source_sha256 '08bd0d1dd30ece3cb9905ccd48b82b2f81c861696377508021265177dc153a61'
|
|
|
|
binary_url ({
|
|
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/vim-8.0-3-chromeos-armv7l.tar.xz',
|
|
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/vim-8.0-3-chromeos-armv7l.tar.xz',
|
|
i686: 'https://dl.bintray.com/chromebrew/chromebrew/vim-8.0-3-chromeos-i686.tar.xz',
|
|
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/vim-8.0-3-chromeos-x86_64.tar.xz',
|
|
})
|
|
binary_sha256 ({
|
|
aarch64: '5b7271a46f852461ee5ec01894b0ac5ca78e606eb0769763ab85f0a5f5bf4ca5',
|
|
armv7l: '5b7271a46f852461ee5ec01894b0ac5ca78e606eb0769763ab85f0a5f5bf4ca5',
|
|
i686: '29cf236b9cb80869fa0c4a255834f139e5e6487fe2f0ba8e0c10686edc6553f8',
|
|
x86_64: 'e1459257c1543a695f673452eaf9d0a2db7e1adc21252eb6cfc56405a134203e',
|
|
})
|
|
|
|
depends_on 'compressdoc' => :build
|
|
depends_on 'ncurses'
|
|
# vim uses shared library of following languages, so need them isntalled at run-time
|
|
depends_on 'perl'
|
|
depends_on 'python3'
|
|
depends_on 'ruby'
|
|
|
|
def self.build
|
|
system "./configure \
|
|
--prefix=#{CREW_PREFIX} \
|
|
--enable-gui=no \
|
|
--with-features=huge \
|
|
--without-x \
|
|
--disable-nls \
|
|
--enable-multibyte \
|
|
--with-tlib=ncurses \
|
|
--enable-perlinterp \
|
|
--enable-python3interp \
|
|
--enable-rubyinterp \
|
|
--with-ruby-command=#{CREW_PREFIX}/bin/ruby \
|
|
--with-vimdiff \
|
|
--disable-selinux"
|
|
system "make"
|
|
end
|
|
|
|
def self.install
|
|
system "make", "DESTDIR=#{CREW_DEST_DIR}", "install"
|
|
system "compressdoc --gzip -9 #{CREW_DEST_PREFIX}/share/man/man1"
|
|
system "cp #{CREW_DEST_PREFIX}/share/vim/vim80/vimrc_example.vim #{CREW_DEST_PREFIX}/share/vim/vim80/vimrc"
|
|
end
|
|
|
|
def self.postinstall
|
|
puts "\nMake sure to put your .vim directory in a subdirectory of #{CREW_PREFIX} so it has execute permissions.".lightblue
|
|
puts "You can then symlink to your home directory so vim can see it as follows:".lightblue
|
|
puts "ln -s #{CREW_PREFIX}/share/vim/vim80 ~/.vim".lightblue
|
|
puts "ln -s ~/.vim/vimrc ~/.vimrc\n".lightblue
|
|
end
|
|
end
|