mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
Google Benchmark: new recipe (#1615)
This commit is contained in:
71
dev-libs/benchmark/benchmark-1.2.0.recipe
Normal file
71
dev-libs/benchmark/benchmark-1.2.0.recipe
Normal file
@@ -0,0 +1,71 @@
|
||||
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="3dcc90c158838e2ac4a7ad06af9e28eb5877cf28252a81e55eb3c836757d3070"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
PROVIDES="
|
||||
benchmark$secondaryArchSuffix = $portVersion
|
||||
lib:libbenchmark$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
benchmark${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libbenchmark$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES_devel="
|
||||
benchmark$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
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
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd build
|
||||
make test
|
||||
}
|
||||
Reference in New Issue
Block a user