lots of package cleanups/fixes
[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 PKG_FIXUP = libtool
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/cairo
22 SECTION:=xorg-libs
23 CATEGORY:=Xorg
24 SUBMENU:=libraries
25 TITLE:=2D graphics library with support for multiple output devices
26 DEPENDS:=+xorg-server-essentials +fontconfig +libpng
27 endef
28
29 define Build/Configure
30 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
31 if [ -x $(CONFIGURE_CMD) ]; then \
32 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
33 $(CONFIGURE_VARS) \
34 $(CONFIGURE_CMD) \
35 $(CONFIGURE_ARGS_XTRA) \
36 $(CONFIGURE_ARGS) ;\
37 fi \
38 )
39 endef
40
41 define Build/Compile
42 $(MAKE) -C $(PKG_BUILD_DIR)
43 $(MAKE) -C $(PKG_BUILD_DIR)/ install DESTDIR=$(PKG_INSTALL_DIR)
44 endef
45
46 define Build/InstallDev
47 $(INSTALL_DIR) $(1)
48 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
49 $(SED) "s,-L/usr/local/lib,,g" $(1)/usr/lib/libcairo.la
50 $(SED) "s,/usr/lib/libfontconfig.la,$(STAGING_DIR)/usr/lib/libfontconfig.la,g" $(1)/usr/lib/libcairo.la
51 $(SED) "s,$(STAGING_DIR)$(STAGING_DIR),$(STAGING_DIR),g" $(1)/usr/lib/libcairo.la
52 endef
53
54 define Package/cairo/Install
55 $(INSTALL_DIR) $(1)/usr/lib
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/
57 endef
58
59 $(eval $(call BuildPackage,cairo))