You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.4 KiB

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