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
|
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
class Recipe(recipe.Recipe):
name = 'cairo'
version = '1.14.2'
stype = SourceType.TARBALL
url = 'http://cairographics.org/releases/cairo-1.14.2.tar.xz'
# either LGPLv2.1 or MPLv1.1
licenses = [License.LGPLv2_1]
autoreconf = True
autoreconf_sh = 'NOCONFIGURE=1 ./autogen.sh'
deps = ['glib', 'libpng', 'zlib', 'pixman', 'fontconfig', 'freetype']
patches = ['cairo/0001-Fix-compilation-with-Android-s-bionic-libc.patch',
'cairo/0001-Disable-building-of-the-tests.patch',
'cairo/0001-Fix-broken-canvas-text-font-size-in-Inkscape.patch',
]
files_libs = ['libcairo', 'libcairo-gobject', 'libcairo-script-interpreter']
files_devel = [
'lib/pkgconfig/cairo-fc.pc',
'lib/pkgconfig/cairo.pc',
'lib/pkgconfig/cairo-ps.pc',
'lib/pkgconfig/cairo-ft.pc',
'lib/pkgconfig/cairo-pdf.pc',
'lib/pkgconfig/cairo-svg.pc',
'lib/pkgconfig/cairo-gobject.pc',
'lib/pkgconfig/cairo-png.pc',
'include/cairo',
]
platform_files_devel = {
Platform.WINDOWS: [ 'lib/pkgconfig/cairo-win32-font.pc',
'lib/pkgconfig/cairo-win32.pc'],
Platform.DARWIN: ['lib/pkgconfig/cairo-quartz-font.pc',
'lib/pkgconfig/cairo-quartz-image.pc',
'lib/pkgconfig/cairo-quartz.pc']
}
# Skipping because it requires a display and documented as randomly failing
make_check = None
def prepare(self):
# extra flags needed for gcc 4.9
if self.config.target_distro == Distro.ARCH:
self.append_env['CFLAGS'] = " -fno-lto "
self.append_env['CXXFLAGS'] = " -fno-lto "
self.append_env['CPPFLAGS'] = " -fno-lto "
if self.config.variants.x11:
self.files_devel += ['lib/pkgconfig/cairo-xlib-xrender.pc',
'lib/pkgconfig/cairo-xlib.pc']
else:
self.configure_options += '--without-x '
if self.config.target_platform == Platform.DARWIN:
self.configure_options += ' --enable-quartz-font --enable-quartz-image'
|