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
, \
41 --with-jpeg
=$(STAGING_DIR
)/usr \
42 --with-png
=$(STAGING_DIR
)/usr \
45 LIBPNG12_CONFIG
="$(STAGING_DIR)/usr/bin/libpng12-config" \
50 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
51 DESTDIR
="$(PKG_INSTALL_DIR)" \
55 define Build
/InstallDev
56 mkdir
-p
$(STAGING_DIR
)/usr
/bin
57 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/gdlib-config
$(STAGING_DIR
)/usr
/bin
/
58 mkdir
-p
$(STAGING_DIR
)/usr
/include
59 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/entities.h
$(STAGING_DIR
)/usr
/include/
60 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gd
{,_io
,cache
,fontg
,fontl
,fontmb
,fonts
,fontt
,fx
}.h \
61 $(STAGING_DIR
)/usr
/include/
62 mkdir
-p
$(STAGING_DIR
)/usr
/lib
63 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgd.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
64 $(SED
) 's,-I$$$${prefix}/include,,g' $(STAGING_DIR
)/usr
/bin
/gdlib-config
67 define Build
/UninstallDev
68 rm -rf
$(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 -d
-m0755
$(1)/usr
/lib
76 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgd.so.
* $(1)/usr
/lib
/
79 $(eval
$(call BuildPackage
,libgd
))