2 # Copyright (C) 2008-2010 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://cairographics.org/releases/
16 PKG_MD5SUM:=d3e1a1035ae563812d4dd44a74fb0dd0
19 include $(INCLUDE_DIR)/package.mk
24 SECTION:=xorg-libraries
27 TITLE:=Multi-platform 2D graphics library
28 DEPENDS:=+fontconfig +libpng +libexpat +pixman \
29 +FEATURE_drawing-backend_DirectFB:directfb \
30 +FEATURE_drawing-backend_libX11:libX11
31 URL:=http://cairographics.org/
34 define Package/cairo/description
35 Cairo is a 2D graphics library. The cairo API provides operations similar
36 to the drawing operators of PostScript and PDF. Operations in cairo
37 include stroking and filling cubic Bézier splines, transforming and
38 compositing translucent images, and antialiased text rendering. All
39 drawing operations can be transformed by any affine transformation
40 (scale, rotation, shear, etc.).
43 CONFIGURE_VARS+=FONTCONFIG_LIBS="-lfreetype -lfontconfig -lz -lexpat"
46 --enable-freetype=yes \
48 --enable-xlib-xrender=no \
49 $(if $(CONFIG_FEATURE_drawing-backend_DirectFB), --enable-directfb, --disable-directfb) \
50 $(if $(CONFIG_FEATURE_drawing-backend_libX11), --enable-xlib --with-x, --disable-xlib --without-x)
52 define Build/InstallDev
53 $(INSTALL_DIR) $(1)/usr/lib/
54 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
55 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
56 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
57 $(INSTALL_DIR) $(1)/usr/include/cairo/
58 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/cairo/* $(1)/usr/include/cairo/
61 define Package/cairo/install
62 $(INSTALL_DIR) $(1)/usr/lib/
63 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
66 $(eval $(call BuildPackage,cairo))