summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d43bf331bba97f85924f0e07788cd189d80e9107 (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
# Maintainer: a821
# Contributor:  Vincent Grande <shoober420@gmail.com>
# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Brice Carpentier <brice@daknet.org>

pkgbase=cairo-git
pkgname=(cairo-git cairo-docs-git)
pkgver=1.18.0.r29.g057a949bb
pkgrel=1
pkgdesc="2D graphics library with support for multiple output devices"
url="https://cairographics.org/"
arch=(x86_64)
license=('LGPL-2.1-only OR MPL-1.1')
depends=(
  fontconfig
  freetype2
  glib2
  libpng
  libx11
  libxcb
  libxext
  libxrender
  lzo
  pixman
  zlib
)
makedepends=(
  git
  gtk-doc
  meson
  valgrind
)
source=("git+https://gitlab.freedesktop.org/cairo/cairo.git")
sha256sums=('SKIP')

pkgver() {
  cd cairo
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/./g'
}

build() {
  local meson_options=(
    -D dwrite=disabled
    -D gtk_doc=true
    -D spectre=disabled
    -D symbol-lookup=disabled
    -D tests=disabled
  )

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

package_cairo-git() {
  provides=(
    libcairo-gobject.so
    libcairo-script-interpreter.so
    libcairo.so
  )
  provides+=("${pkgname%-git}")
  conflicts=("${pkgname%-git}")

  meson install -C build --destdir "$pkgdir"

  mkdir -p doc/usr/share
  mv {"$pkgdir",doc}/usr/share/gtk-doc
}

package_cairo-docs-git() {
  pkgdesc+=" (documentation)"
  depends=()
  provides=("${pkgname%-git}")
  conflicts=("${pkgname%-git}")

  mv doc/* "$pkgdir"
}