summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke <luke.wilde@live.co.uk>2021-07-28 18:32:44 +0100
committerAndreas Kling <kling@serenityos.org>2021-07-28 21:55:00 +0200
commit36af58c1875fb2718d5ab066d3f35cbb77bd54ec (patch)
tree0ed0387ec416f0a9779be45695264015631bbe61
parent6fe8d1da9783ce9c9f03fcb8092674092bd18539 (diff)
downloadserenity-36af58c1875fb2718d5ab066d3f35cbb77bd54ec.zip
Ports: Add MPFR
Required to build the toolchain inside Serenity.
-rw-r--r--Ports/AvailablePorts.md1
-rwxr-xr-xPorts/mpfr/package.sh11
-rw-r--r--Ports/mpfr/patches/config.sub.patch11
3 files changed, 23 insertions, 0 deletions
diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md
index 56ea118bcd..60857a6eea 100644
--- a/Ports/AvailablePorts.md
+++ b/Ports/AvailablePorts.md
@@ -92,6 +92,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`mawk`](mawk/) | mawk | 1.3.4-20200120 | https://invisible-island.net/mawk/ |
| [`mbedtls`](mbedtls/) | Mbed TLS | 2.16.2 | https://tls.mbed.org/ |
| [`milkytracker`](milkytracker/) | milkytracker | 1.03.00 | https://github.com/milkytracker/MilkyTracker |
+| [`mpfr`](mpfr/) | GNU Multiple Precision Floating-Point Reliable Library (MPFR) | 4.1.0 | https://www.mpfr.org/ |
| [`mrsh`](mrsh/) | mrsh | d9763a3 | https://mrsh.sh/ |
| [`mysthous`](mysthous/) | Hi-Res Adventure #1: Mystery House | 1.0 | https://www.scummvm.org/games/#games-hires1 |
| [`nano`](nano/) | GNU nano | 5.8 | https://www.nano-editor.org/ |
diff --git a/Ports/mpfr/package.sh b/Ports/mpfr/package.sh
new file mode 100755
index 0000000000..9e6cc116f2
--- /dev/null
+++ b/Ports/mpfr/package.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env -S bash ../.port_include.sh
+port=mpfr
+version=4.1.0
+useconfigure=true
+configopts="--target=${SERENITY_ARCH}-pc-serenity --with-sysroot=/"
+files="https://ftpmirror.gnu.org/gnu/mpfr/mpfr-${version}.tar.xz mpfr-${version}.tar.xz
+https://ftpmirror.gnu.org/gnu/mpfr/mpfr-${version}.tar.xz.sig mpfr-${version}.tar.xz.sig
+https://ftpmirror.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg"
+auth_type="sig"
+auth_opts="--keyring ./gnu-keyring.gpg mpfr-${version}.tar.xz.sig"
+depends="gmp"
diff --git a/Ports/mpfr/patches/config.sub.patch b/Ports/mpfr/patches/config.sub.patch
new file mode 100644
index 0000000000..38de5314ec
--- /dev/null
+++ b/Ports/mpfr/patches/config.sub.patch
@@ -0,0 +1,11 @@
+--- mpfr-4.1.0/config.sub 2020-07-10 12:59:02.000000000 +0100
++++ mpfr-4.1.0.serenity/config.sub 2021-07-28 18:05:59.462525103 +0100
+@@ -1390,7 +1390,7 @@
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
+- | -midnightbsd*)
++ | -midnightbsd* | -serenity*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)