# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem              1.0
PortGroup               github 1.0
PortGroup               cmake 1.1

github.setup            neovim neovim 0.9.5 v
revision                0
categories              editors
maintainers             {raimue @raimue} \
                        {l2dy @l2dy} \
                        {judaew @judaew} \
                        openmaintainer
license                 Apache-2 Vim GPL-2+

conflicts               neovim-devel

description             Neovim is a aggressively refactored fork of Vim

long_description \
    Neovim is a project that seeks to aggressively refactor Vim. It already adds \
    a new plugin architecture, job control, and a remote API.

homepage                https://neovim.io

github.tarball_from     archive
checksums               rmd160  419fefb665764a319a93b27d4c8b838a90c79081 \
                        sha256  fe74369fc30a32ec7a086b1013acd0eacd674e7570eb1acc520a66180c9e9719 \
                        size    11590180

depends_build-append    port:pkgconfig

depends_lib             port:gettext \
                        port:libuv \
                        port:libvterm \
                        port:libtermkey \
                        port:unibilium \
                        port:msgpack \
                        path:lib/libluajit-5.1.2.dylib:luajit \
                        port:lua51-lpeg \
                        port:lua51-mpack \
                        port:luv-luajit \
                        port:libiconv \
                        port:tree-sitter

cmake.build_type        Release

configure.args-append   -DUSE_BUNDLED=OFF \
                        -DLUA_PRG=${prefix}/bin/luajit

subport neovim-devel {
    github.setup    neovim neovim e1ff2c51cad755d0ddc04a23df23e317d77023ed
    version         20240331-[string range ${github.version} 0 6]
    revision        0

    github.tarball_from tarball
    checksums       rmd160  5172c1bc57a3aa6dad38f1bcfa0eaafc4c947142 \
                    sha256  3010e12624fded4a36265200d0f5ae858e16a9d05504d7e065cd224336a5e8ff \
                    size    12718126

    conflicts       neovim

    livecheck.url   ${github.homepage}/commits/nightly.atom
}

notes {
    If you want to share your existing Vim configuration with Neovim, you can add these symlinks:
        ln -s ~/.vim ~/.config/nvim
        ln -s ~/.vimrc ~/.config/nvim/init.vim
    For possible incompatible changes and differences to Vim check ':help nvim-intro' in nvim.
}
