summaryrefslogtreecommitdiff
path: root/neovim/Pkgfile
blob: c1cca58859a4db966bec153d5e2a92374ce30a84 (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: cmake unzip
    5 # Optional: ninja tree-sitter
    6 
    7 name=neovim
    8 version=0.7.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 ninja && PKGMK_NEOVIM+=' -G Ninja'
   21   cmake -S neovim-$version/third-party -B neovim-$version/.deps $PKGMK_NEOVIM \
   22     -D CMAKE_BUILD_TYPE=Release \
   23     -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
   24     -D CMAKE_CXX_FLAGS_RELEASE="$CFLAGS" \
   25     -Wno-dev
   26   cmake --build neovim-$version/.deps
   27 
   28   cmake -S neovim-$version -B build $PKGMK_NEOVIM \
   29     -D CMAKE_INSTALL_PREFIX=/usr \
   30     -D CMAKE_INSTALL_LIBDIR=lib \
   31     -D CMAKE_BUILD_TYPE=Release \
   32     -D CMAKE_C_FLAGS_RELEASE="$CFLAGS -O3" \
   33     -D ENABLE_LTO=ON \
   34     -Wno-dev
   35   cmake --build build
   36   DESTDIR=$PKG cmake --install build
   37 
   38   install -Dm644 neovim-$version/runtime/nvim.desktop $PKG/usr/share/applications/nvim.desktop
   39   install -Dm644 neovim-$version/runtime/nvim.png $PKG/usr/share/pixmaps/nvim.png
   40   rm -r $PKG/usr/share/locale
   41 }

Generated by cgit