| 1 | # Contributor: Grigory Kirillov <[email protected]> |
| 2 | # Contributor: Celeste <[email protected]> |
| 3 | maintainer="Achill Gilgenast <[email protected]>" |
| 4 | pkgname=fast_float |
| 5 | pkgver=8.3.0 |
| 6 | pkgrel=0 |
| 7 | _tests=088643e8d5010bd3d1540fe48685601b43b9a3e5 |
| 8 | pkgdesc="Fast implementation of the C++ from_chars functions for float and double types" |
| 9 | url="https://github.com/fastfloat/fast_float" |
| 10 | arch="noarch" |
| 11 | license="Apache-2.0 OR MIT" |
| 12 | makedepends="cmake samurai" |
| 13 | checkdepends="doctest-dev" |
| 14 | source="https://github.com/fastfloat/fast_float/archive/v$pkgver/fast_float-$pkgver.tar.gz |
| 15 | https://github.com/fastfloat/supplemental_test_files/archive/$_tests/fast_float-tests-$_tests.tar.gz |
| 16 | " |
| 17 | |
| 18 | prepare() { |
| 19 | default_prepare |
| 20 | |
| 21 | mkdir -p builddir/_deps |
| 22 | mv "$srcdir"/supplemental_test_files-$_tests \ |
| 23 | builddir/_deps/supplemental_test_files-src |
| 24 | } |
| 25 | |
| 26 | build() { |
| 27 | cmake -B builddir -G Ninja \ |
| 28 | -DCMAKE_INSTALL_PREFIX=/usr \ |
| 29 | -DCMAKE_INSTALL_DATAROOTDIR=/usr/lib \ |
| 30 | -DCMAKE_BUILD_TYPE=Release \ |
| 31 | -DFASTFLOAT_TEST="$(want_check && echo ON || echo OFF)" \ |
| 32 | -DSYSTEM_DOCTEST=ON \ |
| 33 | -DFETCHCONTENT_FULLY_DISCONNECTED=ON |
| 34 | cmake --build builddir |
| 35 | } |
| 36 | |
| 37 | check() { |
| 38 | ctest --test-dir builddir |
| 39 | } |
| 40 | |
| 41 | package() { |
| 42 | DESTDIR="$pkgdir" cmake --install builddir |
| 43 | } |
| 44 | |
| 45 | sha512sums=" |
| 46 | ea56dc378bd9880346fca9a8c686ab1907a78be4e9637facb0da5eb05f4a729216c0145ca760478db94bfa3636ed61d4a699540fc0eab106de352c579ad19aff fast_float-8.3.0.tar.gz |
| 47 | 34d7c01cb036f5317507fac72f5c7d41f11aacc3d87c102068fbc849e77637a1955c2313a02347dfebc60b85cf831a3274af5639919d7683bd8e19ef5c66a86c fast_float-tests-088643e8d5010bd3d1540fe48685601b43b9a3e5.tar.gz |
| 48 | " |