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_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
16 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
17 PKG_SOURCE_URL
:=http
://www.boutell.com
/gd
/http
18 PKG_MD5SUM
:=be0a6d326cd8567e736fbc75df0a5c45
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 DESCRIPTION
:=The GD graphics library.
31 URL
:=http
://www.boutell.com
/gd
/
34 define Build
/Configure
35 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
36 $(TARGET_CONFIGURE_OPTS
) \
37 CFLAGS
="$(TARGET_CFLAGS)" \
38 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
39 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
40 LIBPNG12_CONFIG
="$(STAGING_DIR)/usr/bin/libpng12-config" \
42 --target
=$(GNU_TARGET_NAME
) \
43 --host
=$(GNU_TARGET_NAME
) \
44 --build
=$(GNU_HOST_NAME
) \
50 --datadir=/usr
/share \
51 --includedir=/usr
/include \
52 --infodir=/usr
/share
/info \
54 --libexecdir
=/usr
/lib \
55 --localstatedir
=/var \
56 --mandir=/usr
/share
/man \
59 $(DISABLE_LARGEFILE
) \
67 --with-jpeg
=$(STAGING_DIR
)/usr \
68 --with-png
=$(STAGING_DIR
)/usr \
74 rm -rf
$(PKG_INSTALL_DIR
)
75 mkdir
-p
$(PKG_INSTALL_DIR
)
76 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
77 DESTDIR
="$(PKG_INSTALL_DIR)" \
81 define Package
/libgd
/install
82 install -d
-m0755
$(1)/usr
/lib
83 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgd.so.
* $(1)/usr
/lib
/
86 define Build
/InstallDev
87 mkdir
-p
$(STAGING_DIR
)/usr
/bin
88 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/gdlib-config
$(STAGING_DIR
)/usr
/bin
/
89 mkdir
-p
$(STAGING_DIR
)/usr
/include
90 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/entities.h
$(STAGING_DIR
)/usr
/include/
91 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gd
*.h
$(STAGING_DIR
)/usr
/include/
92 mkdir
-p
$(STAGING_DIR
)/usr
/lib
93 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgd.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
96 define Build
/UninstallDev
98 $(STAGING_DIR
)/usr
/bin
/gdlib-config \
99 $(STAGING_DIR
)/usr
/include/entities.h \
100 $(STAGING_DIR
)/usr
/include/gd
*.h \
101 $(STAGING_DIR
)/usr
/lib
/libgd.
{a
,so
*}
104 $(eval
$(call BuildPackage
,libgd
))