summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0f6c5ed63e20ef7d3eeca1b21436084a98d571fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Maintainer: Lennard Hofmann <lennard dot hofmann at web dot de>
# Contributor: Daniel M. Capella <polyzen@archlinux.org>

pkgname=mesonlsp
pkgver=5.0.3
pkgrel=2
pkgdesc='Meson language server'
arch=(x86_64)
url=https://github.com/JCWasmx86/mesonlsp
license=(GPL-3.0-or-later)
depends=(
  curl
  gcc-libs
  glibc
  libarchive
  pkgconf
  tomlplusplus
  tree-sitter
  util-linux-libs

  # https://github.com/JCWasmx86/mesonlsp/issues/136
  git
  mercurial
  subversion
)
makedepends=(
  gtest
  meson
  ninja
  nlohmann-json
  python-lsprotocol
  python-pygls
)
source=(
  "git+$url.git#tag=v$pkgver"
  git+https://github.com/ada-url/ada#tag=v2.7.4
  sha256::git+https://github.com/amosnier/sha-2#commit=49265c656f9b370da660531db8cc6bf0a2e110a6
  git+https://github.com/JCWasmx86/muon#commit=c0feb4deed2d4142f1af8f1a84c99b18721e560d
  git+https://github.com/JCWasmx86/tree-sitter-ini#commit=848b6269f7039739aebd169fbd3d5e6e34bef661
  git+https://github.com/JCWasmx86/tree-sitter-meson#commit=09665faff74548820c10d77dd8738cd76d488572
  "fix-for-pkgconf3.patch"
)
b2sums=('795a41bbd26d720282d815b6c41e5b2aa3e7724c288d87fe10dafc7f75dc6a4e1ba25acbf6f58fd9b87433d6cdfb79f4c66a7a825ff591bd4a9b595426052649'
        'a1bb73cac9898267aec9b019857581f2895351f3014727a297654a3c55a32d69e480e93c53a0089f342268049e0f23e9ba6c0ae1cefa703795e2655eacc74f8a'
        'e4e59dcd348ea3ec9fc6ce7f62f944b8f5b40370c5738e6453e45aa201eadb9eb0b58d9d08e7068b8b1a4a6c90e94d58fb7df81337124c8e96e6e418fce488ae'
        '85697c5ea0f44497b2929bda616955914d397744790f5adba3039b145f661339826c4c53b56e2e3cd77b197e5402bc358b39f892c13e77953cf8d42577a175ba'
        '83f0e5b4c34b6e5ac95aa8b610ea3a992edcab711a0174e77a64fee7c27f7b3a51450ce9b376cbac0c93b1aa7271017788b54805158552028bfe204fbd6d1558'
        '517c4fbd80ab65375e5ebe13b57e65dc64460dda6a7d68a9998617bce94064e7fdd81c5428c55e31e785ae9b9d548dbff0818daad94fa1ffb256fe9a86804c6d'
        '16b4d45164dc84351b2a1fdc4fe1a9823261db36c59c8570cb73df86201570f80ddffad14246359bba74ad0e6f242b414c574cf49f841d8035b16b5175352ede')

prepare() {
  cd mesonlsp
  patch -Np1 -i ../fix-for-pkgconf3.patch
}

build() {
  local meson_options=(
    -D benchmarks=false
    -D use_own_tree_sitter=false
    -D muon:tracy=disabled
    -D muon:meson-docs=disabled
    -D muon:meson-tests=disabled
    -D muon:man-pages=disabled
    -D muon:website=disabled
    -D muon:native_backtrace=disabled
  )

  # Inject subprojects
  export MESON_PACKAGE_CACHE_DIR="$srcdir"

  arch-meson $pkgname build "${meson_options[@]}"
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}