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.

93 lines
2.1 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:=libgd
  9. PKG_VERSION:=2.2.5
  10. PKG_RELEASE:=5
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://github.com/$(PKG_NAME)/$(PKG_NAME)/releases/download/gd-$(PKG_VERSION)/
  13. PKG_HASH:=8c302ccbf467faec732f0741a859eef4ecae22fea2d2ab87467be940842bde51
  14. PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:libgd:gd_graphics_library
  18. CMAKE_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. define Package/libgd
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. DEPENDS:=+libjpeg +libpng +libwebp +LIBGD_TIFF:libtiff +LIBGD_FREETYPE:libfreetype
  26. TITLE:=The GD graphics library
  27. URL:=https://libgd.github.io/
  28. MENU:=1
  29. endef
  30. define Package/libgd/description
  31. GD is an open source code library for the dynamic creation of images by
  32. programmers. GD creates PNG, JPEG and GIF images, among other formats.
  33. endef
  34. define Package/libgd/config
  35. if PACKAGE_libgd
  36. config LIBGD_TIFF
  37. bool "TIFF image support"
  38. default n
  39. help
  40. Enable TIFF image support through libtiff
  41. endif
  42. if PACKAGE_libgd
  43. config LIBGD_FREETYPE
  44. bool "Freetype 2.x library support"
  45. default n
  46. help
  47. Enable Freetype 2.x font engine support through libfreetype
  48. endif
  49. endef
  50. TARGET_CFLAGS += $(FPIC) -ffunction-sections -fdata-sections -flto
  51. CMAKE_OPTIONS += \
  52. -DENABLE_FONTCONFIG=OFF \
  53. -DENABLE_ICONV=OFF \
  54. -DENABLE_JPEG=ON \
  55. -DENABLE_LIQ=OFF \
  56. -DENABLE_PNG=ON \
  57. -DENABLE_WEBP=ON \
  58. -DENABLE_XPM=OFF \
  59. -DZLIB_INCLUDE_DIR="$(STAGING_DIR)/usr"
  60. ifdef CONFIG_LIBGD_TIFF
  61. CMAKE_OPTIONS += \
  62. -DENABLE_TIFF=ON
  63. else
  64. CMAKE_OPTIONS += \
  65. -DENABLE_TIFF=OFF
  66. endif
  67. ifdef CONFIG_LIBGD_FREETYPE
  68. CMAKE_OPTIONS += \
  69. -DENABLE_FREETYPE=ON
  70. else
  71. CMAKE_OPTIONS += \
  72. -DENABLE_FREETYPE=OFF
  73. endif
  74. define Package/libgd/install
  75. $(INSTALL_DIR) $(1)/usr/lib
  76. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so* $(1)/usr/lib/
  77. endef
  78. $(eval $(call BuildPackage,libgd))