# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: GordonGR <ntheo1979@gmail.com>
# Contributor: speps <speps.aur@archlinux.org>

pkgname=lib32-libcroco
pkgver=0.6.12+4+g9ad7287
pkgrel=2
pkgdesc='GNOME CSS2 parsing and manipulation toolkit (32-bit)'
url="https://git.gnome.org/browse/libcroco"
arch=('x86_64')
depends=('lib32-glib2' 'lib32-libxml2' 'libcroco')
makedepends=('gcc-multilib' 'git' 'gtk-doc')
license=('LGPL')
_commit=9ad72875e9f08e4c519ef63d44cdbd94aa9504f7 # master
source=("git+https://git.gnome.org/browse/libcroco#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd libcroco
  NOCONFIGURE=1 ./autogen.sh
}

check() {
  cd libcroco
  make check
}
 
build() {
  cd libcroco

  export CC='gcc -m32'
  export CXX='g++ -m32'
  export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'

  ./configure \
    --prefix='/usr' \
    --libdir='/usr/lib32' \
    --disable-static \
    --disable-gtk-doc
  make
}

package() {
  cd libcroco

  make DESTDIR="${pkgdir}" install
  rm -rf "${pkgdir}"/usr/{bin,include,share}
}

# vim: ts=2 sw=2 et:
