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.

84 lines
2.3 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.5.5
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=@SF/freetype
  13. PKG_MD5SUM:=2a7a314927011d5030903179cf183be0
  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:=Nicolas Thill <nico@openwrt.org>
  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
  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=no \
  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) $(2)/bin
  46. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/freetype-config $(2)/bin/
  47. $(INSTALL_DIR) $(1)/usr/include
  48. $(CP) $(PKG_INSTALL_DIR)/usr/include/freetype2 $(1)/usr/include/
  49. $(INSTALL_DIR) $(1)/usr/lib
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.{a,so*} $(1)/usr/lib/
  51. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  52. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/freetype2.pc $(1)/usr/lib/pkgconfig/
  53. $(SED) \
  54. 's,^\(prefix\|exec_prefix\)=.*,\1="$(STAGING_DIR)/usr",; \
  55. s,^\(includedir\)=.*,\1="$(STAGING_DIR)/usr/include",; \
  56. s,^\(libdir\)=.*,\1="$(STAGING_DIR)/usr/lib",' \
  57. $(2)/bin/freetype-config
  58. $(SED) \
  59. 's,/usr/include,$$$${prefix}/include,g; \
  60. s,/usr/lib,$$$${exec_prefix}/lib,g' \
  61. $(1)/usr/lib/pkgconfig/freetype2.pc
  62. endef
  63. define Package/libfreetype/install
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfreetype.so.* $(1)/usr/lib/
  66. endef
  67. $(eval $(call HostBuild))
  68. $(eval $(call BuildPackage,libfreetype))