PKGNAME=grep
PKGSEC=utils
PKGDES="A pattern-based string searcher"
PKGDEP="glibc libsigsegv pcre2"
BUILDDEP="texinfo gperf"

# FIXME: Possibly mis-packaged gnulib.
#
# configure:9031: error: possibly undefined macro: gl_ANYTHREADLIB_EARLY
#       If this token and others are legitimate, please use m4_pattern_allow.
#       See the Autoconf documentation.
# configure:17568: error: possibly undefined macro: gl_PTHREADLIB
# configure:17681: error: possibly undefined macro: gl_WEAK_SYMBOLS
# configure:19621: error: possibly undefined macro: gl_TYPE_WINT_T_PREREQ
#
# Similar issues linked below.
#
# Link: https://www.openembedded.org/pipermail/openembedded-commits/2017-July/209707.html
# Link: https://lists.nongnu.org/archive/html/nano-devel/2024-05/msg00012.html
RECONF=0

AUTOTOOLS_AFTER="--enable-largefile \
                 --enable-year2038 \
                 --enable-threads=posix \
                 --enable-assert \
                 --disable-rpath \
                 --enable-nls \
                 --enable-perl-regexp \
                 --with-libsigsegv \
                 --without-included-regex"

AB_FLAGS_O3=1

PKGESS=1

# Needed by Afterglow, whereas FAIL_ARCH defaults to mainline-only.
FAIL_ARCH="!(mainline|retro)"
