PKGBUILD 949 Bytes
Newer Older
AlmAck's avatar
AlmAck committed
1 2 3 4
pkgbase=cairomm
pkgname=(cairomm cairomm-docs)
pkgver=1.12.2
pkgrel=1
Jan Mette's avatar
Jan Mette committed
5
pkgdesc="C++ bindings to Cairo vector graphics library"
6
arch=('x86_64')
Jan Mette's avatar
Jan Mette committed
7 8
url="http://www.cairographics.org"
license=('LGPL' 'MPL')
abveritas's avatar
abveritas committed
9
depends=('cairo' 'libsigc++2.0')
AlmAck's avatar
AlmAck committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23
makedepends=(git mm-common)
_commit=e9ef515b7b8db5b4f024ddfefe5dfc03f2b8ccea  # tags/v1.12.2^0
source=("git+https://anongit.freedesktop.org/git/cairomm#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgbase
  git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
  cd $pkgbase
  NOCONFIGURE=1 ./autogen.sh
}
Jan Mette's avatar
Jan Mette committed
24 25

build() {
AlmAck's avatar
AlmAck committed
26 27 28
  cd $pkgbase
  ./configure --prefix=/usr --enable-maintainer-mode
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
abveritas's avatar
abveritas committed
29 30 31
  make
}

AlmAck's avatar
AlmAck committed
32 33 34 35 36 37 38 39 40 41 42 43
package_cairomm() {
  cd $pkgbase
  sed -i -e 's/^doc_subdirs/#doc_subdirs/' Makefile
  make DESTDIR="$pkgdir" install
}

package_cairomm-docs() {
  pkgdesc+=" (documentation)"
  depends=()

  cd $pkgbase
  make -C docs DESTDIR="$pkgdir" install
Jan Mette's avatar
Jan Mette committed
44
}