1 ################################################################################
5 ################################################################################
8 GD_SOURCE
= libgd-
$(GD_VERSION
).
tar.xz
9 GD_SITE
= https
://github.com
/libgd
/libgd
/releases
/download
/gd-
$(GD_VERSION
)
10 GD_INSTALL_STAGING
= YES
11 GD_LICENSE
= GD license
12 GD_LICENSE_FILES
= COPYING
13 GD_CONFIG_SCRIPTS
= gdlib-config
14 GD_CONF_OPTS
= --without-x
--disable-rpath
--disable-werror
15 GD_DEPENDENCIES
= host-pkgconf
17 # gd forgets to link utilities with -pthread even though it uses
18 # pthreads, causing linking errors with static linking
19 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS
),y
)
20 GD_CONF_ENV
+= LDFLAGS
="$(TARGET_LDFLAGS) -pthread"
23 ifeq ($(BR2_PACKAGE_FONTCONFIG
),y
)
24 GD_DEPENDENCIES
+= fontconfig
25 GD_CONF_OPTS
+= --with-fontconfig
28 ifeq ($(BR2_PACKAGE_FREETYPE
),y
)
29 GD_DEPENDENCIES
+= freetype
30 GD_CONF_OPTS
+= --with-freetype
=$(STAGING_DIR
)/usr
32 GD_CONF_OPTS
+= --without-freetype
35 ifeq ($(BR2_PACKAGE_LIBICONV
),y
)
36 GD_DEPENDENCIES
+= libiconv
37 # not strictly needed for gd, but ensures -liconv ends up in
38 # gdlib-config --libs output
39 GD_CONF_ENV
+= LIBS
="-liconv"
42 ifeq ($(BR2_PACKAGE_JPEG
),y
)
43 GD_DEPENDENCIES
+= jpeg
44 GD_CONF_OPTS
+= --with-jpeg
47 ifeq ($(BR2_PACKAGE_LIBPNG
),y
)
48 GD_DEPENDENCIES
+= libpng
49 GD_CONF_OPTS
+= --with-png
51 GD_CONF_OPTS
+= --without-png
54 ifeq ($(BR2_PACKAGE_WEBP
),y
)
55 GD_DEPENDENCIES
+= webp
56 GD_CONF_OPTS
+= --with-webp
58 GD_CONF_OPTS
+= --without-webp
61 ifeq ($(BR2_PACKAGE_TIFF
),y
)
62 GD_DEPENDENCIES
+= tiff
63 GD_CONF_OPTS
+= --with-tiff
65 GD_CONF_OPTS
+= --without-tiff
68 ifeq ($(BR2_PACKAGE_XLIB_LIBXPM
),y
)
69 GD_DEPENDENCIES
+= xlib_libXpm
70 GD_CONF_OPTS
+= --with-xpm
73 ifeq ($(BR2_PACKAGE_ZLIB
),y
)
74 GD_DEPENDENCIES
+= zlib
77 GD_TOOLS_
$(BR2_PACKAGE_GD_ANNOTATE
) += annotate
78 GD_TOOLS_
$(BR2_PACKAGE_GD_BDFTOGD
) += bdftogd
79 GD_TOOLS_
$(BR2_PACKAGE_GD_GD2COPYPAL
) += gd2copypal
80 GD_TOOLS_
$(BR2_PACKAGE_GD_GD2TOGIF
) += gd2togif
81 GD_TOOLS_
$(BR2_PACKAGE_GD_GD2TOPNG
) += gd2topng
82 GD_TOOLS_
$(BR2_PACKAGE_GD_GDCMPGIF
) += gdcmpgif
83 GD_TOOLS_
$(BR2_PACKAGE_GD_GDPARTTOPNG
) += gdparttopng
84 GD_TOOLS_
$(BR2_PACKAGE_GD_GDTOPNG
) += gdtopng
85 GD_TOOLS_
$(BR2_PACKAGE_GD_GIFTOGD2
) += giftogd2
86 GD_TOOLS_
$(BR2_PACKAGE_GD_PNGTOGD
) += pngtogd
87 GD_TOOLS_
$(BR2_PACKAGE_GD_PNGTOGD2
) += pngtogd2
88 GD_TOOLS_
$(BR2_PACKAGE_GD_WEBPNG
) += webpng
90 define GD_REMOVE_TOOLS
91 rm -f
$(addprefix $(TARGET_DIR
)/usr
/bin
/,$(GD_TOOLS_
))
94 GD_POST_INSTALL_TARGET_HOOKS
+= GD_REMOVE_TOOLS
96 $(eval
$(autotools-package
))