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.

79 lines
2.0 KiB

  1. #
  2. # Copyright (C) 2006-2014 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:=1
  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. --without-xpm \
  42. --without-iconv
  43. CONFIGURE_VARS += \
  44. LIBPNG12_CONFIG="$(STAGING_DIR)/host/bin/libpng12-config" \
  45. ac_cv_header_iconv_h=no
  46. define Build/InstallDev
  47. $(INSTALL_DIR) $(1)/usr/bin
  48. $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(1)/usr/bin/
  49. $(SED) \
  50. 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
  51. $(1)/usr/bin/gdlib-config
  52. $(INSTALL_DIR) $(1)/usr/include
  53. $(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(1)/usr/include/
  54. $(CP) $(PKG_INSTALL_DIR)/usr/include/gd{,_io,cache,fontg,fontl,fontmb,fonts,fontt,fx}.h \
  55. $(1)/usr/include/
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,la,so*} $(1)/usr/lib/
  58. $(INSTALL_DIR) $(2)/bin
  59. $(LN) ../../usr/bin/gdlib-config $(2)/bin/
  60. endef
  61. define Package/libgd/install
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(1)/usr/lib/
  64. endef
  65. $(eval $(call BuildPackage,libgd))