mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-21 19:26:49 +02:00
"mpfr-current" points to the latest release, making all patch URLs invalid the moment a new release is cut; however, all versions also have a separate page where the patches should be available indefinitely
65 lines
1.8 KiB
Text
65 lines
1.8 KiB
Text
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=mpfr4
|
|
pkgver=4.2.1_p1
|
|
pkgrel=0
|
|
# strip p value, the patches are separate and are on https://www.mpfr.org/mpfr-current/
|
|
_pkgver="${pkgver%_p*}"
|
|
pkgdesc="multiple-precision floating-point library"
|
|
url="https://www.mpfr.org/"
|
|
arch="all"
|
|
license="LGPL-3.0-or-later"
|
|
makedepends_build="texinfo"
|
|
makedepends_host="gmp-dev"
|
|
makedepends="$makedepends_build $makedepends_host"
|
|
|
|
# mpfr is special because we cannot break ABI without first rebuild gcc.
|
|
# so we need be able to have multiple version of mpfr installed in parallel
|
|
# we also need be able to calculate bulid order from global scope, otherwise
|
|
# it is not possible to calculate build order til after package is built.
|
|
# Therfore we call -dev package mpfr-dev instead of mpfr4-dev with a
|
|
# provides=mpfr-dev
|
|
subpackages="$pkgname-doc mpfr-dev"
|
|
|
|
source="https://www.mpfr.org/mpfr-$_pkgver/mpfr-$_pkgver.tar.xz"
|
|
# generate url's to patches
|
|
_i=1
|
|
while [ $_i -le ${pkgver##*_p} ]; do
|
|
[ $_i -lt 10 ] && _pad="0" || _pad=
|
|
source="$source
|
|
mpfr-$_pkgver-patch$_pad$_i.patch::https://www.mpfr.org/mpfr-$_pkgver/patch$_pad$_i
|
|
"
|
|
_i=$(( _i + 1))
|
|
done
|
|
|
|
builddir="$srcdir/mpfr-$_pkgver"
|
|
|
|
provides="mpfr=$pkgver-r$pkgrel"
|
|
replaces="mpfr"
|
|
|
|
# secfixes:
|
|
# 4.2.1-r0:
|
|
# - CVE-2023-25139
|
|
|
|
build() {
|
|
./configure \
|
|
--build=$CBUILD \
|
|
--host=$CHOST \
|
|
--with-sysroot="$CBUILDROOT" \
|
|
--prefix=/usr \
|
|
--disable-maintainer-mode \
|
|
--enable-shared
|
|
make
|
|
}
|
|
|
|
check() {
|
|
make check
|
|
}
|
|
|
|
package() {
|
|
make DESTDIR="$pkgdir" install
|
|
}
|
|
|
|
sha512sums="
|
|
bc68c0d755d5446403644833ecbb07e37360beca45f474297b5d5c40926df1efc3e2067eecffdf253f946288bcca39ca89b0613f545d46a9e767d1d4cf358475 mpfr-4.2.1.tar.xz
|
|
c0d43424c722fcc22e4fa9cf0ab94d90db02e91d71528ef7a1bd1bb11745bdfb00f52f85975ddd7d927a1de633e2f4f0d7eadea2f2f02198d1fae5448f20d0c4 mpfr-4.2.1-patch01.patch
|
|
"
|