The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / gd / gd.mk
1 ################################################################################
2 #
3 # gd
4 #
5 ################################################################################
6
7 GD_VERSION = 2.1.1
8 GD_SOURCE = libgd-$(GD_VERSION).tar.xz
9 GD_SITE = https://bitbucket.org/libgd/gd-libgd/downloads
10 GD_AUTORECONF = YES
11 GD_INSTALL_STAGING = YES
12 GD_LICENSE = GD license
13 GD_LICENSE_FILES = COPYING
14 GD_CONFIG_SCRIPTS = gdlib-config
15 GD_CONF_OPTS = --without-x --disable-rpath
16 GD_DEPENDENCIES = host-pkgconf
17
18 # gd forgets to link utilities with -pthread even though it uses
19 # pthreads, causing linking errors with static linking
20 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
21 GD_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -pthread"
22 endif
23
24 ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
25 GD_DEPENDENCIES += fontconfig
26 GD_CONF_OPTS += --with-fontconfig
27 endif
28
29 ifeq ($(BR2_PACKAGE_FREETYPE),y)
30 GD_DEPENDENCIES += freetype
31 GD_CONF_OPTS += --with-freetype=$(STAGING_DIR)/usr
32 else
33 GD_CONF_OPTS += --without-freetype
34 endif
35
36 ifeq ($(BR2_PACKAGE_LIBICONV),y)
37 GD_DEPENDENCIES += libiconv
38 # not strictly needed for gd, but ensures -liconv ends up in
39 # gdlib-config --libs output
40 GD_CONF_ENV += LIBS="-liconv"
41 endif
42
43 ifeq ($(BR2_PACKAGE_JPEG),y)
44 GD_DEPENDENCIES += jpeg
45 GD_CONF_OPTS += --with-jpeg
46 endif
47
48 ifeq ($(BR2_PACKAGE_LIBPNG),y)
49 GD_DEPENDENCIES += libpng
50 GD_CONF_OPTS += --with-png
51 else
52 GD_CONF_OPTS += --without-png
53 endif
54
55 ifeq ($(BR2_PACKAGE_WEBP),y)
56 GD_DEPENDENCIES += webp
57 GD_CONF_OPTS += --with-webp
58 else
59 GD_CONF_OPTS += --without-webp
60 endif
61
62 ifeq ($(BR2_PACKAGE_TIFF),y)
63 GD_DEPENDENCIES += tiff
64 GD_CONF_OPTS += --with-tiff
65 else
66 GD_CONF_OPTS += --without-tiff
67 endif
68
69 ifeq ($(BR2_PACKAGE_XLIB_LIBXPM),y)
70 GD_DEPENDENCIES += xlib_libXpm
71 GD_CONF_OPTS += --with-xpm
72 endif
73
74 ifeq ($(BR2_PACKAGE_ZLIB),y)
75 GD_DEPENDENCIES += zlib
76 endif
77
78 GD_TOOLS_$(BR2_PACKAGE_GD_ANNOTATE)     += annotate
79 GD_TOOLS_$(BR2_PACKAGE_GD_BDFTOGD)      += bdftogd
80 GD_TOOLS_$(BR2_PACKAGE_GD_GD2COPYPAL)   += gd2copypal
81 GD_TOOLS_$(BR2_PACKAGE_GD_GD2TOGIF)     += gd2togif
82 GD_TOOLS_$(BR2_PACKAGE_GD_GD2TOPNG)     += gd2topng
83 GD_TOOLS_$(BR2_PACKAGE_GD_GDCMPGIF)     += gdcmpgif
84 GD_TOOLS_$(BR2_PACKAGE_GD_GDPARTTOPNG)  += gdparttopng
85 GD_TOOLS_$(BR2_PACKAGE_GD_GDTOPNG)      += gdtopng
86 GD_TOOLS_$(BR2_PACKAGE_GD_GIFTOGD2)     += giftogd2
87 GD_TOOLS_$(BR2_PACKAGE_GD_PNGTOGD)      += pngtogd
88 GD_TOOLS_$(BR2_PACKAGE_GD_PNGTOGD2)     += pngtogd2
89 GD_TOOLS_$(BR2_PACKAGE_GD_WEBPNG)       += webpng
90
91 define GD_REMOVE_TOOLS
92         rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(GD_TOOLS_))
93 endef
94
95 GD_POST_INSTALL_TARGET_HOOKS += GD_REMOVE_TOOLS
96
97 $(eval $(autotools-package))