0eb957758b
First of two patches to fix http://autobuild.buildroot.net/results/238/2386edb7f95920e84a35811a33f4333ee0a7a860/ gd links against libiconv if it is already built, depend on libiconv to get reproducable builds. readelf output without libiconv present: $ output/host/opt/ext-toolchain/bfin-linux-uclibc/bin/bfin-linux-uclibc-readelf \ -a output/staging/usr/lib/libgd.a | grep iconv 15: 00000000 12 FUNC GLOBAL HIDDEN 1 _iconv_open 16: 0000000c 12 FUNC GLOBAL HIDDEN 1 _iconv 17: 00000018 12 FUNC GLOBAL HIDDEN 1 _iconv_close readelf output with libiconv present: $ output/host/opt/ext-toolchain/bfin-linux-uclibc/bin/bfin-linux-uclibc-readelf \ -a output/staging/usr/lib/libgd.a | grep iconv 000000e4 0000100a R_BFIN_PCREL24 00000000 _libiconv_open + 0 00000140 0000140a R_BFIN_PCREL24 00000000 _libiconv + 0 0000019a 0000160a R_BFIN_PCREL24 00000000 _libiconv_close + 0 16: 00000000 0 NOTYPE GLOBAL DEFAULT UND _libiconv_open 20: 00000000 0 NOTYPE GLOBAL DEFAULT UND _libiconv 22: 00000000 0 NOTYPE GLOBAL DEFAULT UND _libiconv_close [Peter: also add to LIBS so it ends up in gdlib-config --libs output] Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
84 lines
2.2 KiB
Makefile
84 lines
2.2 KiB
Makefile
################################################################################
|
|
#
|
|
# gd
|
|
#
|
|
################################################################################
|
|
|
|
GD_VERSION = 2.1.0
|
|
GD_SOURCE = libgd-$(GD_VERSION).tar.xz
|
|
GD_SITE = https://bitbucket.org/libgd/gd-libgd/downloads
|
|
GD_INSTALL_STAGING = YES
|
|
GD_LICENSE = GD license
|
|
GD_LICENSE_FILES = COPYING
|
|
|
|
GD_CONFIG_SCRIPTS = gdlib-config
|
|
GD_CONF_OPTS = --without-x --disable-rpath
|
|
GD_DEPENDENCIES = host-pkgconf
|
|
|
|
# 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
|
|
|
|
ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
|
|
GD_DEPENDENCIES += fontconfig
|
|
GD_CONF_OPTS += --with-fontconfig
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_FREETYPE),y)
|
|
GD_DEPENDENCIES += freetype
|
|
GD_CONF_OPTS += --with-freetype=$(STAGING_DIR)/usr
|
|
else
|
|
GD_CONF_OPTS += --without-freetype
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBICONV),y)
|
|
GD_DEPENDENCIES += libiconv
|
|
# not strictly needed for gd, but ensures -liconv ends up in
|
|
# gdlib-config --libs output
|
|
GD_CONF_ENV += LIBS="-liconv"
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_JPEG),y)
|
|
GD_DEPENDENCIES += jpeg
|
|
GD_CONF_OPTS += --with-jpeg
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBPNG),y)
|
|
GD_DEPENDENCIES += libpng
|
|
GD_CONF_OPTS += --with-png
|
|
else
|
|
GD_CONF_OPTS += --without-png
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_XLIB_LIBXPM),y)
|
|
GD_DEPENDENCIES += xlib_libXpm
|
|
GD_CONF_OPTS += --with-xpm
|
|
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))
|