summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2a174099583dcd9c5b1175acdc94f7a836d7bc58 (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
pkgname=cairo-ubuntu
_realpkg=cairo
pkgver=1.16.0
pkgrel=2
pkgdesc="2D graphics library with support for multiple output devices (with ubuntu patches)"
url="https://cairographics.org/"
arch=(x86_64)
provides=("${_realpkg}=${pkgver}")
license=(LGPL MPL)
conflicts=("cairo")
depends=(libpng libxrender libxext fontconfig pixman glib2 lzo)
makedepends=(librsvg gtk2 poppler-glib libspectre gtk-doc valgrind git)
_commit=3ad43122b21a3299dd729dc8462d6b8f7f01142d
source=("cairo::git+https://anongit.freedesktop.org/git/cairo#commit=$_commit"
        cairo-make-lcdfilter-default.patch
        cairo-respect-fontconfig_pb.patch
        cairo-server-side-gradients.patch
        cairo-webkit-html5-fix.patch)

pkgver() {
  cd $_realpkg
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $_realpkg

  patch -Np1 -i ../cairo-respect-fontconfig_pb.patch
  patch -Np1 -i ../cairo-server-side-gradients.patch
  patch -Np1 -i ../cairo-webkit-html5-fix.patch
  patch -Np1 -i ../cairo-make-lcdfilter-default.patch
  
  # Update gtk-doc
  cp /usr/share/aclocal/gtk-doc.m4 build/aclocal.gtk-doc.m4
  cp /usr/share/gtk-doc/data/gtk-doc.make build/Makefile.am.gtk-doc

  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $_realpkg
  ./configure --prefix=/usr \
        --sysconfdir=/etc \
        --localstatedir=/var \
        --disable-static \
        --disable-gl \
        --enable-tee \
        --enable-svg \
        --enable-ps \
        --enable-pdf \
        --enable-gobject \
        --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  cd $_realpkg
  # https://people.gnome.org/~federico/blog/helping-cairo.html
  #make check
}

package() {
  cd $_realpkg
  make DESTDIR="$pkgdir" install
}

md5sums=('SKIP'
         '1ec7560b9f05b5b0a6aca41cfdb8ea93'
         '080eac1ce1b2fa2beb550555d31d29b8'
         '4ffec1c86085da11bf9f56d6bf88fbdf'
         '6080d20e289f5e75cc013e8f40710aa3')