Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/build-support/muon-meson/PKGBUILD
blob: 0be5f4f819a8f3d1b8c64269bfe8e43b3a745a5f (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
# Maintainer: Eric Engestrom <aur [at] engestrom [dot] ch>

pkgname=muon-meson
pkgver=0.5.0
pkgrel=1
pkgdesc="meson implementation in C"
arch=(x86_64 pentium4 i686 i486)
url="https://muon.build"
license=(GPL3)
source=(
  "$url/releases/v$pkgver/muon-v$pkgver.tar.gz"
  "arch-muon")
sha256sums=('d657422d4a102b4c7b77317a67a3f816d02f1c2967432b027c7e9f076ffe7079'
            '4e507d5b129cd7de05aca972504ab06c2353b145e7378d15aa75b7d4b1b252e8')
#depends=(pkgconf curl libarchive)
depends=(pkgconf)
#makedepends=(ninja python-yaml scdoc)
makedepends=(ninja)
checkdepends=(git)
provides=(muon)

build() {
  cd "muon-v$pkgver"
  rm -rf build*

  msg2 "Building stage 1 (bootstrap)"
  ./bootstrap.sh build-stage1

  msg2 "Building stage 2 (muon from bootstrap)"
  build-stage1/muon-bootstrap setup \
    -D libarchive=disabled \
    -D libcurl=disabled \
    -D libpkgconf=enabled \
    -D man-pages=disabled \
    -D meson-docs=disabled \
    -D meson-tests=disabled \
    -D readline=builtin \
    -D samurai=enabled \
    -D static=false \
    -D tracy=disabled \
    -D ui=disabled \
    -D website=disabled \
    build-stage2
  ninja -C build-stage2

  msg2 "Building stage 3 (muon from muon)"
  build-stage2/muon setup \
    -D libarchive=disabled \
    -D libcurl=disabled \
    -D libpkgconf=enabled \
    -D man-pages=disabled \
    -D meson-docs=disabled \
    -D readline=builtin \
    -D samurai=enabled \
    -D static=false \
    -D tracy=disabled \
    -D ui=disabled \
    -D website=disabled \
    -D prefix=/usr \
    -D b_lto=true \
    -D b_pie=true \
    build
  ninja -C build
}

check() {
  # Explicitly chose which test suites to run, to avoid running meson-tests
  # and taking a long time to run, but still having a reasonable coverage
  # to ensure that the built package works.
  cd "muon-v$pkgver/build"
  ./muon test -R -v -s fmt -s lang -s muon -s unit -s analyze
}

package() {
  cd "muon-v$pkgver/build"
  DESTDIR="$pkgdir" ./muon install

  install -Dm775 "$srcdir/arch-muon" "$pkgdir/usr/bin/arch-muon"
}