Makefile (2381B)
1 # 2 # Copyright (C) 2006-2015 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:=freetype 11 PKG_VERSION:=2.7 12 PKG_RELEASE:=1 13 14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 15 PKG_SOURCE_URL:=@SF/freetype 16 PKG_MD5SUM:=be4601619827b7935e1d861745923a68 17 18 PKG_LICENSE:=FTL GPL-2.0 MIT ZLIB 19 PKG_LICENSE_FILES:=docs/LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT src/bdf/README src/pcf/README src/gzip/zlib.h 20 PKG_MAINTAINER:=Nicolas Thill <nico@openwrt.org> 21 22 PKG_FIXUP:=autoreconf 23 PKG_LIBTOOL_PATHS:=builds/unix 24 25 include $(INCLUDE_DIR)/host-build.mk 26 include $(INCLUDE_DIR)/package.mk 27 28 define Package/libfreetype 29 SECTION:=libs 30 CATEGORY:=Libraries 31 TITLE:=A free, high-quality and portable font engine 32 URL:=http://www.freetype.org/ 33 DEPENDS:=+zlib +libbz2 34 endef 35 36 define Package/libfreetype/description 37 The FreeType project is a team of volunteers who develop free, 38 portable and high-quality software solutions for digital typography. 39 They specifically target embedded systems and focus on bringing small, 40 efficient and ubiquitous products. 41 endef 42 43 TARGET_CFLAGS += $(FPIC) 44 45 CONFIGURE_ARGS += \ 46 --enable-shared \ 47 --enable-static \ 48 --with-bzip2=yes \ 49 --with-zlib=yes \ 50 --with-png=no \ 51 52 define Build/Compile 53 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install 54 endef 55 56 define Build/InstallDev 57 $(INSTALL_DIR) $(2)/bin 58 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(2)/bin/ 59 $(INSTALL_DIR) $(1)/usr/include 60 $(CP) $(PKG_INSTALL_DIR)/usr/include/freetype2 $(1)/usr/include/ 61 $(INSTALL_DIR) $(1)/usr/lib 62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.{a,so*} $(1)/usr/lib/ 63 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig 64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freetype2.pc $(1)/usr/lib/pkgconfig/ 65 66 $(SED) \ 67 's,^\(prefix\|exec_prefix\)=.*,\1="$(STAGING_DIR)/usr",; \ 68 s,^\(includedir\)=.*,\1="$(STAGING_DIR)/usr/include",; \ 69 s,^\(libdir\)=.*,\1="$(STAGING_DIR)/usr/lib",' \ 70 $(2)/bin/freetype-config 71 $(SED) \ 72 's,/usr/include,$$$${prefix}/include,g; \ 73 s,/usr/lib,$$$${exec_prefix}/lib,g' \ 74 $(1)/usr/lib/pkgconfig/freetype2.pc 75 endef 76 77 78 define Package/libfreetype/install 79 $(INSTALL_DIR) $(1)/usr/lib 80 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.so.* $(1)/usr/lib/ 81 endef 82 83 $(eval $(call HostBuild)) 84 $(eval $(call BuildPackage,libfreetype))