2 # Copyright (C) 2006-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=http
://www.libgd.org
/releases
16 PKG_MD5SUM
:=6c6c3dbb7bf079e0bb5fbbfd3bb8a71c
23 include $(INCLUDE_DIR
)/package.mk
28 DEPENDS
:=+libjpeg
+libpng
29 TITLE
:=The GD graphics library
30 URL
:=http
://www.libgd.org
/
33 define Package
/libgd
/description
34 GD is an open source code library for the dynamic creation of images by
35 programmers. GD creates PNG
, JPEG and GIF images
, among other formats.
38 TARGET_CFLAGS
+= $(FPIC
)
46 --with-jpeg
=$(STAGING_DIR
)/usr \
47 --with-png
=$(STAGING_DIR
)/usr \
52 LIBPNG12_CONFIG
="$(STAGING_DIR)/host/bin/libpng12-config" \
53 ac_cv_header_iconv_h
=no
55 define Build
/InstallDev
56 $(INSTALL_DIR
) $(1)/usr
/bin
57 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/gdlib-config
$(1)/usr
/bin
/
59 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
60 $(1)/usr
/bin
/gdlib-config
61 $(INSTALL_DIR
) $(1)/usr
/include
62 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/entities.h
$(1)/usr
/include/
63 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gd
{,_io
,cache
,fontg
,fontl
,fontmb
,fonts
,fontt
,fx
}.h \
65 $(INSTALL_DIR
) $(1)/usr
/lib
66 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgd.
{a
,la
,so
*} $(1)/usr
/lib
/
67 $(INSTALL_DIR
) $(2)/bin
68 $(LN
) ..
/..
/usr
/bin
/gdlib-config
$(2)/bin
/
71 define Package
/libgd
/install
72 $(INSTALL_DIR
) $(1)/usr
/lib
73 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgd.so.
* $(1)/usr
/lib
/
76 $(eval
$(call BuildPackage
,libgd
))