summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a699270ef1970fbbacd1cc06a7d4c3f7083b56af (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: kiasoc5 <kiasoc5 at tutanota dot com>
# Maintainer: benpiano800 <ben@poest.com>
pkgname=libcpufeatures
pkgver=0.9.0
pkgrel=1
pkgdesc="A cross-platform C library to retrieve CPU features (such as available instructions) at runtime."
url="https://github.com/google/cpu_features"
arch=(
  'i686'
  'x86_64'
)
license=(Apache)
depends=(
  'glibc'
)
makedepends=(
  'cmake'
  'git'
  'gtest'
)
provides=(
  "$pkgname=$pkgver"
)
conflicts=(
  "$pkgname"
  'libvolk'
)
source=(
  "git+https://github.com/google/cpu_features.git#tag=v${pkgver}"
)

sha256sums=(
  'SKIP'
)

build() {
  cmake -B build -S "${srcdir}/cpu_features" \
    -DCMAKE_INSTALL_PREFIX=/ \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_SHARED_LIBS=ON \
    -DBUILD_TESTING=OFF
  cmake --build build
}

package() {
  cd "${srcdir}/build"
  make DESTDIR="${pkgdir}" install
  install -Dm644 "${srcdir}/cpu_features/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}