added cairo
[openwrt/svn-archive/archive.git] / XOrg / lib / cairo / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # blogic@openwrt.org
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=cairo
12 PKG_VERSION:=1.2.4
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:= http://cairographics.org/releases/
17
18 include $(INCLUDE_DIR)/package.mk
19
20 EXTRA_LDFLAGS:="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
21
22 define Package/cairo
23 SECTION:=xorg-libs
24 CATEGORY:=Xorg
25 SUBMENU:=libraries
26 TITLE:=2D graphics library with support for multiple output devices
27 DEPENDS:=+xorg-server-essentials +fontconfig
28 endef
29
30 define Build/Configure
31 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
32 if [ -x $(CONFIGURE_CMD) ]; then \
33 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
34 $(CONFIGURE_VARS) \
35 $(CONFIGURE_CMD) \
36 $(CONFIGURE_ARGS_XTRA) \
37 $(CONFIGURE_ARGS) ;\
38 fi \
39 )
40 endef
41
42 define Build/Compile
43 $(MAKE) -C $(PKG_BUILD_DIR)
44 $(MAKE) -C $(PKG_BUILD_DIR)/ install DESTDIR=$(PKG_INSTALL_DIR)
45 endef
46
47 define Build/InstallDev
48 $(CP) $(PKG_INSTALL_DIR)/* $(STAGING_DIR)/
49 $(SED) "s,"prefix\=.*",prefix=$(STAGING_DIR)/usr," $(STAGING_DIR)/usr/lib/pkgconfig/{cairo-ft,cairo,cairo-pdf,cairo-png,cairo-ps,cairo-svg,cairo-xlib,cairo-xlib-xrender}.pc
50 $(SED) "s,"exec_prefix\=.*",exec_prefix=$(STAGING_DIR)/usr," $(STAGING_DIR)/usr/lib/pkgconfig/{cairo-ft,cairo,cairo-pdf,cairo-png,cairo-ps,cairo-svg,cairo-xlib,cairo-xlib-xrender}.pc
51 $(SED) "s,-L/usr/local/lib,,g" $(STAGING_DIR)/usr/lib/libcairo.la
52 $(SED) "s,/usr/lib/libfontconfig.la,$(STAGING_DIR)/usr/lib/libfontconfig.la,g" $(STAGING_DIR)/usr/lib/libcairo.la
53 $(SED) "s,$(STAGING_DIR)$(STAGING_DIR),$(STAGING_DIR),g" $(STAGING_DIR)/usr/lib/libcairo.la
54 $(SED) "s,"libdir\=\'/usr/lib\'",libdir='$(STAGING_DIR)/usr/lib\'," $(STAGING_DIR)/usr/lib/libcairo.la
55 endef
56
57 define Package/cairo/Install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/
60 endef
61
62 $(eval $(call BuildPackage,cairo))