make use of feature-flag "drawing backend" - link cairo e.g. against libX11 or libdir...
[openwrt/svn-archive/archive.git] / Xorg / lib / cairo / Makefile
1 #
2 # Copyright (C) 2008-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=cairo
11 PKG_VERSION:=1.8.8
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://cairographics.org/releases/
16 PKG_MD5SUM:=d3e1a1035ae563812d4dd44a74fb0dd0
17 PKG_FIXUP:=libtool
18
19 include $(INCLUDE_DIR)/package.mk
20
21 PKG_INSTALL:=1
22
23 define Package/cairo
24 SECTION:=xorg-libs
25 CATEGORY:=Xorg
26 SUBMENU:=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 endef
32
33 define Package/cairo/description
34 Cairo is a 2D graphics library. The cairo API provides operations similar
35 to the drawing operators of PostScript and PDF. Operations in cairo
36 include stroking and filling cubic Bézier splines, transforming and
37 compositing translucent images, and antialiased text rendering. All
38 drawing operations can be transformed by any affine transformation
39 (scale, rotation, shear, etc.).
40 endef
41
42 CONFIGURE_VARS+=FONTCONFIG_LIBS="-lfreetype -lfontconfig -lz -lexpat"
43
44 CONFIGURE_ARGS+= \
45 --enable-freetype=yes \
46 --disable-win32 \
47 --enable-xlib-xrender=no \
48 $(if $(CONFIG_FEATURE_drawing-backend_DirectFB), --enable-directfb, --disable-directfb) \
49 $(if $(CONFIG_FEATURE_drawing-backend_libX11), --enable-xlib --with-x, --disable-xlib --without-x)
50
51 define Build/InstallDev
52 $(INSTALL_DIR) $(1)/usr/lib/
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} $(1)/usr/lib/
54 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig/
55 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
56 $(INSTALL_DIR) $(1)/usr/include/cairo/
57 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/cairo/* $(1)/usr/include/cairo/
58 endef
59
60 define Package/cairo/install
61 $(INSTALL_DIR) $(1)/usr/lib/
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
63 endef
64
65 $(eval $(call BuildPackage,cairo))