[packages] libcroco: fix autoreconf
[packages.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
20 PKG_INSTALL:=1
21 PKG_BUILD_PARALLEL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libgd
26   SECTION:=libs
27   CATEGORY:=Libraries
28   DEPENDS:=+libjpeg +libpng
29   TITLE:=The GD graphics library
30   URL:=http://www.libgd.org/
31 endef
32
33 define Package/libgd/description
34   GD is an open source code library for the dynamic creation of images by
35   programmers. GD creates PNG, JPEG and GIF images, among other formats.
36 endef
37
38 TARGET_CFLAGS += $(FPIC)
39
40 CONFIGURE_ARGS += \
41         --enable-shared \
42         --enable-static \
43         --disable-rpath \
44         --without-x \
45         --without-freetype \
46         --with-jpeg=$(STAGING_DIR)/usr \
47         --with-png=$(STAGING_DIR)/usr \
48         --without-xpm \
49         --without-iconv
50
51 CONFIGURE_VARS += \
52         LIBPNG12_CONFIG="$(STAGING_DIR)/host/bin/libpng12-config"
53
54 define Build/Configure
55         ( cd $(PKG_BUILD_DIR); aclocal; libtoolize --force; autoreconf; );
56         $(call Build/Configure/Default)
57 endef
58
59 define Build/InstallDev
60         $(INSTALL_DIR) $(1)/usr/bin
61         $(CP) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(1)/usr/bin/
62         $(SED) \
63                 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
64                 $(1)/usr/bin/gdlib-config
65         $(INSTALL_DIR) $(1)/usr/include
66         $(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(1)/usr/include/
67         $(CP) $(PKG_INSTALL_DIR)/usr/include/gd{,_io,cache,fontg,fontl,fontmb,fonts,fontt,fx}.h \
68                 $(1)/usr/include/
69         $(INSTALL_DIR) $(1)/usr/lib
70         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,la,so*} $(1)/usr/lib/
71         $(INSTALL_DIR) $(2)/bin
72         $(LN) ../../usr/bin/gdlib-config $(2)/bin/
73 endef
74
75 define Package/libgd/install
76         $(INSTALL_DIR) $(1)/usr/lib
77         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(1)/usr/lib/
78 endef
79
80 $(eval $(call BuildPackage,libgd))