testing/flint: upgrade to 2.9.0

This commit is contained in:
Grigory Kirillov 2022-10-22 02:40:22 +03:00 committed by alice
parent d8d8e77009
commit ea2cf6205d
2 changed files with 46 additions and 11 deletions

View File

@ -1,38 +1,51 @@
# Contributor: Alex Yam <alex@alexyam.com>
# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer: Alex Yam <alex@alexyam.com>
pkgname=flint
pkgver=2.7.1
pkgrel=1
pkgver=2.9.0
pkgrel=0
pkgdesc="C library in support of computations in number theory"
url="https://www.flintlib.org/"
arch="all"
# s390x: https://github.com/wbhart/flint2/issues/1184
arch="all !s390x"
license="LGPL-2.1-or-later"
makedepends="
cmake
gmp-dev
libntl-dev
mpfr-dev
blas-dev
openblas-dev
python3
samurai
"
subpackages="$pkgname-dev"
source="https://www.flintlib.org/flint-$pkgver.tar.gz"
source="https://www.flintlib.org/flint-$pkgver.tar.gz
fix-sdiv_qrnnd-test.patch"
build() {
cmake -B build \
-DCMAKE_BUILD_TYPE=None \
# Project uses cpu_set_t type extensively throughout the codebase
# and sometimes without defining _GNU_SOURCE.
# Patching all this seems too operose...
export CFLAGS="$CFLAGS -D_GNU_SOURCE"
cmake -G Ninja -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DWITH_NTL=ON \
-DBUILD_TESTING=ON
cmake --build build
}
check() {
cd build
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
ctest -j4 --output-on-failure --test-dir build
}
package() {
DESTDIR="$pkgdir" cmake --build build --target install
DESTDIR="$pkgdir" cmake --install build
}
sha512sums="abea97228e91089d82a9a44714e719064bef261c45f5f5b24700955bb841cc98a8182e04e6054fcbcaa3bd92f2f95a82bd5d168ec2171af6a58d4f71eb0a479a flint-2.7.1.tar.gz"
sha512sums="
e213f0d5b4d03195357253593b2e0c2f04ef07b1cc24b302ad0e995f92aa9e0fa8beb1709db58ed1fff039ea88b0ce2acda3b6123f61dcf11852399b74a71364 flint-2.9.0.tar.gz
092f9b035167c80d6f862c7bda278effe3c8321a4a606be5375a17c381ce46d5f2135f747594f6ebdf761d3f11604b1da46eaa650cda9034be46c17e48fad4f9 fix-sdiv_qrnnd-test.patch
"

View File

@ -0,0 +1,22 @@
From fb8ddbcc06afa2a8f25637032fbb8211f6c6c122 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Albin=20Ahlb=C3=A4ck?= <albin.ahlback@gmail.com>
Date: Fri, 20 May 2022 14:16:38 +0200
Subject: [PATCH] Fix bug in test code for GCC 12
---
test/t-sdiv_qrnnd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/t-sdiv_qrnnd.c b/test/t-sdiv_qrnnd.c
index 2e9822e848..2676903826 100644
--- a/test/t-sdiv_qrnnd.c
+++ b/test/t-sdiv_qrnnd.c
@@ -33,7 +33,7 @@ int main(void)
{
d = n_randtest_not_zero(state);
nh = n_randtest(state);
- } while ((FLINT_ABS(nh) >= FLINT_ABS(d)/2) || (nh == WORD_MIN));
+ } while ((nh == WORD_MIN) || (FLINT_ABS(nh) >= FLINT_ABS(d)/2));
nl = n_randtest(state);