Merge pull request #3813 from NeoRaider/hostpkg
[feed/packages.git] / libs / libgd / Makefile
1 #
2 # Copyright (C) 2006-2015 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:=libgd
11 PKG_VERSION:=2.1.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=gd-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://github.com/libgd/libgd/archive
16 PKG_MD5SUM:=e91a1a99903e460e7ba00a794e72cc1e
17 PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
18 PKG_LICENSE:=MIT
19
20 PKG_FIXUP:=autoreconf
21
22 PKG_INSTALL:=1
23 PKG_BUILD_PARALLEL:=1
24 PKG_BUILD_DIR:=$(BUILD_DIR)/libgd-gd-$(PKG_VERSION)
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libgd
29 SECTION:=libs
30 CATEGORY:=Libraries
31 DEPENDS:=+libjpeg +libpng
32 TITLE:=The GD graphics library
33 URL:=http://www.libgd.org/
34 endef
35
36 define Package/libgd/description
37 GD is an open source code library for the dynamic creation of images by
38 programmers. GD creates PNG, JPEG and GIF images, among other formats.
39 endef
40
41 TARGET_CFLAGS += $(FPIC)
42
43 CONFIGURE_ARGS += \
44 --enable-shared \
45 --enable-static \
46 --disable-rpath \
47 --without-x \
48 --without-fontconfig \
49 --without-freetype \
50 --with-jpeg=$(STAGING_DIR)/usr \
51 --with-png=$(STAGING_DIR)/usr \
52 --with-vpx=no \
53 --without-xpm \
54 --without-iconv
55
56 CONFIGURE_VARS += \
57 LIBPNG12_CONFIG="$(STAGING_DIR_HOSTPKG)/bin/libpng12-config" \
58 ac_cv_header_iconv_h=no
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))