xref: /OK3568_Linux_fs/buildroot/package/libiconv/libiconv.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# libiconv
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunLIBICONV_VERSION = 1.15
8*4882a593SmuzhiyunLIBICONV_SITE = $(BR2_GNU_MIRROR)/libiconv
9*4882a593SmuzhiyunLIBICONV_INSTALL_STAGING = YES
10*4882a593SmuzhiyunLIBICONV_LICENSE = GPL-3.0+ (iconv program), LGPL-2.0+ (library)
11*4882a593SmuzhiyunLIBICONV_LICENSE_FILES = COPYING COPYING.LIB
12*4882a593Smuzhiyun
13*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBICONV_EXTRA_ENCODINGS),y)
14*4882a593SmuzhiyunLIBICONV_CONF_OPTS = --enable-extra-encodings
15*4882a593Smuzhiyunendif
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun# Don't build the preloadable library, as we don't need it (it's only
18*4882a593Smuzhiyun# for LD_PRELOAD to replace glibc's iconv, but we never build libiconv
19*4882a593Smuzhiyun# when glibc is used). And it causes problems for static only builds.
20*4882a593Smuzhiyundefine LIBICONV_DISABLE_PRELOAD
21*4882a593Smuzhiyun	$(SED) '/preload/d' $(@D)/Makefile.in
22*4882a593Smuzhiyunendef
23*4882a593SmuzhiyunLIBICONV_PRE_CONFIGURE_HOOKS += LIBICONV_DISABLE_PRELOAD
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun$(eval $(autotools-package))
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun# Configurations where the toolchain supports locales and the libiconv
28*4882a593Smuzhiyun# package is enabled are incorrect, because the toolchain already
29*4882a593Smuzhiyun# provides libiconv functionality, and having both confuses packages.
30*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBICONV)$(BR2_ENABLE_LOCALE),yy)
31*4882a593Smuzhiyun$(error Libiconv should never be enabled when the toolchain supports locales. Report this failure to Buildroot developers)
32*4882a593Smuzhiyunendif
33