diff options
Diffstat (limited to 'abs')
-rw-r--r-- | abs/extra/vim/PKGBUILD | 314 | ||||
-rw-r--r-- | abs/extra/vim/archlinux.vim | 15 | ||||
-rw-r--r-- | abs/extra/vim/gvim.desktop | 63 | ||||
-rw-r--r-- | abs/extra/vim/gvim.install | 11 | ||||
-rw-r--r-- | abs/extra/vim/vimdoc.hook | 11 | ||||
-rw-r--r-- | abs/extra/vim/vimrc | 4 |
6 files changed, 184 insertions, 234 deletions
diff --git a/abs/extra/vim/PKGBUILD b/abs/extra/vim/PKGBUILD index d0c30fd..a5cb912 100644 --- a/abs/extra/vim/PKGBUILD +++ b/abs/extra/vim/PKGBUILD @@ -1,121 +1,161 @@ -# $Id: PKGBUILD 163486 2012-07-13 05:33:54Z tdziedzic $ +# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> +# Contributor: Anatol Pomozov <anatol.pomozov@gmail.com> +# Contributor: Thomas Dziedzic <gostrc@gmail.com> # Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com> -# Maintainer: tobias [ tobias at archlinux org ] -# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us> +# Contributor: tobias [ tobias at archlinux org ] +# Contributor: Daniel J Griffiths <ghost1227@archlinux.us> +# Contributor: Christian Hesse <mail@eworm.de> +# Contributor: Eli Schwartz pkgbase=vim pkgname=('vim' 'gvim' 'vim-runtime') -_topver=7.3 -_patchlevel=600 -__hgrev=11d40fc82f11 -_versiondir="vim${_topver//./}" -pkgver=${_topver}.${_patchlevel} +pkgver=8.0.1838 +_versiondir=80 pkgrel=1 -arch=('i686' 'x86_64') +pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor' +url='http://www.vim.org' +arch=('x86_64') license=('custom:vim') -url="http://www.vim.org" -makedepends=('gpm' 'python2' 'ruby' 'libxt' 'desktop-file-utils' 'gtk2' 'lua') -source=("ftp://ftp.archlinux.org/other/vim/vim-${pkgver}.tar.xz" - "ftp://ftp.archlinux.org/other/vim/vim-${pkgver}.tar.xz.sig" - 'pythoncomplete.vim::http://www.vim.org/scripts/download_script.php?src_id=10872' - 'vimrc' - 'archlinux.vim' - 'gvim.desktop') -sha1sums=('a1c54bde75476ace5d24d4c17f7a81818e80dfda' - '14d62fe89d8292a6d2f7c46e8c61bd59bbd01083' - '4d9dcfb32874aa5467e6f06e418aeb4e675daaf2' - '3494baf53a63581ba69f86a81293640ff681c5c5' - '25dd3c2ce436e73a367c8f73b68f7f6889682437' - '4a579cf66590d711f49c5dfb4a25e5df116ff7ba') - -# source PKGBUILD && mksource -mksource() { - - [[ -x /usr/bin/hg ]] || (echo "hg not found. Install mercurial." && return 1) - - __hgroot='http://vim.googlecode.com/hg/' - __hgrepo='vim' - __hgbranch='default' - - hg clone -b ${__hgbranch} -u ${__hgrev} "${__hgroot}${__hgrepo}" ${__hgrepo} - - pushd ${__hgrepo} - if (( $(hg id -n) < $(hg id -nr ${__hgbranch}) )); then - printf 'You are not building the latest revision!\n' - printf "Consider updating __hgrev to $(hg id -r ${__hgbranch}).\n" - fi - popd - - mv vim ${pkgname}-${pkgver} - find ${pkgname}-${pkgver} -depth -type d -name .hg -exec rm -rf {} \; - rm ${pkgname}-${pkgver}/{.hgignore,.hgtags} - tar -cJf ${pkgname}-${pkgver}.tar.xz ${pkgname}-${pkgver}/* - rm -r ${pkgname}-${pkgver} - #gpg --detach-sign --use-agent -u ${GPGKEY} ${pkgname}-${pkgver}.tar.xz +makedepends=('glibc' 'libgcrypt' 'gpm' 'python2' 'python' 'ruby' 'libxt' 'gtk3' 'lua' + 'gawk' 'tcl' 'pcre' 'zlib' 'libffi') +source=(vim-${pkgver}.tar.gz::https://github.com/vim/vim/archive/v${pkgver}.tar.gz + vimrc + archlinux.vim + vimdoc.hook) +sha256sums=('0d72e80c1acb1852be830d9cc82e0609f9f345857c7239c6a2fa4cba335ef548' + 'b16e85e457397ab2043a7ee0a3c84307c6b4eac157fd0b721694761f25b3ed5b' + '2a6689ce603486f87df9d7e9697032015a8688d663984f5380c1f16cfeed31d4' + '7095cafac21df7aa42749d6864d1c0549fe65771d8edda3102c931c60782b6b9') +sha512sums=('ec0c126361baf0e031d27bc82424121b1de9334357c3e26be959dc5556ac5f112db7be92ed8f679b91442f072cb52cc42fcae6ddb0ae9160392b6623a256ce06' + '4b5bed0813f22af9e158ea9aa56a4a9862dd786ba2d201f20159ccf652da6190164aaed0b6b7217d578f7b25c33a8adcc307bfcf3caa8d173a7ff29e2a00fee7' + '6d0130bb35fc1abb5d657393290d838742725a9d5e4e592b5fd71c8c5852374de010fb58347974096192c8dd8cf42c67185bc2cc38c70609afbcce2c91489781' + '1e06e981691b17662fd0fddac5c00c87c920d1b4a1cbb6191c42d57cc40b00af12710e26b22fcfc0901bb8142b15f6a04aa65cec2d9b3bb9d5a06cb650d3ab9c') + +prepare() { + (cd vim-${pkgver}/src + # define the place for the global (g)vimrc file (set to /etc/vimrc) + sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' feature.h + sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' feature.h + autoconf + ) + cp -a vim-${pkgver} gvim-${pkgver} } build() { - # remove -O2 because there is a crash with python because of it - # fedora br: https://bugzilla.redhat.com/show_bug.cgi?id=817196 - export CFLAGS="${CFLAGS/-O2 /}" - - cd "${srcdir}" - - cp -a ${pkgname}-${pkgver} vim-build - - # define the place for the global (g)vimrc file (set to /etc/vimrc) - sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' \ - vim-build/src/feature.h - sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' \ - vim-build/src/feature.h - # fix python name - sed -i -e 's|vi_cv_path_python, python|vi_cv_path_python, python2|' \ - vim-build/src/configure.in - (cd vim-build/src && autoconf) + msg2 "Building vim..." + (cd vim-${pkgver} + ./configure \ + --prefix=/usr \ + --localstatedir=/var/lib/vim \ + --with-features=huge \ + --with-compiledby='Arch Linux' \ + --enable-gpm \ + --enable-acl \ + --with-x=no \ + --disable-gui \ + --enable-multibyte \ + --enable-cscope \ + --enable-netbeans \ + --enable-perlinterp=dynamic \ + --enable-pythoninterp=dynamic \ + --enable-python3interp=dynamic \ + --enable-rubyinterp=dynamic \ + --enable-luainterp=dynamic \ + --enable-tclinterp=dynamic + make + ) + + msg2 "Building gvim..." + (cd gvim-${pkgver} + ./configure \ + --prefix=/usr \ + --localstatedir=/var/lib/vim \ + --with-features=huge \ + --with-compiledby='Arch Linux' \ + --enable-gpm \ + --enable-acl \ + --with-x=yes \ + --enable-gui=gtk3 \ + --enable-multibyte \ + --enable-cscope \ + --enable-netbeans \ + --enable-perlinterp=dynamic \ + --enable-pythoninterp=dynamic \ + --enable-python3interp=dynamic \ + --enable-rubyinterp=dynamic \ + --enable-luainterp=dynamic \ + --enable-tclinterp=dynamic + make + ) +} - cp -a vim-build gvim-build +check() { + cd vim-${pkgver} + TERM=xterm make -j1 test +} - cd "${srcdir}"/vim-build +package_vim-runtime() { + pkgdesc+=' (shared runtime)' + optdepends=('sh: support for some tools and macros' + 'python: demoserver example tool' + 'gawk: mve tools upport') + backup=('etc/vimrc') - ./configure --prefix=/usr --localstatedir=/var/lib/vim \ - --with-features=big --with-compiledby=ArchLinux \ - --enable-gpm --enable-acl --with-x=no \ - --disable-gui --enable-multibyte --enable-cscope \ - --disable-netbeans --enable-perlinterp --disable-pythoninterp \ - --disable-python3interp --disable-rubyinterp --disable-luainterp + cd vim-${pkgver} - make + make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install + # man and bin files belong to 'vim' + rm -r "${pkgdir}"/usr/share/man/ "${pkgdir}"/usr/bin/ - cd "${srcdir}"/gvim-build + # Don't forget logtalk.dict + install -Dm 644 runtime/ftplugin/logtalk.dict \ + "${pkgdir}"/usr/share/vim/vim${_versiondir}/ftplugin/logtalk.dict - ./configure --prefix=/usr --localstatedir=/var/lib/vim \ - --with-features=big --with-compiledby=ArchLinux \ - --enable-gpm --enable-acl --with-x=yes \ - --enable-gui=gtk2 --enable-multibyte --enable-cscope \ - --enable-netbeans --enable-perlinterp --enable-pythoninterp \ - --disable-python3interp --enable-rubyinterp --enable-luainterp + # fix FS#17216 + sed -i 's|messages,/var|messages,/var/log/messages.log,/var|' \ + "${pkgdir}"/usr/share/vim/vim${_versiondir}/filetype.vim - make -} + # patch filetype.vim for better handling of pacman related files + sed -i "s/rpmsave/pacsave/;s/rpmnew/pacnew/;s/,\*\.ebuild/\0,PKGBUILD*,*.install/" \ + "${pkgdir}"/usr/share/vim/vim${_versiondir}/filetype.vim + sed -i "/find the end/,+3{s/changelog_date_entry_search/changelog_date_end_entry_search/}" \ + "${pkgdir}"/usr/share/vim/vim${_versiondir}/ftplugin/changelog.vim -check() { - # disable tests because they seem to freeze + # rc files + install -Dm 644 "${srcdir}"/vimrc "${pkgdir}"/etc/vimrc + install -Dm 644 "${srcdir}"/archlinux.vim \ + "${pkgdir}"/usr/share/vim/vimfiles/archlinux.vim - cd "${srcdir}"/vim-build + # rgb.txt file + install -Dm 644 runtime/rgb.txt \ + "${pkgdir}"/usr/share/vim/vim${_versiondir}/rgb.txt - #make test + # no desktop files and icons + rm -r "${pkgdir}"/usr/share/{applications,icons} - cd "${srcdir}"/gvim-build + # license + install -dm 755 "${pkgdir}"/usr/share/licenses/vim-runtime + ln -s /usr/share/vim/vim${_versiondir}/doc/uganda.txt \ + "${pkgdir}"/usr/share/licenses/vim-runtime/license.txt - #make test + # pacman hook for documentation helptags + install -Dm 644 "${srcdir}"/vimdoc.hook "${pkgdir}"/usr/share/libalpm/hooks/vimdoc.hook } package_vim() { - pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor' - depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm') - conflicts=('gvim') - - cd "${srcdir}"/vim-build + depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'acl' 'glibc' 'libgcrypt' 'pcre' + 'zlib' 'libffi') + optdepends=('python2: Python 2 language support' + 'python: Python 3 language support' + 'ruby: Ruby language support' + 'lua: Lua language support' + 'perl: Perl language support' + 'tcl: Tcl language support') + conflicts=('gvim' 'vim-minimal' 'vim-python3') + provides=('xxd' 'vim-minimal' 'vim-python3') + replaces=('vim-python3' 'vim-minimal') + + cd vim-${pkgver} make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install # provided by (n)vi in core @@ -124,7 +164,7 @@ package_vim() { # delete some manpages find "${pkgdir}"/usr/share/man -type d -name 'man1' 2>/dev/null | \ while read _mandir; do - cd ${_mandir} + cd "${_mandir}" rm -f ex.1 view.1 # provided by (n)vi rm -f evim.1 # this does not make sense if we have no GUI done @@ -132,20 +172,29 @@ package_vim() { # Runtime provided by runtime package rm -r "${pkgdir}"/usr/share/vim + # remove gvim.desktop as not included + rm "${pkgdir}"/usr/share/applications/gvim.desktop + # license - install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/doc/uganda.txt \ + install -Dm 644 runtime/doc/uganda.txt \ "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt } package_gvim() { - pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor (with advanced features, such as a GUI)' - depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'ruby' 'libxt' - 'desktop-file-utils' 'gtk2' 'lua' 'python2') - provides=("vim=${pkgver}-${pkgrel}") - conflicts=('vim') - install=gvim.install - - cd "${srcdir}"/gvim-build + pkgdesc+=' (with advanced features, such as a GUI)' + depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'libxt' 'gtk3' 'glibc' 'libgcrypt' 'pcre' + 'zlib' 'libffi') + optdepends=('python2: Python 2 language support' + 'python: Python 3 language support' + 'ruby: Ruby language support' + 'lua: Lua language support' + 'perl: Perl language support' + 'tcl: Tcl language support') + provides=("vim=${pkgver}-${pkgrel}" "xxd") + conflicts=('vim-minimal' 'vim') + replaces=('gvim-python3') + + cd gvim-${pkgver} make -j1 VIMRCLOC=/etc DESTDIR="${pkgdir}" install # provided by (n)vi in core @@ -154,63 +203,16 @@ package_gvim() { # delete some manpages find "${pkgdir}"/usr/share/man -type d -name 'man1' 2>/dev/null | \ while read _mandir; do - cd ${_mandir} + cd "${_mandir}" rm -f ex.1 view.1 # provided by (n)vi done - # Move the runtime for later packaging - mv "${pkgdir}"/usr/share/vim "${srcdir}"/runtime-install - - # freedesktop links - install -Dm644 "${srcdir}"/gvim.desktop \ - "${pkgdir}"/usr/share/applications/gvim.desktop - install -Dm644 runtime/vim48x48.png "${pkgdir}"/usr/share/pixmaps/gvim.png + # need to remove since this is provided by vim-runtime + rm -r "${pkgdir}"/usr/share/vim # license - install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/doc/uganda.txt \ + install -Dm 644 runtime/doc/uganda.txt \ "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt } -package_vim-runtime() { - pkgdesc='Runtime for vim and gvim' - depends=('perl' 'gawk') - backup=('etc/vimrc') - - # Install the runtime split from gvim - install -dm755 "${pkgdir}"/usr/share - mv "${srcdir}"/runtime-install "${pkgdir}"/usr/share/vim - - # Don't forget logtalk.dict - install -Dm644 "${srcdir}"/gvim-build/runtime/ftplugin/logtalk.dict \ - "${pkgdir}"/usr/share/vim/${_versiondir}/ftplugin/logtalk.dict - - # fix FS#17216 - sed -i 's|messages,/var|messages,/var/log/messages.log,/var|' \ - "${pkgdir}"/usr/share/vim/${_versiondir}/filetype.vim - - # patch filetype.vim for better handling of pacman related files - sed -i "s/rpmsave/pacsave/;s/rpmnew/pacnew/;s/,\*\.ebuild/\0,PKGBUILD*,*.install/" \ - "${pkgdir}"/usr/share/vim/${_versiondir}/filetype.vim - sed -i "/find the end/,+3{s/changelog_date_entry_search/changelog_date_end_entry_search/}" \ - "${pkgdir}"/usr/share/vim/${_versiondir}/ftplugin/changelog.vim - - # make Aaron happy - install -Dm644 "${srcdir}"/pythoncomplete.vim \ - "${pkgdir}"/usr/share/vim/${_versiondir}/autoload/pythoncomplete.vim - - # rc files - install -Dm644 "${srcdir}"/vimrc "${pkgdir}"/etc/vimrc - install -Dm644 "${srcdir}"/archlinux.vim \ - "${pkgdir}"/usr/share/vim/vimfiles/archlinux.vim - - # rgb.txt file - install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/rgb.txt \ - "${pkgdir}"/usr/share/vim/${_versiondir}/rgb.txt - - # license - install -dm755 "${pkgdir}"/usr/share/licenses/vim-runtime - ln -s /usr/share/vim/${_versiondir}/doc/uganda.txt \ - "${pkgdir}"/usr/share/licenses/vim-runtime/license.txt -} - -# vim:set sw=2 sts=2 et: +# vim: ts=2 sw=2 et: diff --git a/abs/extra/vim/archlinux.vim b/abs/extra/vim/archlinux.vim index 148bb93..0c6a84c 100644 --- a/abs/extra/vim/archlinux.vim +++ b/abs/extra/vim/archlinux.vim @@ -1,7 +1,5 @@ " The ArchLinux global vimrc - setting only a few sane defaults " -" Maintainer: Tobias Kieslich [tobias funnychar archlinux dot org] -" " NEVER EDIT THIS FILE, IT'S OVERWRITTEN UPON UPGRADES, GLOBAL CONFIGURATION " SHALL BE DONE IN /etc/vimrc, USER SPECIFIC CONFIGURATION IN ~/.vimrc @@ -16,8 +14,19 @@ set ruler " show the cursor position all the time " Suffixes that get lower priority when doing tab completion for filenames. " These are files we are not likely to want to edit or read. -set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc +set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc,.png,.jpg +" Move the swap file location to protect against CVE-2017-1000382 +if exists('$XDG_CACHE_HOME') + let &g:directory=$XDG_CACHE_HOME +else + let &g:directory=$HOME . '/.cache' +endif +let &g:directory.='/vim/swap//' +" Create swap directory if it doesn't exist +if ! isdirectory(expand(&g:directory)) + silent! call mkdir(expand(&g:directory), 'p', 0700) +endif if has('gui_running') " Make shift-insert work like in Xterm diff --git a/abs/extra/vim/gvim.desktop b/abs/extra/vim/gvim.desktop deleted file mode 100644 index 675357d..0000000 --- a/abs/extra/vim/gvim.desktop +++ /dev/null @@ -1,63 +0,0 @@ -[Desktop Entry] -Name=Vi IMproved -Name[bg]=Vi Ðåäàêòîð -Name[ca]=Vi Millorat -Name[da]=Vi forbedret -Name[eo]=VIM -Name[et]=Täiustatud Vi (vim) -Name[fr]=Vi étendu (VIM) -Name[he]=רפושמ Vi -Name[hu]=Vi -Name[is]=Vi IMproved ritillinn -Name[it]=Vi iMproved -Name[no]=Vi IMproved (forbedret VI) -Name[pl]=Poprawiony VI (vim) -Name[ro]=VIM -Name[ru]=Улучшенный VI -Name[sk]=Vi IMpreved -Name[sl]=Izboljšani vi (vim) -Name[sv]=Förbättrad Vi -Name[zh_CN.GB2312]=改进的 Vi -Comment=Powerful text editor with scripting functions and macro recorder -Comment[bg]=Ðåäàêòîð ñ ìíîãî âúçìîæíîñòè -Comment[ca]=Editor vi potent -Comment[cs]=Mocný textový editor vi -Comment[da]=En kraftig vi tekstbehandler -Comment[de]=Ein leistungsfähiger vi-Editor -Comment[el]=Πανίσχυρος διορθωτής vi -Comment[eo]=VIM similas al redaktilo "vi", sed havas aldonajn ecojn -Comment[es]=Una versión mejorada del editor vi -Comment[et]=Võimas tekstiredaktor vi -Comment[fi]=Tehokas vi-tekstieditori -Comment[fr]=Éditeur vi puissant -Comment[gl]=Potente editor vi -Comment[he]=Vi המצועה בר ךרועה -Comment[hr]=Napredni vi uređivač -Comment[hu]=Vi szövegszerkesztő -Comment[is]=Öflug útgáfa vi ritilsins -Comment[it]=Un editor vi potenziato -Comment[ja]=強力なViエディタ -Comment[lt]=Galingas vi redaktorius -Comment[mk]=Моќен VI уредувач -Comment[nl]=Krachtige vi-editor -Comment[no]=En kraftig vi-redigerer -Comment[no_NY]=Kraftig vi-tekstredigeringsprogram -Comment[pl]=Edytor vi -Comment[pt]=Um poderoso editor de texto -Comment[ro]=Un editor de texte VI, puternic -Comment[ru]=Мощный текстовый редактор vi -Comment[sk]=Silný textový procesor vi -Comment[sl]=Zmogljivi urejevalnik vi -Comment[sr]=Moćni vi editor -Comment[sv]=En kraftfull texteditor -Comment[ta]=ºì¾¢Å¡öó¾ vi ¦¾¡ÌôÀ¡Ç÷ -Comment[tr]=Güçlü vi düzenleyicisi -Comment[uk]=Потужний редактор vi -Comment[zh_CN.GB2312]=功能强大的 vi 编辑器 -MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; -Exec=gvim -f %F -Icon=gvim -Type=Application -Terminal=false -X-XClassHintResName=VIM -Categories=Utility;TextEditor; diff --git a/abs/extra/vim/gvim.install b/abs/extra/vim/gvim.install deleted file mode 100644 index 2eaa605..0000000 --- a/abs/extra/vim/gvim.install +++ /dev/null @@ -1,11 +0,0 @@ -post_install() { - update-desktop-database -q -} - -post_upgrade() { - post_install $1 -} - -post_remove() { - post_install $1 -} diff --git a/abs/extra/vim/vimdoc.hook b/abs/extra/vim/vimdoc.hook new file mode 100644 index 0000000..b77d592 --- /dev/null +++ b/abs/extra/vim/vimdoc.hook @@ -0,0 +1,11 @@ +[Trigger] +Operation = Install +Operation = Upgrade +Operation= Remove +Type = File +Target = usr/share/vim/vimfiles/doc/ + +[Action] +Description = Updating Vim help tags... +Exec = /usr/bin/vim -es --cmd ":helptags /usr/share/vim/vimfiles/doc" --cmd ":q" +When = PostTransaction diff --git a/abs/extra/vim/vimrc b/abs/extra/vim/vimrc index 92d3ff9..ee36a52 100644 --- a/abs/extra/vim/vimrc +++ b/abs/extra/vim/vimrc @@ -11,6 +11,8 @@ runtime! archlinux.vim " If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim' -" Or better yet, read /usr/share/vim/vim72/vimrc_example.vim or the vim manual +" Or better yet, read /usr/share/vim/vim80/vimrc_example.vim or the vim manual " and configure vim to your own liking! +" do not load defaults if ~/.vimrc is missing +"let skip_defaults_vim=1 |