mirror of
https://github.com/ivabus/pantry
synced 2024-11-30 04:05:06 +03:00
7dcc53658f
* add as much of gnu as we need to get gcc built * address code review
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
distributable:
|
|
url: https://ftp.gnu.org/gnu/mpfr/mpfr-{{ version.raw }}.tar.xz
|
|
strip-components: 1
|
|
|
|
versions:
|
|
#TODO HTML listing: https://ftp.gnu.org/gnu/mpfr/
|
|
- 4.1.1
|
|
|
|
build:
|
|
dependencies:
|
|
tea.xyz/gx/make: '*'
|
|
tea.xyz/gx/cc: c99
|
|
gnu.org/gmp: '>=4.2'
|
|
script: |
|
|
./configure --prefix={{ prefix }}
|
|
make --jobs {{ hw.concurrency }} install
|
|
test:
|
|
make test
|
|
|
|
test:
|
|
dependencies:
|
|
gnu.org/gmp: '>=4.2'
|
|
tea.xyz/gx/cc: c99
|
|
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;
|
|
}
|