SUMMARY="Basic directory searching utilities"
DESCRIPTION="
GNU Findutils are typically used in conjunction with other programs to \
provide modular and powerful directory search and file locating \
capabilities to other commands.
The tools supplied with this package are:
- find - search for files in a directory hierarchy
- locate - list files in databases that match a pattern
- updatedb - update a file name database
- xargs - build and execute command lines from a standard input.
"
HOMEPAGE="http://www.gnu.org/software/findutils"
COPYRIGHT="1994-2015 Free Software Foundation, Inc."
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://ftp.gnu.org/gnu/findutils/findutils-$portVersion.tar.xz"
CHECKSUM_SHA256="57127b7e97d91282c6ace556378d5455a9509898297e46e10443016ea1387164"
PATCHES="findutils-$portVersion.patchset"

ARCHITECTURES="all ?x86_gcc2"

PROVIDES="
	findutils = $portVersion compat >= 4
	cmd:find = $portVersion compat >= 4
	cmd:locate = $portVersion compat >= 4
	cmd:oldfind = $portVersion compat >= 4
	cmd:updatedb = $portVersion compat >= 4
	cmd:xargs = $portVersion compat >= 4
	"
REQUIRES="
	haiku
	lib:libiconv
	lib:libintl
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libiconv
	devel:libintl
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:awk
	cmd:find
	cmd:gcc
	cmd:ld
	cmd:make
	cmd:python
	cmd:sed
	"

defineDebugInfoPackage findutils \
	$binDir/find \
	$binDir/locate \
	$binDir/xargs

BUILD()
{
	autoreconf -vfi
	MAKEINFO=: runConfigure ./configure \
		--libexecdir=$libDir/findutils \
		--without-included-regex \
		--disable-rpath --with-gnu-ld
	make $jobArgs
}

INSTALL()
{
	make install
}

TEST()
{
	make check
}
