# -*- 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               cargo 1.0

name                    elp
github.setup            WhatsApp erlang-language-platform 2026-08-10
github.tarball_from     archive
revision                0
categories              erlang devel
maintainers             {pguyot @pguyot} openmaintainer
license                 Apache-2

description             Erlang Language Platform
long_description        Designed at WhatsApp and inspired by the success of \
                        the Rust Analyzer project, ELP provides a scalable, \
                        fully incremental, IDE-first library for the semantic \
                        analysis of Erlang code.

checksums               rmd160  3691df5545adf6078f3feb1b3e9a175a6aa57c0b \
                        sha256  f6de7b05d3522bea8b0697eef48a0902c2003a0fb01732772a533ec63feb7df0 \
                        size    4027505

depends_build-append    port:erlang \
                        port:eqwalizer \
                        port:rebar3

build.env-append        ELP_EQWALIZER_PATH=${prefix}/share/eqwalizer/eqwalizer.jar
build.env-append        EQWALIZER_DIR=${prefix}/share/eqwalizer/eqwalizer_support
build.pre_args          --release

destroot {
    set bindir ${destroot}${prefix}/bin
    xinstall -m 0755 -d ${bindir}
    xinstall -m 0755  {*}[glob -type x ${worksrcpath}/target/*/release/${name}] ${bindir}/${name}
}
