1 ################################################################################
5 ################################################################################
8 GD_SOURCE = libgd-$(GD_VERSION).tar.xz
9 GD_SITE = https://bitbucket.org/libgd/gd-libgd/downloads
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
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"
24 ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
25 GD_DEPENDENCIES += fontconfig
26 GD_CONF_OPTS += --with-fontconfig
29 ifeq ($(BR2_PACKAGE_FREETYPE),y)
30 GD_DEPENDENCIES += freetype
31 GD_CONF_OPTS += --with-freetype=$(STAGING_DIR)/usr
33 GD_CONF_OPTS += --without-freetype
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"
43 ifeq ($(BR2_PACKAGE_JPEG),y)
44 GD_DEPENDENCIES += jpeg
45 GD_CONF_OPTS += --with-jpeg
48 ifeq ($(BR2_PACKAGE_LIBPNG),y)
49 GD_DEPENDENCIES += libpng
50 GD_CONF_OPTS += --with-png
52 GD_CONF_OPTS += --without-png
55 ifeq ($(BR2_PACKAGE_WEBP),y)
56 GD_DEPENDENCIES += webp
57 GD_CONF_OPTS += --with-webp
59 GD_CONF_OPTS += --without-webp
62 ifeq ($(BR2_PACKAGE_TIFF),y)
63 GD_DEPENDENCIES += tiff
64 GD_CONF_OPTS += --with-tiff
66 GD_CONF_OPTS += --without-tiff
69 ifeq ($(BR2_PACKAGE_XLIB_LIBXPM),y)
70 GD_DEPENDENCIES += xlib_libXpm
71 GD_CONF_OPTS += --with-xpm
74 ifeq ($(BR2_PACKAGE_ZLIB),y)
75 GD_DEPENDENCIES += zlib
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
91 define GD_REMOVE_TOOLS
92 rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(GD_TOOLS_))
95 GD_POST_INSTALL_TARGET_HOOKS += GD_REMOVE_TOOLS
97 $(eval $(autotools-package))