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
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
28 DEPENDS
:=+libjpeg
+libpng
29 TITLE
:=The GD graphics library
30 URL
:=http
://www.boutell.com
/gd
/
33 define Build
/Configure
34 $(call Build
/Configure
/Default
, \
40 --with-jpeg
=$(STAGING_DIR
)/usr \
41 --with-png
=$(STAGING_DIR
)/usr \
44 LIBPNG12_CONFIG
="$(STAGING_DIR)/usr/bin/libpng12-config" \
49 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
50 DESTDIR
="$(PKG_INSTALL_DIR)" \
54 define Build
/InstallDev
55 mkdir
-p
$(STAGING_DIR
)/usr
/bin
56 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/gdlib-config
$(STAGING_DIR
)/usr
/bin
/
57 mkdir
-p
$(STAGING_DIR
)/usr
/include
58 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/entities.h
$(STAGING_DIR
)/usr
/include/
59 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gd
{,_io
,cache
,fontg
,fontl
,fontmb
,fonts
,fontt
,fx
}.h \
60 $(STAGING_DIR
)/usr
/include/
61 mkdir
-p
$(STAGING_DIR
)/usr
/lib
62 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgd.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
63 $(SED
) 's,-I$$$${prefix}/include,,g' $(STAGING_DIR
)/usr
/bin
/gdlib-config
66 define Build
/UninstallDev
68 $(STAGING_DIR
)/usr
/bin
/gdlib-config \
69 $(STAGING_DIR
)/usr
/include/entities.h \
70 $(STAGING_DIR
)/usr
/include/gd
{,_io
,cache
,fontg
,fontl
,fontmb
,fonts
,fontt
,fx
}.h \
71 $(STAGING_DIR
)/usr
/lib
/libgd.
{a
,so
*}
74 define Package
/libgd
/install
75 $(INSTALL_DIR
) $(1)/usr
/lib
76 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgd.so.
* $(1)/usr
/lib
/
79 $(eval
$(call BuildPackage
,libgd
))