2012-11-27 19:42:49 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# gd
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2021-03-07 12:27:35 +01:00
|
|
|
GD_VERSION = 2.3.2
|
2014-04-13 08:12:56 +02:00
|
|
|
GD_SOURCE = libgd-$(GD_VERSION).tar.xz
|
2016-06-26 22:54:11 +02:00
|
|
|
GD_SITE = https://github.com/libgd/libgd/releases/download/gd-$(GD_VERSION)
|
2012-11-27 19:42:49 +01:00
|
|
|
GD_INSTALL_STAGING = YES
|
|
|
|
GD_LICENSE = GD license
|
|
|
|
GD_LICENSE_FILES = COPYING
|
2021-03-02 14:59:09 +01:00
|
|
|
GD_CPE_ID_VENDOR = libgd
|
|
|
|
GD_CPE_ID_PRODUCT = libgd
|
2017-01-03 15:42:52 +01:00
|
|
|
GD_CONF_OPTS = --without-x --disable-rpath --disable-werror
|
2014-11-25 15:52:09 +01:00
|
|
|
GD_DEPENDENCIES = host-pkgconf
|
2012-11-27 19:42:49 +01:00
|
|
|
|
2021-08-14 22:43:34 +02:00
|
|
|
# 0001-fix-read-out-of-bands-in-reading-tga-header-file.patch
|
|
|
|
GD_IGNORE_CVES += CVE-2021-38115
|
|
|
|
|
2014-10-27 00:52:45 +01:00
|
|
|
# gd forgets to link utilities with -pthread even though it uses
|
|
|
|
# pthreads, causing linking errors with static linking
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
|
|
|
GD_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -pthread"
|
|
|
|
endif
|
|
|
|
|
2012-11-27 19:42:49 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
|
|
|
|
GD_DEPENDENCIES += fontconfig
|
2014-09-27 21:32:44 +02:00
|
|
|
GD_CONF_OPTS += --with-fontconfig
|
2012-12-04 21:47:19 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_FREETYPE),y)
|
|
|
|
GD_DEPENDENCIES += freetype
|
2014-09-27 21:32:44 +02:00
|
|
|
GD_CONF_OPTS += --with-freetype=$(STAGING_DIR)/usr
|
2013-01-18 22:00:47 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
GD_CONF_OPTS += --without-freetype
|
2012-11-27 19:42:49 +01:00
|
|
|
endif
|
|
|
|
|
2014-11-29 21:54:36 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBICONV),y)
|
|
|
|
GD_DEPENDENCIES += libiconv
|
2021-01-23 23:06:52 +01:00
|
|
|
# not strictly needed for gd, but ensures -liconv ends up in gdlib.pc
|
2021-04-27 20:53:47 +02:00
|
|
|
GD_CONF_ENV += LIBS_PRIVATES="-liconv"
|
2014-11-29 21:54:36 +01:00
|
|
|
endif
|
|
|
|
|
2012-11-27 19:42:49 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_JPEG),y)
|
|
|
|
GD_DEPENDENCIES += jpeg
|
2014-09-27 21:32:44 +02:00
|
|
|
GD_CONF_OPTS += --with-jpeg
|
2012-11-27 19:42:49 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBPNG),y)
|
|
|
|
GD_DEPENDENCIES += libpng
|
2014-11-25 15:54:46 +01:00
|
|
|
GD_CONF_OPTS += --with-png
|
2013-01-18 05:55:41 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
GD_CONF_OPTS += --without-png
|
2012-11-27 19:42:49 +01:00
|
|
|
endif
|
|
|
|
|
2015-04-10 19:22:11 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_WEBP),y)
|
|
|
|
GD_DEPENDENCIES += webp
|
|
|
|
GD_CONF_OPTS += --with-webp
|
2015-04-10 19:22:10 +02:00
|
|
|
else
|
2015-04-10 19:22:11 +02:00
|
|
|
GD_CONF_OPTS += --without-webp
|
2015-04-10 19:22:10 +02:00
|
|
|
endif
|
|
|
|
|
2015-01-10 15:25:24 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_TIFF),y)
|
|
|
|
GD_DEPENDENCIES += tiff
|
|
|
|
GD_CONF_OPTS += --with-tiff
|
|
|
|
else
|
|
|
|
GD_CONF_OPTS += --without-tiff
|
|
|
|
endif
|
|
|
|
|
2012-11-27 19:42:49 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_XLIB_LIBXPM),y)
|
|
|
|
GD_DEPENDENCIES += xlib_libXpm
|
2014-09-27 21:32:44 +02:00
|
|
|
GD_CONF_OPTS += --with-xpm
|
2012-11-27 19:42:49 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
|
|
GD_DEPENDENCIES += zlib
|
|
|
|
endif
|
|
|
|
|
|
|
|
GD_TOOLS_$(BR2_PACKAGE_GD_ANNOTATE) += annotate
|
|
|
|
GD_TOOLS_$(BR2_PACKAGE_GD_BDFTOGD) += bdftogd
|
|
|
|
GD_TOOLS_$(BR2_PACKAGE_GD_GD2COPYPAL) += gd2copypal
|
|
|
|
GD_TOOLS_$(BR2_PACKAGE_GD_GD2TOGIF) += gd2togif
|
|
|
|
GD_TOOLS_$(BR2_PACKAGE_GD_GD2TOPNG) += gd2topng
|
|
|
|
GD_TOOLS_$(BR2_PACKAGE_GD_GDCMPGIF) += gdcmpgif
|
|
|
|
GD_TOOLS_$(BR2_PACKAGE_GD_GDPARTTOPNG) += gdparttopng
|
|
|
|
GD_TOOLS_$(BR2_PACKAGE_GD_GDTOPNG) += gdtopng
|
|
|
|
GD_TOOLS_$(BR2_PACKAGE_GD_GIFTOGD2) += giftogd2
|
|
|
|
GD_TOOLS_$(BR2_PACKAGE_GD_PNGTOGD) += pngtogd
|
|
|
|
GD_TOOLS_$(BR2_PACKAGE_GD_PNGTOGD2) += pngtogd2
|
|
|
|
GD_TOOLS_$(BR2_PACKAGE_GD_WEBPNG) += webpng
|
|
|
|
|
|
|
|
define GD_REMOVE_TOOLS
|
|
|
|
rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(GD_TOOLS_))
|
|
|
|
endef
|
|
|
|
|
|
|
|
GD_POST_INSTALL_TARGET_HOOKS += GD_REMOVE_TOOLS
|
|
|
|
|
|
|
|
$(eval $(autotools-package))
|