blob: 840c2695fef4c4eeb2c1a8045aca4f42aa31f778 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# Maintainer: Dominic Hamon <dma at hey dot com>
# Contributor: Erik Zenker <erikzenker at posteo dot de>
pkgname=benchmark-git
pkgver=v1.8.3.r0.g34411763
pkgrel=1
pkgdesc="A microbenchmark support library, by Google"
arch=('i686' 'x86_64')
url="https://github.com/google/benchmark"
license=('Apache')
depends=(gcc-libs gtest gmock)
makedepends=('cmake')
source=("${pkgname}::git+https://github.com/google/benchmark.git")
sha256sums=('SKIP')
prepare() {
cd "${srcdir}/${pkgname}"
sed -i "s|v0.0.0|v${pkgver}|g" "cmake/GetGitVersion.cmake"
mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=ON \
-DBENCHMARK_ENABLE_LTO=ON \
-DBENCHMARK_USE_BUNDLED_GTEST=OFF \
-DBENCHMARK_ENABLE_ASSEMBLY_TESTS=OFF
}
pkgver() {
cd "$pkgname"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "${srcdir}/${pkgname}/build"
make
}
check() {
cd "${srcdir}/${pkgname}/build"
make test
}
package() {
cd "${srcdir}/${pkgname}/build"
make DESTDIR="$pkgdir/" install
}
|