Package Details: mingw-w64-cairo 1.15.12-1

Git Clone URL: (read-only)
Package Base: mingw-w64-cairo
Description: Cairo vector graphics library (mingw-w64)
Upstream URL:
Keywords: cairo mingw mingw-w64
Licenses: MPL, LGPL
Conflicts: mingw-w64-cairo-bootstrap
Provides: mingw-w64-cairo-bootstrap
Replaces: mingw-w64-cairo-bootstrap
Submitter: Schala
Maintainer: pingplug
Last Packager: pingplug
Votes: 14
Popularity: 0.000357
First Submitted: 2012-09-05 18:20
Last Updated: 2018-04-21 11:08

Latest Comments

pingplug commented on 2018-03-14 11:00

remove 0002 0030 patch, and add 0027 patch can build the latest version see

Schala commented on 2015-12-16 22:35

mingw-w64-cairo-bootstrap is available

Schala commented on 2015-10-16 01:12

Yeah, feel free to make one.

lantw44 commented on 2015-10-15 15:19

mingw-w64-librsvg and mingw-w64-poppler are optional makedepends. You can remove them to get mingw-w64-cairo build without prebuilts.

I think we should have a bootstrap PKGBUILD for newly installed systems.

yan12125 commented on 2015-10-15 15:04

@Schala Are ant32's binaries the only solution on a newly installed system?

Schala commented on 2015-10-11 15:31

I know. I'm doing my best to match up to native cairo. Luckily ant32 has prebuilts if you need to bootstrap:

lantw44 commented on 2015-10-11 07:00

Circular dependency:

mingw-w64-cairo -> mingw-w64-librsvg -> mingw-w64-pango -> mingw-w64-cairo
mingw-w64-cairo -> mingw-w64-poppler -> mingw-w64-cairo

Schala commented on 2015-10-10 16:55


lantw44 commented on 2015-10-09 20:48

mingw-w64-cairo 1.14.2 is too old for mingw-w64-gtk3 3.18.1:

checking for CAIRO_BACKEND... yes
checking for CAIRO... yes
checking for cairo_win32_surface_create_with_format in -lcairo... no
configure: error: cairo_win32_surface_create_with_format is not found in cairo library
You need cairo version newer than 2015-04-14

Can you backport patches required by gtk3 or add a git snapshot package?

xantares commented on 2014-06-10 15:27


the build issue mentionned earlier was when it tried to build sphinx:

/tmp/yaourt-tmp-root/aur-mingw-w64-cairo/src/cairo-1.12.16/util/cairo-sphinx/sphinx.c:8:22: fatal error: sys/mman.h: No such file or directory

fedora had this patch:

can you include it ?

chenxiaolong commented on 2014-06-05 17:38

Fixed the gcc-4.9 build issue :)

Schala commented on 2013-10-20 04:44

It doesn't define it for me.

xantares commented on 2013-10-16 07:44

Hi, seems it does not build:

/tmp/yaourt-tmp-root/aur-mingw-w64-cairo/src/cairo-1.12.16/util/cairo-sphinx/sphinx.c:8:22: fatal error: sys/mman.h: No such file or directory
#include <sys/mman.h>
compilation terminated.

There is no guard from including sys/mman.h:
/tmp/yaourt-tmp-root/aur-mingw-w64-cairo/src/cairo-1.12.16/ HAVE_SYS_MMAN_H


Schala commented on 2012-10-13 05:53

Thanks for the help. I do want packages that actually work, so I'll be looking into it.

entidi commented on 2012-10-12 13:48

The fact is without setting any pkg-config environment variable the package will link against the system libraries (and this would also explain why xcb was working), resulting (if successfull) in unusable libraries. I didn't think it was ever possible to link libraries from different platforms so it took me a while to discover this issue.

All your mingw-w64 PKGBUILDs suffer from this problem, so I really don't understand how the whole mingw-w64 GTK+2 toolchain can work. Anyway or I am missing something really huge or there is a problem. In the latter case, I suggest to add the PKG_CONFIG_... settings to all your packages that rely on pkg-config or add mingw-w64-pkg-config ( to makedepends (it does the same thing with wrapper scripts).

I'm building my own toolchain based on Fedora so don't consider yourself pushed to make a decision.

Schala commented on 2012-10-12 01:44

Builds fine for me but I added the extra parameters specified in your version and fixed the PKG_CONFIG_* variable.

Schala commented on 2012-10-11 21:31

It builds fine for me, but I'll consider tweaking it a bit.

Schala commented on 2012-10-11 21:29

It builds fine for me. Would you like a prebuilt?

entidi commented on 2012-10-11 20:51

This package wont build. It has some serious issue:

2. xcb must be disabled because there is no X server on windows;
3. cairo 1.12 is buggy on win64 platforms (see and

I downgraded the package to 1.10.2 and followed the Fedora directives at Here is a working PKGBUILD:

pkgdesc="Cairo vector graphics library (mingw-w64)"
license=("LGPL" "MPL")
depends=(mingw-w64-crt mingw-w64-glib2 mingw-w64-libpng mingw-w64-fontconfig mingw-w64-pixman)
options=(!libtool !strip !buildflags)

_architectures="i686-w64-mingw32 x86_64-w64-mingw32"

build() {
local tardir="$srcdir/${pkgname#mingw-w64-}-$pkgver"

# Apply patches from fedora repository
cd "$tardir"
patch -p0 < '../mingw32-cairo-fix-ffs-declaration.patch?h=f18'
patch -p1 < '../mingw32-cairo-A1_surfaces.patch?h=f18'
patch -p1 < '../mingw32-cairo-reset_clip.patch?h=f18'

# The libtool bundled with this package is too old for win64 support

for _arch in ${_architectures}; do
mkdir -p "${srcdir}/${pkgname}-${pkgver}-build-${_arch}"
cd "${srcdir}/${pkgname}-${pkgver}-build-${_arch}"
export PKG_CONFIG_LIBDIR="/usr/${_arch}/lib/pkgconfig"
export CFLAGS="-O2 -pipe -mms-bitfields"
"$tardir/configure" \
--prefix=/usr/${_arch} \
--build=$CHOST \
--host=${_arch} \
--disable-pthread \
--disable-xlib \
--disable-xcb \
--enable-win32 \
--enable-fc \
--enable-ft \
--enable-png \
--enable-static \
--enable-gobject \

package() {
for _arch in ${_architectures}; do
cd "${srcdir}/${pkgname}-${pkgver}-build-${_arch}"
make DESTDIR="$pkgdir" install
find "$pkgdir/usr/${_arch}" -name '*.exe' -o -name '*.bat' -o -name '*.def' -o -name '*.exp' | xargs -rtl1 rm
find "$pkgdir/usr/${_arch}" -name '*.dll' | xargs -rtl1 ${_arch}-strip -g -x
find "$pkgdir/usr/${_arch}" -name '*.a' | xargs -rtl1 ${_arch}-strip -g
rm -r "$pkgdir/usr/${_arch}/share"