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.

80 lines
2.0 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.1.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=gd-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/libgd/libgd/archive
  13. PKG_MD5SUM:=e91a1a99903e460e7ba00a794e72cc1e
  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. PKG_BUILD_DIR:=$(BUILD_DIR)/libgd-gd-$(PKG_VERSION)
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libgd
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. DEPENDS:=+libjpeg +libpng
  25. TITLE:=The GD graphics library
  26. URL:=http://www.libgd.org/
  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. TARGET_CFLAGS += $(FPIC)
  33. CONFIGURE_ARGS += \
  34. --enable-shared \
  35. --enable-static \
  36. --disable-rpath \
  37. --without-x \
  38. --without-fontconfig \
  39. --without-freetype \
  40. --with-jpeg=$(STAGING_DIR)/usr \
  41. --with-png=$(STAGING_DIR)/usr \
  42. --with-vpx=no \
  43. --without-xpm \
  44. --without-iconv
  45. CONFIGURE_VARS += \
  46. ac_cv_header_iconv_h=no
  47. define Build/InstallDev
  48. $(INSTALL_DIR) $(1)/usr/bin
  49. $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(1)/usr/bin/
  50. $(SED) \
  51. 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
  52. $(1)/usr/bin/gdlib-config
  53. $(INSTALL_DIR) $(1)/usr/include
  54. $(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(1)/usr/include/
  55. $(CP) $(PKG_INSTALL_DIR)/usr/include/gd{,_io,cache,fontg,fontl,fontmb,fonts,fontt,fx}.h \
  56. $(1)/usr/include/
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,la,so*} $(1)/usr/lib/
  59. $(INSTALL_DIR) $(2)/bin
  60. $(LN) ../../usr/bin/gdlib-config $(2)/bin/
  61. endef
  62. define Package/libgd/install
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(1)/usr/lib/
  65. endef
  66. $(eval $(call BuildPackage,libgd))