added fontconfig
[openwrt/svn-archive/archive.git] / XOrg / app / fontconfig / Makefile
1 #
2 # Copyright (C) 2007 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:=fontconfig
12 PKG_VERSION:=2.3.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://fontconfig.org/release/
17
18 include $(INCLUDE_DIR)/package.mk
19
20 CONFIGURE_ARGS+=LIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
21
22 define Package/fontconfig
23 SECTION:=xorg-util
24 CATEGORY:=Xorg
25 SUBMENU:=font-utils
26 TITLE:=fontconfig
27 DEPENDS:=+xorg-server-essentials +libexpat
28 endef
29
30 define Build/Configure
31 cd $(PKG_BUILD_DIR)/; \
32 $(TARGET_CONFIGURE_OPTS) \
33 $(subst -fhonour-copts,,$(CONFIGURE_VARS)) \
34 $(CONFIGURE_CMD) \
35 $(CONFIGURE_ARGS_XTRA) \
36 $(CONFIGURE_ARGS)
37 endef
38
39 define Build/Compile
40 $(MAKE) -C $(PKG_BUILD_DIR)
41 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
42 endef
43
44 define Package/fontconfig/install
45 $(INSTALL_DIR) $(1)/usr/lib
46 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib
47 endef
48
49 define Build/InstallDev
50 $(INSTALL_DIR) $(STAGING_DIR)/usr/{lib,include}
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(STAGING_DIR)/usr/lib
52 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ $(STAGING_DIR)/usr/lib/
53 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(STAGING_DIR)/usr/include/
54 $(SED) "s,"prefix\=.*",prefix=$(STAGING_DIR)/usr," $(STAGING_DIR)/usr/lib/pkgconfig/fontconfig.pc
55 $(SED) "s,"exec_prefix\=.*",exec_prefix=$(STAGING_DIR)/usr," $(STAGING_DIR)/usr/lib/pkgconfig/fontconfig.pc
56 $(SED) "s,"libdir\=\'/usr/lib\'",libdir='$(STAGING_DIR)/usr/lib\'," $(STAGING_DIR)/usr/lib/libfontconfig.la
57 endef
58
59 $(eval $(call BuildPackage,fontconfig))