![Thomas Petazzoni](/assets/img/avatar_default.png)
Even when locales are enabled, gettext is not mandatory to build grep, i.e the following defconfig builds fine: BR2_arm=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.02-1096-g54a5333.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_8=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y BR2_TOOLCHAIN_EXTERNAL_LOCALE=y BR2_TOOLCHAIN_EXTERNAL_CXX=y BR2_INIT_NONE=y BR2_SYSTEM_BIN_SH_NONE=y BR2_PACKAGE_GETTEXT=y BR2_PACKAGE_GREP=y However, if gettext provides libintl, it gets used. Therefore this commit moves gettext from a mandatory dependency to an optional dependency. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
38 lines
915 B
Makefile
38 lines
915 B
Makefile
################################################################################
|
|
#
|
|
# grep
|
|
#
|
|
################################################################################
|
|
|
|
GREP_VERSION = 3.0
|
|
GREP_SITE = $(BR2_GNU_MIRROR)/grep
|
|
GREP_SOURCE = grep-$(GREP_VERSION).tar.xz
|
|
GREP_LICENSE = GPL-3.0+
|
|
GREP_LICENSE_FILES = COPYING
|
|
GREP_CONF_OPTS = --disable-perl-regexp \
|
|
$(if $(BR2_TOOLCHAIN_USES_MUSL),--with-included-regex)
|
|
|
|
# Can use libintl if available
|
|
ifeq ($(BR2_PACKAGE_GETTEXT),y)
|
|
GREP_DEPENDENCIES += gettext
|
|
endif
|
|
|
|
# link with iconv if enabled
|
|
ifeq ($(BR2_PACKAGE_LIBICONV),y)
|
|
GREP_CONF_ENV += LIBS=-liconv
|
|
GREP_DEPENDENCIES += libiconv
|
|
endif
|
|
|
|
# link with pcre if enabled
|
|
ifeq ($(BR2_PACKAGE_PCRE),y)
|
|
GREP_CONF_OPTS += --enable-perl-regexp
|
|
GREP_DEPENDENCIES += pcre
|
|
endif
|
|
|
|
# Full grep preferred over busybox grep
|
|
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
|
|
GREP_DEPENDENCIES += busybox
|
|
endif
|
|
|
|
$(eval $(autotools-package))
|