mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-17 01:00:06 +02:00
83 lines
1.8 KiB
Bash
83 lines
1.8 KiB
Bash
SUMMARY="A microbenchmark support library"
|
|
DESCRIPTION="A library to support the benchmarking of functions, similar to unit-tests."
|
|
HOMEPAGE="https://github.com/google/benchmark/"
|
|
COPYRIGHT="2015-2017 Google Benchmark developers"
|
|
LICENSE="Apache v2"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/google/benchmark/archive/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="f8e525db3c42efc9c7f3bc5176a8fa893a9a9920bbd08cef30fb56a51854d60d"
|
|
SOURCE_FILENAME="benchmark-$portVersion.tar.gz"
|
|
|
|
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
|
|
SECONDARY_ARCHITECTURES="!x86"
|
|
|
|
PROVIDES="
|
|
benchmark$secondaryArchSuffix = $portVersion
|
|
lib:libbenchmark$secondaryArchSuffix = 0.0.0 compat >= 0
|
|
lib:libbenchmark_main$secondaryArchSuffix = 0.0.0 compat >= 0
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
gtest$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
benchmark${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libbenchmark$secondaryArchSuffix = 0.0.0 compat >= 0
|
|
devel:libbenchmark_main$secondaryArchSuffix = 0.0.0 compat >= 0
|
|
"
|
|
REQUIRES_devel="
|
|
benchmark$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
gtest${secondaryArchSuffix}_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
defineDebugInfoPackage benchmark$secondaryArchSuffix \
|
|
"$libDir"/libbenchmark.so.0.0.0 \
|
|
"$libDir"/libbenchmark_main.so.0.0.0
|
|
|
|
BUILD()
|
|
{
|
|
mkdir -p build && cd build
|
|
|
|
cmake $cmakeDirArgs \
|
|
-DCMAKE_BUILD_TYPE='Release' \
|
|
-DBUILD_SHARED_LIBS:BOOL=ON \
|
|
..
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
cd build
|
|
make install
|
|
|
|
mkdir -p $includeDir
|
|
mv $prefix/include/* $includeDir/
|
|
rm -rf $prefix/include/
|
|
|
|
prepareInstalledDevelLibs libbenchmark libbenchmark_main
|
|
fixPkgconfig
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$developDir \
|
|
$libDir/cmake
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
cd build
|
|
make test
|
|
}
|