time, new recipe (#11399)

This commit is contained in:
Schrijvers Luc
2024-12-03 07:23:22 +01:00
committed by GitHub
parent 6c35da89c1
commit 75344a6fe9

View File

@@ -0,0 +1,66 @@
SUMMARY="Measure CPU and memory resources"
DESCRIPTION="Time is a program that measures many of the CPU resources, such as time and \
memory, that other programs use. The GNU version can format the output in arbitrary ways by \
using a printf-style format string to include various resource measurements. Some systems do not \
provide much information about program resource use; time reports unavailable information as \
zero values."
HOMEPAGE="https://www.gnu.org/software/time/"
COPYRIGHT="2004-2023 Free Software Foundation, Inc."
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://ftp.gnu.org/gnu/time/time-$portVersion.tar.gz"
CHECKSUM_SHA256="fbacf0c81e62429df3e33bda4cee38756604f18e01d977338e23306a3e3b521e"
# disable gcc2 build in favor for newer gcc (tests fail with gcc2)
ARCHITECTURES="all ?x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
time$secondaryArchSuffix = $portVersion
cmd:time$commandSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:make
"
TEST_REQUIRES="
cmd:cmp
cmd:which
"
defineDebugInfoPackage time \
$commandBinDir/time
BUILD()
{
runConfigure --omit-dirs binDir ./configure \
--bindir=$commandBinDir
make $jobArgs
}
INSTALL()
{
make install
}
TEST()
{
make VERBOSE=1 check
}