1SUMMARY="Multi-platform 2D graphics library (with Xlib surfaces)"
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="5"
23SOURCE_URI="http://cairographics.org/releases/cairo-$portVersion.tar.xz"
24CHECKSUM_SHA256="5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331"
25PATCHES="cairo-$portVersion.patchset"
26SOURCE_DIR="cairo-$portVersion"
27
28ARCHITECTURES="all !x86_gcc2"
29SECONDARY_ARCHITECTURES="x86"
30
31# This recipe MUST be kept in sync with cairo!
32
33libVersion="2.11600.0"
34libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
35
36PROVIDES="
37	xcairo$secondaryArchSuffix = $portVersion
38	lib:libcairo$secondaryArchSuffix = $libVersionCompat
39	lib:libcairo_gobject$secondaryArchSuffix = $libVersionCompat
40	lib:libcairo_script_interpreter$secondaryArchSuffix = $libVersionCompat
41	"
42REQUIRES="
43	haiku$secondaryArchSuffix
44	lib:libfontconfig$secondaryArchSuffix
45	lib:libfreetype$secondaryArchSuffix
46	lib:libglib_2.0$secondaryArchSuffix
47	lib:libintl$secondaryArchSuffix
48	lib:libpixman_1$secondaryArchSuffix
49	lib:libpng16$secondaryArchSuffix
50	lib:libz$secondaryArchSuffix
51
52	lib:libX11$secondaryArchSuffix
53	lib:libXext$secondaryArchSuffix
54	"
55CONFLICTS="
56	cairo$secondaryArchSuffix
57	"
58
59PROVIDES_devel="
60	xcairo${secondaryArchSuffix}_devel = $portVersion
61	devel:libcairo$secondaryArchSuffix = $libVersionCompat
62	devel:libcairo_gobject$secondaryArchSuffix = $libVersionCompat
63	devel:libcairo_script_interpreter$secondaryArchSuffix = $libVersionCompat
64	"
65REQUIRES_devel="
66	xcairo$secondaryArchSuffix == $portVersion base
67	devel:libglib_2.0$secondaryArchSuffix
68	devel:libfontconfig$secondaryArchSuffix
69	devel:libpixman_1$secondaryArchSuffix
70
71	devel:libX11$secondaryArchSuffix
72	"
73
74BUILD_REQUIRES="
75	haiku${secondaryArchSuffix}_devel
76	devel:libfontconfig$secondaryArchSuffix
77	devel:libfreetype$secondaryArchSuffix
78	devel:libglib_2.0$secondaryArchSuffix
79	devel:libpixman_1$secondaryArchSuffix
80	devel:libpng16$secondaryArchSuffix
81	devel:libz$secondaryArchSuffix
82
83	devel:libX11$secondaryArchSuffix
84	devel:libXext$secondaryArchSuffix
85	"
86BUILD_PREREQUIRES="
87	cmd:aclocal
88	cmd:autoconf
89	cmd:automake
90	cmd:gcc$secondaryArchSuffix
91	cmd:gtkdocize
92	cmd:ld$secondaryArchSuffix
93	cmd:libtoolize
94	cmd:make
95	cmd:pkg_config$secondaryArchSuffix
96	"
97
98defineDebugInfoPackage xcairo$secondaryArchSuffix \
99	"$libDir"/libcairo.so.$libVersion \
100	"$libDir"/libcairo-gobject.so.$libVersion \
101	"$libDir"/libcairo-script-interpreter.so.$libVersion
102
103BUILD()
104{
105	autoreconf -fi
106	export CFLAGS="-D__BSD_VISIBLE -g -O2"
107
108	runConfigure ./configure \
109		--disable-static --enable-shared \
110		--enable-xlib
111	make $jobArgs
112}
113
114INSTALL()
115{
116	make install
117
118	rm $libDir/libcairo*.la
119
120	prepareInstalledDevelLibs \
121		libcairo \
122		libcairo-gobject \
123		libcairo-script-interpreter
124	fixPkgconfig
125
126	packageEntries devel \
127		$developDir
128}
129