1SUMMARY="Multi-platform 2D graphics library"
2DESCRIPTION="Cairo is a 2D graphics library with support for multiple output \
3devices. Currently supported output targets include the X Window \
4System (via both Xlib and XCB), quartz, win32, and image buffers, \
5as well as PDF, PostScript, and SVG file output. Experimental backends \
6include OpenGL, BeOS, OS/2, and DirectFB."
7HOMEPAGE="http://cairographics.org/"
8COPYRIGHT="2000, 2002, 2004-2007 Keith Packard
9	2002-2003 University of Southern California
10	2004-2010 Red Hat, Inc.
11	2005-2010 Mozilla Corporation
12	2006-2009 Adrian Johnson
13	2007-2009 Chris Wilson
14	2006-2013 Intel Corporation
15	2011 Andrea Canciani
16	2011 Samsung Electronics
17	2010-2011 Linaro Limited
18	2009-2010 Eric Anholt
19	2002-2010 many others"
20LICENSE="GNU LGPL v2.1
21	MPL v1.1"
22REVISION="6"
23SOURCE_URI="http://cairographics.org/releases/cairo-$portVersion.tar.xz"
24CHECKSUM_SHA256="5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331"
25PATCHES="cairo-$portVersion.patchset"
26
27ARCHITECTURES="all !x86_gcc2"
28SECONDARY_ARCHITECTURES="x86"
29
30# This recipe MUST be kept in sync with xcairo!
31
32libVersion="2.11600.0"
33libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
34
35PROVIDES="
36	cairo$secondaryArchSuffix = $portVersion
37	lib:libcairo$secondaryArchSuffix = $libVersionCompat
38	lib:libcairo_gobject$secondaryArchSuffix = $libVersionCompat
39	lib:libcairo_script_interpreter$secondaryArchSuffix = $libVersionCompat
40	"
41REQUIRES="
42	haiku$secondaryArchSuffix
43	lib:libfontconfig$secondaryArchSuffix
44	lib:libfreetype$secondaryArchSuffix
45	lib:libglib_2.0$secondaryArchSuffix
46	lib:libintl$secondaryArchSuffix
47	lib:libpixman_1$secondaryArchSuffix
48	lib:libpng16$secondaryArchSuffix
49	lib:libz$secondaryArchSuffix
50	"
51
52PROVIDES_devel="
53	cairo${secondaryArchSuffix}_devel = $portVersion
54	devel:libcairo$secondaryArchSuffix = $libVersionCompat
55	devel:libcairo_gobject$secondaryArchSuffix = $libVersionCompat
56	devel:libcairo_script_interpreter$secondaryArchSuffix = $libVersionCompat
57	"
58REQUIRES_devel="
59	cairo$secondaryArchSuffix == $portVersion base
60	devel:libglib_2.0$secondaryArchSuffix
61	devel:libfontconfig$secondaryArchSuffix
62	devel:libpixman_1$secondaryArchSuffix
63	"
64
65BUILD_REQUIRES="
66	haiku${secondaryArchSuffix}_devel
67	devel:libfontconfig$secondaryArchSuffix
68	devel:libfreetype$secondaryArchSuffix
69	devel:libglib_2.0$secondaryArchSuffix
70	devel:libpixman_1$secondaryArchSuffix
71	devel:libpng16$secondaryArchSuffix
72	devel:libz$secondaryArchSuffix
73	"
74BUILD_PREREQUIRES="
75	cmd:aclocal
76	cmd:autoconf
77	cmd:automake
78	cmd:gcc$secondaryArchSuffix
79	cmd:gtkdocize
80	cmd:ld$secondaryArchSuffix
81	cmd:libtoolize
82	cmd:make
83	cmd:pkg_config$secondaryArchSuffix
84	"
85
86defineDebugInfoPackage cairo$secondaryArchSuffix \
87	"$libDir"/libcairo.so.$libVersion \
88	"$libDir"/libcairo-gobject.so.$libVersion \
89	"$libDir"/libcairo-script-interpreter.so.$libVersion
90
91BUILD()
92{
93	autoreconf -vfi
94
95	export CFLAGS="-D__BSD_VISIBLE -g -O2"
96	runConfigure ./configure \
97		--disable-static --enable-shared
98	make $jobArgs
99}
100
101INSTALL()
102{
103	make install
104
105	rm $libDir/libcairo*.la
106
107	prepareInstalledDevelLibs \
108		libcairo \
109		libcairo-gobject \
110		libcairo-script-interpreter
111	fixPkgconfig
112
113	packageEntries devel \
114		$developDir
115}
116