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.

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