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.

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