2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.boutell.com/gd/http
17 PKG_MD5SUM:=be0a6d326cd8567e736fbc75df0a5c45
19 include $(INCLUDE_DIR)/package.mk
24 DEPENDS:=+libjpeg +libpng
25 TITLE:=The GD graphics library
26 URL:=http://www.boutell.com/gd/
35 --with-jpeg=$(STAGING_DIR)/usr \
36 --with-png=$(STAGING_DIR)/usr \
40 LIBPNG12_CONFIG="$(STAGING_DIR)/usr/bin/libpng12-config"
42 TARGET_CFLAGS += $(FPIC)
45 $(MAKE) -C $(PKG_BUILD_DIR) \
46 DESTDIR="$(PKG_INSTALL_DIR)" \
50 define Build/InstallDev
52 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(1)/usr/bin/
53 mkdir -p $(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 \
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,so*} $(1)/usr/lib/
59 $(SED) 's,-I$$$${prefix}/include,,g' $(1)/usr/bin/gdlib-config
62 define Package/libgd/install
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(1)/usr/lib/
67 $(eval $(call BuildPackage,libgd))