From 67c2e73f5b9973193a9d96dfb787165f7a5f705f Mon Sep 17 00:00:00 2001 From: miqlas Date: Sat, 2 Sep 2017 08:33:37 +0200 Subject: [PATCH] Google Benchmark: new recipe (#1615) --- dev-libs/benchmark/benchmark-1.2.0.recipe | 71 +++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 dev-libs/benchmark/benchmark-1.2.0.recipe diff --git a/dev-libs/benchmark/benchmark-1.2.0.recipe b/dev-libs/benchmark/benchmark-1.2.0.recipe new file mode 100644 index 000000000..0edb7ce93 --- /dev/null +++ b/dev-libs/benchmark/benchmark-1.2.0.recipe @@ -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 +}