2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://fontconfig.org/release/
18 include $(INCLUDE_DIR)/package.mk
20 CONFIGURE_ARGS+=LIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
22 define Package/fontconfig
27 DEPENDS:=+xorg-server-essentials +libexpat
30 define Build/Configure
31 cd $(PKG_BUILD_DIR)/; \
32 $(TARGET_CONFIGURE_OPTS) \
33 $(subst -fhonour-copts,,$(CONFIGURE_VARS)) \
35 $(CONFIGURE_ARGS_XTRA) \
40 $(MAKE) -C $(PKG_BUILD_DIR)
41 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
44 define Package/fontconfig/install
45 $(INSTALL_DIR) $(1)/usr/lib
46 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib
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
59 $(eval $(call BuildPackage,fontconfig))