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.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://bitbucket.org/libgd/gd-libgd/downloads
  13. PKG_MD5SUM:=03588159bf4faab9079849c8d709acc6
  14. PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
  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
  24. TITLE:=The GD graphics library
  25. URL:=http://www.libgd.org/
  26. endef
  27. define Package/libgd/description
  28. GD is an open source code library for the dynamic creation of images by
  29. programmers. GD creates PNG, JPEG and GIF images, among other formats.
  30. endef
  31. TARGET_CFLAGS += $(FPIC)
  32. CONFIGURE_ARGS += \
  33. --enable-shared \
  34. --enable-static \
  35. --disable-rpath \
  36. --without-x \
  37. --without-fontconfig \
  38. --without-freetype \
  39. --with-jpeg=$(STAGING_DIR)/usr \
  40. --with-png=$(STAGING_DIR)/usr \
  41. --with-vpx=no \
  42. --without-xpm \
  43. --without-iconv
  44. CONFIGURE_VARS += \
  45. LIBPNG12_CONFIG="$(STAGING_DIR)/host/bin/libpng12-config" \
  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))