2021-07-02 17:06:52 +00:00
|
|
|
# Description: Vim-fork focused on extensibility and usability
|
|
|
|
# URL: https://neovim.io/
|
|
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
2022-11-27 18:01:53 +00:00
|
|
|
# Depends on: git unzip
|
|
|
|
# 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
|
2021-07-02 17:06:52 +00:00
|
|
|
|
|
|
|
name=neovim
|
2023-12-30 16:06:58 +01:00
|
|
|
version=0.9.5
|
2021-07-02 17:06:52 +00:00
|
|
|
release=1
|
|
|
|
source=(https://github.com/neovim/neovim/archive/v$version/$name-$version.tar.gz)
|
|
|
|
|
|
|
|
build() {
|
2023-05-29 15:14:13 +02:00
|
|
|
prt-get isinst ccache && export PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
|
2022-04-15 17:46:28 +02:00
|
|
|
## use lld for thinlto if possible
|
|
|
|
prt-get isinst clang lld && \
|
|
|
|
export CC='clang' && \
|
|
|
|
export CXX='clang++' && \
|
|
|
|
export AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib && \
|
|
|
|
export LDFLAGS+=' -fuse-ld=lld -flto=thin'
|
|
|
|
|
2023-09-07 17:07:35 +02:00
|
|
|
# optionals: disabled for now {{{
|
2023-05-29 15:14:13 +02:00
|
|
|
#prt-get isinst libtermkey && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_LIBTERMKEY=OFF'
|
|
|
|
#prt-get isinst libuv && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_LIBUV=OFF'
|
|
|
|
#prt-get isinst libvterm && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_LIBVTERM=OFF'
|
|
|
|
#prt-get isinst luajit lua51-lpeg lua51-mpack && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_LUAJIT=OFF'
|
|
|
|
#prt-get isinst luarocks lua51-lpeg lua51-mpack && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_LUAROCKS=OFF'
|
|
|
|
#prt-get isinst libluv && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_LUV=OFF'
|
|
|
|
#prt-get isinst msgpack-c && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_MSGPACK=OFF'
|
|
|
|
#prt-get isinst tree-sitter && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_TS=OFF'
|
|
|
|
#prt-get isinst tree-sitter-c tree-sitter-lua tree-sitter-vimdoc tree-sitter-viml && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_TS_PARSERS=OFF'
|
|
|
|
#prt-get isinst unibilium && PKGMK_NEOVIM_DEPS+=' -D USE_BUNDLED_UNIBILIUM=OFF'
|
2023-09-07 17:07:35 +02:00
|
|
|
# }}}
|
2022-11-27 18:01:53 +00:00
|
|
|
|
|
|
|
cmake -S neovim-$version/cmake.deps -B neovim-$version/.deps -G Ninja $PKGMK_NEOVIM_DEPS \
|
2021-07-02 17:06:52 +00:00
|
|
|
-D CMAKE_BUILD_TYPE=Release \
|
2022-04-15 17:46:28 +02:00
|
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
|
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CFLAGS" \
|
2021-07-02 17:06:52 +00:00
|
|
|
-Wno-dev
|
|
|
|
cmake --build neovim-$version/.deps
|
|
|
|
|
2022-11-27 18:01:53 +00:00
|
|
|
cmake -S neovim-$version -B build -G Ninja $PKGMK_NEOVIM \
|
2021-07-02 17:06:52 +00:00
|
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-D CMAKE_INSTALL_LIBDIR=lib \
|
|
|
|
-D CMAKE_BUILD_TYPE=Release \
|
2023-09-07 17:07:35 +02:00
|
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
2021-07-02 17:06:52 +00:00
|
|
|
-D ENABLE_LTO=ON \
|
2023-09-07 17:07:35 +02:00
|
|
|
-D CI_BUILD=OFF \
|
2021-07-02 17:06:52 +00:00
|
|
|
-Wno-dev
|
|
|
|
cmake --build build
|
|
|
|
DESTDIR=$PKG cmake --install build
|
|
|
|
|
|
|
|
install -Dm644 neovim-$version/runtime/nvim.desktop $PKG/usr/share/applications/nvim.desktop
|
|
|
|
install -Dm644 neovim-$version/runtime/nvim.png $PKG/usr/share/pixmaps/nvim.png
|
2022-11-27 18:01:53 +00:00
|
|
|
|
2021-07-02 17:06:52 +00:00
|
|
|
rm -r $PKG/usr/share/locale
|
|
|
|
}
|