Commit 61c214de authored by satmandu's avatar satmandu Committed by GitHub

Update gvim.rb

parent c32e4b0f
...@@ -3,58 +3,78 @@ require 'package' ...@@ -3,58 +3,78 @@ require 'package'
class Gvim < Package class Gvim < Package
description 'Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient. (with advanced features, such as a GUI)' description 'Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient. (with advanced features, such as a GUI)'
homepage 'http://www.vim.org/' homepage 'http://www.vim.org/'
version '8.2.1976' @_ver = '8.2.2580'
version @_ver
compatibility 'all' compatibility 'all'
source_url 'https://github.com/vim/vim/archive/v8.2.1976.tar.gz' source_url 'https://github.com/vim/vim/archive/v8.2.2580.tar.gz'
source_sha256 'd2d8bc28e28e9c5a63be570cdb44be39470621bb57dcbace5abbd86e15690678' source_sha256 'd0a508ca9726c8ff69bc5f5ab1ebe251c256e01e730f7b36afd03a66c89fcf79'
binary_url ({ binary_url({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/gvim-8.2.1976-chromeos-armv7l.tar.xz', aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/gvim-8.2.2580-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/gvim-8.2.1976-chromeos-armv7l.tar.xz', armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/gvim-8.2.2580-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/gvim-8.2.1976-chromeos-i686.tar.xz', i686: 'https://dl.bintray.com/chromebrew/chromebrew/gvim-8.2.2580-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/gvim-8.2.1976-chromeos-x86_64.tar.xz', x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/gvim-8.2.2580-chromeos-x86_64.tar.xz'
}) })
binary_sha256 ({ binary_sha256({
aarch64: '3bec0434e49ab556c45b6755e858d8a1bf917f238e2906a35a7fbcffebe575bb', aarch64: 'c06a89c4a40a50d68232218248bce92fe6613cf7e1ec88711f3ac9fcc25e8d9d',
armv7l: '3bec0434e49ab556c45b6755e858d8a1bf917f238e2906a35a7fbcffebe575bb', armv7l: 'c06a89c4a40a50d68232218248bce92fe6613cf7e1ec88711f3ac9fcc25e8d9d',
i686: '62a0405196e9e701f54025447bfe23e59554e5c5abe298d080246384378a6a28', i686: 'ec59a0ce5aea951488100381333ef8e30f11880b2fadc66cbc9a90db06c7ff31',
x86_64: '087edd65ce9f13039ab9d8d9a8c6a5c9d6c02f47ad9a2c519970085d8999473f', x86_64: 'a3fa1854b694e1ae034086950a51909825bdd5886dbb7ed29e8651dc53673458'
}) })
depends_on 'vim_runtime' depends_on 'vim_runtime'
depends_on 'gtk3' depends_on 'gtk3'
depends_on 'sommelier' depends_on 'sommelier'
def self.preflight
abort('Please remove libiconv before building.') if File.exist?("#{CREW_LIB_PREFIX}/libcharset.so")
vim = `which vim 2> /dev/null`.chomp
abort "vim version #{version} already installed.".lightgreen unless vim.to_s == ''
end
def self.patch def self.patch
# set the system-wide vimrc path # set the system-wide vimrc path
FileUtils.cd('src') do FileUtils.cd('src') do
system "sed", "-i", "s|^.*#define SYS_VIMRC_FILE.*$|#define SYS_VIMRC_FILE \"#{CREW_PREFIX}/etc/vimrc\"|", "feature.h" system 'sed', '-i', "s|^.*#define SYS_VIMRC_FILE.*$|#define SYS_VIMRC_FILE \"#{CREW_PREFIX}/etc/vimrc\"|",
system "sed", "-i", "s|^.*#define SYS_GVIMRC_FILE.*$|#define SYS_GVIMRC_FILE \"#{CREW_PREFIX}/etc/gvimrc\"|", "feature.h" 'feature.h'
system 'sed', '-i', "s|^.*#define SYS_GVIMRC_FILE.*$|#define SYS_GVIMRC_FILE \"#{CREW_PREFIX}/etc/gvimrc\"|",
'feature.h'
system 'autoconf' system 'autoconf'
end end
end end
def self.build def self.build
system "./configure", system './configure --help'
"--prefix=#{CREW_PREFIX}", system "env CFLAGS='-pipe -fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
"--localstatedir=#{CREW_PREFIX}/var/lib/vim", CXXFLAGS='-pipe -fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
'--with-features=huge', LDFLAGS='-fno-stack-protector -U_FORTIFY_SOURCE -flto=auto' \
"--with-compiledby='Chromebrew'", ./configure \
'--with-x=yes', #{CREW_OPTIONS} \
'--enable-gui=gtk3', --localstatedir=#{CREW_PREFIX}/var/lib/vim \
'--enable-multibyte', --with-features=huge \
'--enable-cscope', --with-compiledby='Chromebrew' \
'--enable-fontset', --enable-gpm \
'--enable-perlinterp=dynamic', --enable-acl \
'--enable-pythoninterp=dynamic', --with-x=yes \
'--enable-python3interp=dynamic', --enable-gnome-check \
'--enable-rubyinterp=dynamic', --enable-multibyte \
'--disable-selinux' --enable-cscope \
--enable-netbeans \
--enable-perlinterp=dynamic \
--enable-pythoninterp=dynamic \
--enable-python3interp=dynamic \
--enable-rubyinterp=dynamic \
--enable-luainterp=dynamic \
--enable-tclinterp=dynamic \
--disable-canberra \
--disable-selinux \
--disable-nls"
system 'make' system 'make'
end end
def self.install def self.install
system 'make', "VIMRCLOC=#{CREW_PREFIX}/etc", "DESTDIR=#{CREW_DEST_DIR}", 'install' system 'make', "VIMRCLOC=#{CREW_PREFIX}/etc", "DESTDIR=#{CREW_DEST_DIR}", 'install'
FileUtils.ln_s "#{CREW_PREFIX}/bin/vim", "#{CREW_DEST_PREFIX}/bin/vi"
# these are provided by 'vim_runtime' # these are provided by 'vim_runtime'
FileUtils.rm_r "#{CREW_DEST_PREFIX}/share/vim" FileUtils.rm_r "#{CREW_DEST_PREFIX}/share/vim"
...@@ -63,9 +83,9 @@ class Gvim < Package ...@@ -63,9 +83,9 @@ class Gvim < Package
def self.postinstall def self.postinstall
puts puts
puts "The config files are located in #{CREW_PREFIX}/etc".lightblue puts "The config files are located in #{CREW_PREFIX}/etc".lightblue
puts "User-specific configuration should go in ~/.gvimrc".lightblue puts 'User-specific configuration should go in ~/.gvimrc'.lightblue
puts puts
puts "If you are upgrading from an earlier version, edit ~/.bashrc".orange puts 'If you are upgrading from an earlier version, edit ~/.bashrc'.orange
puts "and remove the 'export VIMRUNTIME' and 'export LC_ALL=C' lines.".orange puts "and remove the 'export VIMRUNTIME' and 'export LC_ALL=C' lines.".orange
puts puts
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment