summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fc0816a87cd41eb8001fdce9a74e2ef056297b54 (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
# Maintainer: AdriĆ  Arrufat <swiftscythe AT gmail DOT com>
# Contributor: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=simdutf
pkgver=6.5.0
pkgrel=1
pkgdesc="Unicode validation and transcoding at billions of characters per second"
arch=('i686' 'x86_64')
url="https://simdutf.github.io/simdutf/"
license=('Apache-2.0' 'MIT')
depends=('gcc-libs')
makedepends=('git' 'cmake')
provides=("simdutf=$pkgver")
conflicts=('simdutf')
source=("git+https://github.com/simdutf/simdutf.git?tag=${pkgver}")
sha256sums=('SKIP')

build() {
  cd "simdutf"

  CFLAGS="$CFLAGS -ffat-lto-objects" \
  CXXFLAGS="$CXXFLAGS -ffat-lto-objects" \
  cmake \
    -B "_build" \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_SHARED_LIBS=ON \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DCMAKE_INSTALL_LIBDIR="lib" \
    -DSIMDUTF_TESTS=OFF \
    ./
  cmake --build "_build"
}

check() {
  cd "simdutf"

  cmake --build "_build" --target test
}

package() {
  cd "simdutf"

  DESTDIR="$pkgdir" cmake --install "_build"
  install -Dm644 "LICENSE-MIT" -t "$pkgdir/usr/share/licenses/simdutf"
}