updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / mingw32-cairo / PKGBUILD
blobbdc4aa502b588d5d38fceaf661fbeb8056e5b8c3
1 # Maintainer: Rémy Oudompheng <oudomphe@phare.normalesup.org>
3 pkgname=mingw32-cairo
4 pkgver=1.10.2
5 pkgrel=1
6 arch=(any)
7 pkgdesc="cairo (mingw32)"
8 depends=(mingw32-libpng mingw32-pixman mingw32-fontconfig mingw32-freetype)
9 makedepends=(mingw32-gcc)
10 options=(!strip)
11 license=('LGPL' 'MPL')
12 url="http://cairographics.org/"
13 source=(http://cairographics.org/releases/cairo-${pkgver}.tar.gz)
14 sha1sums=('ccce5ae03f99c505db97c286a0c9a90a926d3c6e')
16 build()
18   cd "$srcdir/cairo-$pkgver"
20   export CFLAGS="$CFLAGS -mms-bitfields"
21   export PKG_CONFIG_LIBDIR="/usr/i486-mingw32/lib/pkgconfig/"
22   unset LDFLAGS PKG_CONFIG_PATH
24   # ffs() is undefined
25   sed -i '231i \
26 #ifdef __MINGW32__\
27 #define ffs __builtin_ffs\
28 #endif\
29 ' src/cairo-compiler-private.h
31   ./configure \
32     --prefix=/usr/i486-mingw32 \
33     --host=i486-mingw32 \
34     --build=$CHOST \
35     --enable-xlib=no \
36     --enable-xlib-xrender=no \
37     --enable-win32=yes \
38     --enable-win32-font=yes \
39     --enable-png=yes \
40     --enable-static
42   sed -i "s/deplibs_check_method=.*/deplibs_check_method=pass_all/g" libtool
44   make
47 package () {
48   cd "$srcdir/cairo-$pkgver"
49   make install DESTDIR="$pkgdir"
51   cd "$pkgdir"
52   find . -name '*.a' -o -name '*.dll' -o -name '*.exe' \
53     | xargs -rtl1 i486-mingw32-strip -g
54   rm -rf usr/i486-mingw32/share