0
0
Fork 0
haikuports/sys-apps/grep/grep-3.6.recipe

93 lines
2.1 KiB
Bash

SUMMARY="GNU regular expression matcher"
DESCRIPTION="The grep command searches one or more input files for lines \
containing a match to a specified pattern. By default, grep prints the \
matching lines."
HOMEPAGE="https://www.gnu.org/software/grep/"
COPYRIGHT="1992-2016 Free Software Foundation, Inc."
LICENSE="GNU GPL v3"
REVISION="2"
SOURCE_URI="http://ftp.gnu.org/gnu/grep/grep-$portVersion.tar.xz"
CHECKSUM_SHA256="667e15e8afe189e93f9f21a7cd3a7b3f776202f417330b248c2ad4f997d9373e"
PATCHES="grep-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2 ?arm"
SECONDARY_ARCHITECTURES="x86"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
grep$secondaryArchSuffix = $portVersion compat >= 3
cmd:egrep$commandSuffix = $portVersion compat >= 2
cmd:fgrep$commandSuffix = $portVersion compat >= 2
cmd:grep$commandSuffix = $portVersion compat >= 2
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libpcre$secondaryArchSuffix
"
if [ "$targetArchitecture" = x86_gcc2 ]; then
REPLACES="
grep
"
fi
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libiconv$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:libpcre$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:aclocal
cmd:autoconf
cmd:automake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:makeinfo
cmd:pkg_config$secondaryArchSuffix
"
defineDebugInfoPackage grep$secondaryArchSuffix \
$commandBinDir/grep
BUILD()
{
autoreconf -f -I m4
runConfigure --omit-dirs binDir ./configure \
--bindir=$commandBinDir \
--without-included-regex --disable-gcc-warnings
make $jobArgs
}
INSTALL()
{
make install
}
TEST()
{
# SKIPPED: big-hole, big-match, fmbtest, long-line-vs-2GiB-read, \
# long-pattern-perf, mb-non-UTF8-performance, pcre*, proc \
# turkish-eyes, write-error-msg, many-regex-performance
#
# TOTAL: 116
# PASS: 91
# SKIP: 23
# XFAIL: 2
# FAIL: 0
# XPASS: 0
# ERROR: 0
make check
}