Added package libpfm (note this package also requires perfmon2 be patched into the...
[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.33
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.boutell.com/gd/http
17 PKG_MD5SUM:=be0a6d326cd8567e736fbc75df0a5c45
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libgd
22 SECTION:=libs
23 CATEGORY:=Libraries
24 DEPENDS:=+libjpeg +libpng
25 TITLE:=The GD graphics library
26 URL:=http://www.boutell.com/gd/
27 endef
28
29 CONFIGURE_ARGS += \
30 --enable-shared \
31 --enable-static \
32 --disable-rpath \
33 --without-x \
34 --without-freetype \
35 --with-jpeg=$(STAGING_DIR)/usr \
36 --with-png=$(STAGING_DIR)/usr \
37 --without-xpm
38
39 CONFIGURE_VARS += \
40 LIBPNG12_CONFIG="$(STAGING_DIR)/usr/bin/libpng12-config"
41
42 TARGET_CFLAGS += $(FPIC)
43
44 define Build/Compile
45 $(MAKE) -C $(PKG_BUILD_DIR) \
46 DESTDIR="$(PKG_INSTALL_DIR)" \
47 all install
48 endef
49
50 define Build/InstallDev
51 mkdir -p $(1)/usr/bin
52 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdlib-config $(1)/usr/bin/
53 mkdir -p $(1)/usr/include
54 $(CP) $(PKG_INSTALL_DIR)/usr/include/entities.h $(1)/usr/include/
55 $(CP) $(PKG_INSTALL_DIR)/usr/include/gd{,_io,cache,fontg,fontl,fontmb,fonts,fontt,fx}.h \
56 $(1)/usr/include/
57 mkdir -p $(1)/usr/lib
58 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.{a,so*} $(1)/usr/lib/
59 $(SED) 's,-I$$$${prefix}/include,,g' $(1)/usr/bin/gdlib-config
60 endef
61
62 define Package/libgd/install
63 $(INSTALL_DIR) $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgd.so.* $(1)/usr/lib/
65 endef
66
67 $(eval $(call BuildPackage,libgd))