Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions extra/benchmark/APKBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Alpine Maintainer: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Narayana Murthy <nnarayanamurthy@qnx.com>
pkgname=benchmark
pkgver=1.9.4
pkgrel=0
pkgdesc="microbenchmark support library"
url="https://github.com/google/benchmark"
arch="all"
license="Apache-2.0"
makedepends="cmake doxygen gtest-dev ninja"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/google/benchmark/archive/v$pkgver.tar.gz"

build() {
export CFLAGS="$CFLAGS -Wno-unused-command-line-argument -Wno-sign-conversion"
export CXXFLAGS="$CXXFLAGS -Wno-unused-command-line-argument -Wno-sign-conversion"

cmake -B build \
-G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DBENCHMARK_ENABLE_ASSEMBLY_TESTS=OFF \
-DBENCHMARK_ENABLE_DOXYGEN=ON \
-DBENCHMARK_ENABLE_LTO=ON \
-DBENCHMARK_ENABLE_WERROR=OFF \
-DBENCHMARK_USE_BUNDLED_GTEST=OFF \
$_cmake_crossopts .
cmake --build build
}

check() {
cd build
ctest
}

package() {
DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
f9031f144a7deeed151d22676b50384c03e5bbd19b68dac9471e91e49c408b770158c5c325f58e6ac07437955fdab3f08aeee76ba7ca5f97d2b51f14f6782416 benchmark-1.9.4.tar.gz
"