PKGBUILDs/extra/benchmark/PKGBUILD

48 lines
1.3 KiB
Bash
Raw Normal View History

2020-07-09 00:45:16 +00:00
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
# Contributor: Philipp Claßen <philipp.classen@posteo.de>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - -DBENCHMARK_ENABLE_LTO=OFF
pkgname=benchmark
2024-05-24 22:43:08 +00:00
pkgver=1.8.4
2022-07-19 13:43:36 +00:00
pkgrel=1
2020-07-09 00:45:16 +00:00
pkgdesc="A microbenchmark support library"
arch=('x86_64')
url="https://github.com/google/benchmark"
2024-05-24 22:43:08 +00:00
license=('Apache-2.0')
2020-07-09 00:45:16 +00:00
depends=('gcc-libs')
makedepends=('cmake')
2024-05-24 22:43:08 +00:00
source=("https://github.com/google/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
"https://patch-diff.githubusercontent.com/raw/google/benchmark/pull/1793.patch")
sha256sums=('3e7059b6b11fb1bbe28e33e02519398ca94c1818874ebed18e504dc6f709be45'
'a064ca14bf086113c0eaae21a4f59f39e43e6291554b6d4985388e9553675bbb')
2020-07-09 00:45:16 +00:00
prepare() {
cd "$srcdir/$pkgname-$pkgver"
2024-05-24 22:43:08 +00:00
patch -p1 -i ../1793.patch
2020-07-09 00:45:16 +00:00
mkdir -p build
}
build() {
cd "$srcdir/$pkgname-$pkgver/build"
cmake \
-DCMAKE_BUILD_TYPE=None \
2023-07-16 18:15:39 +00:00
-DCMAKE_CXX_FLAGS="${CXXFLAGS} -DNDEBUG -Wno-error=restrict" \
2020-07-09 00:45:16 +00:00
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=ON \
-DBENCHMARK_ENABLE_LTO=OFF \
-DBENCHMARK_ENABLE_GTEST_TESTS=OFF \
..
2022-07-19 13:43:36 +00:00
make VERBOSE=1
2020-07-09 00:45:16 +00:00
}
package() {
cd "$srcdir/$pkgname-$pkgver/build"
make DESTDIR="$pkgdir/" install
}