2023-01-18 02:39:25 +03:00
|
|
|
distributable:
|
2023-05-08 18:17:44 +03:00
|
|
|
url: https://ftp.gnu.org/gnu/mpfr/mpfr-{{ version.raw }}.tar.gz
|
2023-01-18 02:39:25 +03:00
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
versions:
|
2023-05-08 18:17:44 +03:00
|
|
|
url: https://ftp.gnu.org/gnu/mpfr/
|
|
|
|
match: /mpfr-\d+\.\d+(\.\d+)?\.tar\.gz/
|
|
|
|
strip:
|
|
|
|
- /mpfr-/
|
|
|
|
- /.tar.gz/
|
2023-01-18 02:39:25 +03:00
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
gnu.org/gmp: '>=4.2'
|
|
|
|
script: |
|
|
|
|
./configure --prefix={{ prefix }}
|
|
|
|
make --jobs {{ hw.concurrency }} install
|
|
|
|
test:
|
|
|
|
make test
|
|
|
|
|
|
|
|
test:
|
|
|
|
dependencies:
|
|
|
|
gnu.org/gmp: '>=4.2'
|
|
|
|
script: |
|
|
|
|
mv $FIXTURE test.c
|
|
|
|
gcc -lgmp -lmpfr test.c -o test
|
|
|
|
test $(./test) = '{{version}}'
|
|
|
|
fixture: |
|
|
|
|
#include <mpfr.h>
|
|
|
|
#include <math.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
mpfr_t x, y;
|
|
|
|
mpfr_inits2 (256, x, y, NULL);
|
|
|
|
mpfr_set_ui (x, 2, MPFR_RNDN);
|
|
|
|
mpfr_rootn_ui (y, x, 2, MPFR_RNDN);
|
|
|
|
mpfr_pow_si (x, y, 4, MPFR_RNDN);
|
|
|
|
mpfr_add_si (y, x, -4, MPFR_RNDN);
|
|
|
|
mpfr_abs (y, y, MPFR_RNDN);
|
|
|
|
if (fabs(mpfr_get_d (y, MPFR_RNDN)) > 1.e-30) abort();
|
|
|
|
printf("%s", mpfr_get_version());
|
|
|
|
return 0;
|
|
|
|
}
|