blob: 72479eeb2d3fa205027c45041703d260a327dc82 (
plain)
1 # Description: Vim-fork focused on extensibility and usability
2 # URL: https://neovim.io/
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: git unzip
5 # Optional: libluv libtermkey libuv libvterm lua51-lpeg lua51-mpack luajit luarocks msgpack-c tree-sitter tree-sitter-c tree-sitter-lua tree-sitter-vimdoc tree-sitter-viml unibilium
6
7 name=neovim
8 version=0.8.2
9 release=1
10 source=(https://github.com/neovim/neovim/archive/v$version/$name-$version.tar.gz)
11
12 build() {
13 ## use lld for thinlto if possible
14 prt-get isinst clang lld && \
15 export CC='clang' && \
16 export CXX='clang++' && \
17 export AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib && \
18 export LDFLAGS+=' -fuse-ld=lld -flto=thin'
19
20 prt-get isinst libtermkey && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_LIBTERMKEY=OFF'
21 prt-get isinst libuv && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_LIBUV=OFF'
22 prt-get isinst libvterm && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_LIBVTERM=OFF'
23 prt-get isinst luajit lua51-lpeg lua51-mpack && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_LUAJIT=OFF'
24 prt-get isinst luarocks lua51-lpeg lua51-mpack && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_LUAROCKS=OFF'
25 prt-get isinst libluv && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_LUV=OFF'
26 prt-get isinst msgpack-c && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_MSGPACK=OFF'
27 prt-get isinst tree-sitter && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_TS=OFF'
28 prt-get isinst tree-sitter-c tree-sitter-lua tree-sitter-vimdoc tree-sitter-viml && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_TS_PARSERS=OFF'
29 prt-get isinst unibilium && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_UNIBILIUM=OFF'
30
31 cmake -S neovim-$version/cmake.deps -B neovim-$version/.deps -G Ninja $PKGMK_NEOVIM_DEPS \
32 -D CMAKE_BUILD_TYPE=Release \
33 -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
34 -D CMAKE_CXX_FLAGS_RELEASE="$CFLAGS" \
35 -Wno-dev
36 cmake --build neovim-$version/.deps
37
38 cmake -S neovim-$version -B build -G Ninja $PKGMK_NEOVIM \
39 -D CMAKE_INSTALL_PREFIX=/usr \
40 -D CMAKE_INSTALL_LIBDIR=lib \
41 -D CMAKE_BUILD_TYPE=Release \
42 -D CMAKE_C_FLAGS_RELEASE="$CFLAGS -O3" \
43 -D ENABLE_LTO=ON \
44 -Wno-dev
45 cmake --build build
46 DESTDIR=$PKG cmake --install build
47
48 install -Dm644 neovim-$version/runtime/nvim.desktop $PKG/usr/share/applications/nvim.desktop
49 install -Dm644 neovim-$version/runtime/nvim.png $PKG/usr/share/pixmaps/nvim.png
50
51 rm -r $PKG/usr/share/locale
52 }
|