# Description: GTK version of the vim editor
# URL: https://www.vim.org/
# Maintainer: Juergen Daubert, jue at crux dot nu
# Depends on: gtk3 vim xorg-libxt

name=gvim
version=9.2.0670
release=1
source=(https://github.com/vim/vim/archive/v${version}/vim-$version.tar.gz)

build() {
    cd vim-$version/src

    sed -i '/^CFLAGS/d' Makefile

    ./configure \
        --prefix=/usr \
        --with-vim-name=gvim \
        --with-x=yes \
        --enable-gui=gtk3 \
        --enable-multibyte \
        --enable-cscope \
        --disable-gpm \
        --disable-nls

    make VIMRTDIR=
    make VIMRTDIR= DESTDIR=$PKG installvimbin install-icons

    rm -r $PKG/usr/share/icons $PKG/usr/share/applications/vim.desktop
    sed -ri '/\[.+\]=/d' $PKG/usr/share/applications/*.desktop
}
