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