2 # Copyright (C) 2006-2015 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.xz
15 PKG_SOURCE_URL
:=https
://github.com
/$(PKG_NAME
)/$(PKG_NAME
)/releases
/download
/gd-
$(PKG_VERSION
)/
16 PKG_HASH
:=137f13a7eb93ce72e32ccd7cebdab6874f8cf7ddf31d3a455a68e016ecd9e4e6
17 PKG_MAINTAINER
:=Jo-Philipp Wich
<jo@mein.io
>
25 include $(INCLUDE_DIR
)/package.mk
30 DEPENDS
:=+libjpeg
+libpng
+LIBGD_TIFF
:libtiff
+LIBGD_FREETYPE
:libfreetype
31 TITLE
:=The GD graphics library
32 URL
:=http
://www.libgd.org
/
36 define Package
/libgd
/description
37 GD is an open source code library for the dynamic creation of images by
38 programmers. GD creates PNG
, JPEG and GIF images
, among other formats.
41 define Package
/libgd
/config
44 bool
"TIFF image support"
47 Enable TIFF image support through libtiff
51 bool
"Freetype 2.x library support"
54 Enable Freetype
2.x font engine support through libfreetype
58 TARGET_CFLAGS
+= $(FPIC
)
65 --without-fontconfig \
66 --with-jpeg
=$(STAGING_DIR
)/usr \
67 --with-png
=$(STAGING_DIR
)/usr \
70 ifdef CONFIG_LIBGD_TIFF
72 --with-tiff
=$(STAGING_DIR
)/usr
78 ifdef CONFIG_LIBGD_FREETYPE
80 --with-freetype
=$(STAGING_DIR
)/usr
87 ac_cv_header_iconv_h
=no
89 define Build
/InstallDev
90 $(INSTALL_DIR
) $(1)/usr
/bin
91 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/gdlib-config
$(1)/usr
/bin
/
93 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
94 $(1)/usr
/bin
/gdlib-config
95 $(INSTALL_DIR
) $(1)/usr
/include
96 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/entities.h
$(1)/usr
/include/
97 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gd
{,_color_map
,_errors
,_io
,cache
,fontg
,fontl
,fontmb
,fonts
,fontt
,fx
,pp
}.h \
99 $(INSTALL_DIR
) $(1)/usr
/lib
100 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgd.
{a
,la
,so
*} $(1)/usr
/lib
/
101 $(INSTALL_DIR
) $(2)/bin
102 $(LN
) ..
/..
/usr
/bin
/gdlib-config
$(2)/bin
/
105 define Package
/libgd
/install
106 $(INSTALL_DIR
) $(1)/usr
/lib
107 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgd.so.
* $(1)/usr
/lib
/
110 $(eval
$(call BuildPackage
,libgd
))