[packages] add hiawatha web server (closes: #4356, thanks to Raphael Huck)
[openwrt/svn-archive/archive.git] / libs / gd / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=gd
12 PKG_VERSION:=2.0.35
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://www.libgd.org/releases
17 PKG_MD5SUM:=6c6c3dbb7bf079e0bb5fbbfd3bb8a71c
18
19 PKG_FIXUP = libtool
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libgd
24 SECTION:=libs
25 CATEGORY:=Libraries
26 DEPENDS:=+libjpeg +libpng
27 TITLE:=The GD graphics library
28 URL:=http://www.boutell.com/gd/
29 endef
30
31 define Package/libgd/description
32 GD is an open source code library for the dynamic creation of images by
33 programmers. GD creates PNG, JPEG and GIF images, among other formats.
34 endef
35
36 CONFIGURE_ARGS += \
37 --enable-shared \
38 --enable-static \
39 --disable-rpath \
40 --without-x \
41 --without-freetype \
42 --with-jpeg=$(STAGING_DIR)/usr \
43 --with-png=$(STAGING_DIR)/usr \
44 --without-xpm
45
46 CONFIGURE_VARS += \
47 LIBPNG12_CONFIG="$(STAGING_DIR)/host/bin/libpng12-config"
48
49 TARGET_CFLAGS += $(FPIC)
50
51 define Build/Compile
52 $(MAKE) -C $(PKG_BUILD_DIR) \
53 DESTDIR="$(PKG_INSTALL_DIR)" \
54 all install
55 endef
56
57 define Build/InstallDev
58 mkdir -p $(1)/usr/bin
59 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(1)/usr/bin/
60 mkdir -p $(1)/usr/include
61 $(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(1)/usr/include/
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/gd{,_io,cache,fontg,fontl,fontmb,fonts,fontt,fx}.h \
63 $(1)/usr/include/
64 mkdir -p $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,so*} $(1)/usr/lib/
66 $(SED) 's,-I$$$${prefix}/include,,g' $(1)/usr/bin/gdlib-config
67 endef
68
69 define Package/libgd/install
70 $(INSTALL_DIR) $(1)/usr/lib
71 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(1)/usr/lib/
72 endef
73
74 $(eval $(call BuildPackage,libgd))