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.

113 lines
2.7 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:=2
  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_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libgd
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. DEPENDS:=+libjpeg +libpng +LIBGD_TIFF:libtiff +LIBGD_FREETYPE:libfreetype
  25. TITLE:=The GD graphics library
  26. URL:=https://libgd.github.io/
  27. MENU:=1
  28. endef
  29. define Package/libgd/description
  30. GD is an open source code library for the dynamic creation of images by
  31. programmers. GD creates PNG, JPEG and GIF images, among other formats.
  32. endef
  33. define Package/libgd/config
  34. if PACKAGE_libgd
  35. config LIBGD_TIFF
  36. bool "TIFF image support"
  37. default n
  38. help
  39. Enable TIFF image support through libtiff
  40. endif
  41. if PACKAGE_libgd
  42. config LIBGD_FREETYPE
  43. bool "Freetype 2.x library support"
  44. default n
  45. help
  46. Enable Freetype 2.x font engine support through libfreetype
  47. endif
  48. endef
  49. TARGET_CFLAGS += $(FPIC)
  50. CONFIGURE_ARGS += \
  51. --enable-shared \
  52. --enable-static \
  53. --disable-rpath \
  54. --without-x \
  55. --without-fontconfig \
  56. --with-jpeg=$(STAGING_DIR)/usr \
  57. --with-png=$(STAGING_DIR)/usr \
  58. --without-xpm
  59. ifdef CONFIG_LIBGD_TIFF
  60. CONFIGURE_ARGS+= \
  61. --with-tiff=$(STAGING_DIR)/usr
  62. else
  63. CONFIGURE_ARGS+= \
  64. --without-tiff
  65. endif
  66. ifdef CONFIG_LIBGD_FREETYPE
  67. CONFIGURE_ARGS+= \
  68. --with-freetype=$(STAGING_DIR)/usr
  69. else
  70. CONFIGURE_ARGS+= \
  71. --without-freetype
  72. endif
  73. CONFIGURE_VARS += \
  74. ac_cv_header_iconv_h=no \
  75. am_cv_func_iconv_works=no \
  76. am_func_iconv=no
  77. define Build/InstallDev
  78. $(INSTALL_DIR) $(1)/usr/bin
  79. $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(1)/usr/bin/
  80. $(SED) \
  81. 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
  82. $(1)/usr/bin/gdlib-config
  83. $(INSTALL_DIR) $(1)/usr/include
  84. $(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(1)/usr/include/
  85. $(CP) $(PKG_INSTALL_DIR)/usr/include/gd{,_color_map,_errors,_io,cache,fontg,fontl,fontmb,fonts,fontt,fx,pp}.h \
  86. $(1)/usr/include/
  87. $(INSTALL_DIR) $(1)/usr/lib
  88. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,la,so*} $(1)/usr/lib/
  89. $(INSTALL_DIR) $(2)/bin
  90. $(LN) ../../usr/bin/gdlib-config $(2)/bin/
  91. endef
  92. define Package/libgd/install
  93. $(INSTALL_DIR) $(1)/usr/lib
  94. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(1)/usr/lib/
  95. endef
  96. $(eval $(call BuildPackage,libgd))