# Contributor: Sergei Lukin # Contributor: Łukasz Jendrysik # Contributor: Sören Tempel # Maintainer: Natanael Copa pkgname=vim pkgver=9.0.1676 pkgrel=0 pkgdesc="Improved vi-style text editor" url="https://www.vim.org/" arch="all" license="Vim" options="!check" # some tests are failing makedepends=" gtk+3.0-dev libx11-dev libxt-dev lua5.4-dev ncurses-dev python3-dev ruby-dev " subpackages=" $pkgname-doc ${pkgname}diff $pkgname-tutor $pkgname-common gvim xxd " source="$pkgname-$pkgver.tar.gz::https://github.com/vim/vim/archive/refs/tags/v$pkgver.tar.gz vimrc " # secfixes: # 9.0.1413-r0: # - CVE-2023-1264 # 9.0.1395-r0: # - CVE-2023-1127 # - CVE-2023-1170 # - CVE-2023-1175 # - CVE-2023-1355 # 9.0.1251-r0: # - CVE-2023-0433 # - CVE-2023-0512 # 9.0.1198-r0: # - CVE-2023-0288 # 9.0.1167-r0: # - CVE-2023-0049 # - CVE-2023-0051 # - CVE-2023-0054 # 9.0.0999-r0: # - CVE-2022-4141 # - CVE-2022-4292 # - CVE-2022-4293 # - CVE-2022-47024 # 9.0.0815-r0: # - CVE-2022-3705 # 9.0.0636-r0: # - CVE-2022-3352 # 9.0.0598-r0: # - CVE-2022-3234 # - CVE-2022-3235 # - CVE-2022-3256 # - CVE-2022-3278 # 9.0.0437-r0: # - CVE-2022-3134 # 9.0.0369-r0: # - CVE-2022-2980 # - CVE-2022-2982 # - CVE-2022-3016 # - CVE-2022-3037 # - CVE-2022-3099 # 9.0.0270-r0: # - CVE-2022-2923 # - CVE-2022-2946 # 9.0.0224-r0: # - CVE-2022-2816 # - CVE-2022-2817 # - CVE-2022-2819 # 9.0.0050-r0: # - CVE-2022-2264 # - CVE-2022-2284 # - CVE-2022-2285 # - CVE-2022-2286 # - CVE-2022-2287 # - CVE-2022-2288 # - CVE-2022-2289 # - CVE-2022-2304 # 8.2.5170-r0: # - CVE-2022-2124 # - CVE-2022-2125 # - CVE-2022-2126 # - CVE-2022-2129 # 8.2.5055-r0: # - CVE-2022-1851 # - CVE-2022-1886 # - CVE-2022-1898 # 8.2.5000-r0: # - CVE-2022-1796 # 8.2.4969-r0: # - CVE-2022-1619 # - CVE-2022-1620 # - CVE-2022-1621 # - CVE-2022-1629 # 8.2.4836-r0: # - CVE-2022-1381 # 8.2.4708-r0: # - CVE-2022-1154 # - CVE-2022-1160 # 8.2.4619-r0: # - CVE-2022-0943 # 8.2.4542-r0: # - CVE-2022-0572 # - CVE-2022-0629 # - CVE-2022-0685 # - CVE-2022-0696 # - CVE-2022-0714 # - CVE-2022-0729 # 8.2.4350-r0: # - CVE-2022-0359 # - CVE-2022-0361 # - CVE-2022-0368 # - CVE-2022-0392 # - CVE-2022-0393 # - CVE-2022-0407 # - CVE-2022-0408 # - CVE-2022-0413 # - CVE-2022-0417 # - CVE-2022-0443 # 8.2.4173-r0: # - CVE-2021-4069 # - CVE-2021-4136 # - CVE-2021-4166 # - CVE-2021-4173 # - CVE-2021-4187 # - CVE-2021-4192 # - CVE-2021-4193 # - CVE-2021-46059 # - CVE-2022-0128 # - CVE-2022-0156 # - CVE-2022-0158 # - CVE-2022-0213 # 8.2.3779-r0: # - CVE-2021-4019 # 8.2.3650-r0: # - CVE-2021-3927 # - CVE-2021-3928 # - CVE-2021-3968 # - CVE-2021-3973 # - CVE-2021-3974 # - CVE-2021-3984 # 8.2.3567-r0: # - CVE-2021-3903 # 8.2.3500-r0: # - CVE-2021-3875 # 8.2.3437-r0: # - CVE-2021-3770 # - CVE-2021-3778 # - CVE-2021-3796 # 8.1.1365-r0: # - CVE-2019-12735 # 8.0.1521-r0: # - CVE-2017-6350 # - CVE-2017-6349 # 8.0.0329-r0: # - CVE-2017-5953 # 8.0.0056-r0: # - CVE-2016-1248 prepare() { # Read vimrc from /etc/vim echo '#define SYS_VIMRC_FILE "/etc/vim/vimrc"' >> src/feature.h cp -r "$builddir" "$builddir"-gvim default_prepare } build() { export CFLAGS="$CFLAGS -flto=auto" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --enable-luainterp=dynamic \ --enable-python3interp=dynamic \ --enable-rubyinterp=dynamic \ --without-x \ --disable-nls \ --enable-acl \ --enable-multibyte \ --enable-gui=no \ --with-lua-prefix=/usr/lua5.4 \ --with-compiledby="Alpine Linux" make cd "$builddir"-gvim ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --enable-luainterp=dynamic \ --enable-python3interp=dynamic \ --enable-rubyinterp=dynamic \ --with-x \ --disable-nls \ --enable-acl \ --enable-multibyte \ --enable-gui=gtk3 \ --with-lua-prefix=/usr/lua5.4 \ --with-compiledby="Alpine Linux" make } check() { make test } package() { depends="vim-common=$pkgver-r$pkgrel xxd=$pkgver-r$pkgrel" provider_priority=10 replaces="gvim" make -j1 DESTDIR="$pkgdir" install install -Dm644 runtime/doc/uganda.txt \ "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm644 "$srcdir"/vimrc "$pkgdir"/etc/vim/vimrc # only relevant to gvim rm -r "$pkgdir"/usr/share/icons/ rm -r "$pkgdir"/usr/share/applications/ } common() { replaces="vim gvim" arch="noarch" amove etc/vim/vimrc amove usr/share/vim } gvim() { pkgdesc="advanced text editor, with GUI" depends="vim-common=$pkgver-r$pkgrel xxd=$pkgver-r$pkgrel" provides="vim=$pkgver-r$pkgrel" provider_priority=1 replaces="vim" make -C "$builddir"-gvim -j1 DESTDIR="$subpkgdir" install rm "$subpkgdir"/usr/bin/vimdiff rm "$subpkgdir"/usr/bin/vimtutor rm -r "$subpkgdir"/usr/share/man rm -r "$subpkgdir"/usr/share/vim rm "$subpkgdir"/usr/bin/xxd } vimdiff() { pkgdesc="view file diffs in vim" depends="diffutils vim=$pkgver-r$pkgrel" replaces="vim gvim" arch="noarch" options="!tracedeps" provides="cmd:vimdiff=$pkgver-r$pkgrel" amove usr/bin/vimdiff } tutor() { pkgdesc="vim tutor and tutor files" depends="vim=$pkgver-r$pkgrel" replaces="gvim vim" arch="noarch" amove usr/bin/vimtutor amove usr/share/vim/vim*/tutor } xxd() { pkgdesc="tool to make (or reverse) a hex dump" depends="" replaces="gvim vim" amove usr/bin/xxd } sha512sums=" 89e2e142d2dcbd162efd3f552ac745c2f2aaa905c08f8ffb88122feb53c9150a8906cfbfbba6203c186d7651276c8582ffc39c0b54f5bbf81e9a32546e7b1715 vim-9.0.1676.tar.gz 9ed58e38fe9d72f934eb507b27c18590c33c648eb7ca2639a9afdcaa1c2c4e0873a4e4252d2b6cc28127d1ded227a1e8ac338c93958526f98a3b66dbdf6afcc8 vimrc "