2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2003-02-15 13:36:32 +01:00
|
|
|
#
|
|
|
|
# grep
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2003-02-15 13:36:32 +01:00
|
|
|
|
2019-01-15 19:16:25 +01:00
|
|
|
GREP_VERSION = 3.3
|
2010-12-17 17:24:10 +01:00
|
|
|
GREP_SITE = $(BR2_GNU_MIRROR)/grep
|
2012-01-24 17:29:07 +01:00
|
|
|
GREP_SOURCE = grep-$(GREP_VERSION).tar.xz
|
2017-03-30 15:43:33 +02:00
|
|
|
GREP_LICENSE = GPL-3.0+
|
2012-09-07 06:48:53 +02:00
|
|
|
GREP_LICENSE_FILES = COPYING
|
2017-07-04 12:25:08 +02:00
|
|
|
GREP_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
|
2020-02-04 14:14:41 +01:00
|
|
|
# install into /bin like busybox grep
|
|
|
|
GREP_CONF_OPTS = --exec-prefix=/
|
2003-02-15 13:36:32 +01:00
|
|
|
|
2020-02-04 15:24:47 +01:00
|
|
|
ifeq ($(BR2_SYSTEM_BIN_SH_NONE),y)
|
|
|
|
|
|
|
|
define GREP_REMOVE_ALIAS
|
|
|
|
$(RM) $(TARGET_DIR)/bin/[fe]grep
|
|
|
|
endef
|
|
|
|
GREP_POST_INSTALL_TARGET_HOOKS += GREP_REMOVE_ALIAS
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
# ensure egrep/fgrep shell wrappers use #!/bin/sh
|
|
|
|
define GREP_FIXUP_SHEBANG
|
|
|
|
$(SED) 's/bash$$/sh/' $(TARGET_DIR)/bin/[fe]grep
|
|
|
|
endef
|
|
|
|
GREP_POST_INSTALL_TARGET_HOOKS += GREP_FIXUP_SHEBANG
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2010-12-25 22:33:20 +01:00
|
|
|
# link with iconv if enabled
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBICONV),y)
|
|
|
|
GREP_CONF_ENV += LIBS=-liconv
|
|
|
|
GREP_DEPENDENCIES += libiconv
|
|
|
|
endif
|
|
|
|
|
2014-01-09 13:12:29 +01:00
|
|
|
# link with pcre if enabled
|
|
|
|
ifeq ($(BR2_PACKAGE_PCRE),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
GREP_CONF_OPTS += --enable-perl-regexp
|
2014-01-09 13:12:29 +01:00
|
|
|
GREP_DEPENDENCIES += pcre
|
2017-07-24 05:59:53 +02:00
|
|
|
else
|
|
|
|
GREP_CONF_OPTS += --disable-perl-regexp
|
2014-01-09 13:12:29 +01:00
|
|
|
endif
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|