]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Build mpdecimal from source to workaround unreliable launchpad.net (#149248)
authorHugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Fri, 1 May 2026 18:39:36 +0000 (21:39 +0300)
committerGitHub <noreply@github.com>
Fri, 1 May 2026 18:39:36 +0000 (18:39 +0000)
.github/workflows/posix-deps-apt.sh

index 7994a01ee4624ed7afdc96aec316b160fb4eb100..6201e719ca87de6c2ea458b4fbb219d0382a0895 100755 (executable)
@@ -26,9 +26,16 @@ apt-get -yq --no-install-recommends install \
     xvfb \
     zlib1g-dev
 
-# Workaround missing libmpdec-dev on ubuntu 24.04:
-# https://launchpad.net/~ondrej/+archive/ubuntu/php
-# https://deb.sury.org/
-sudo add-apt-repository ppa:ondrej/php
-apt-get update
-apt-get -yq --no-install-recommends install libmpdec-dev
+# Workaround missing libmpdec-dev on ubuntu 24.04 by building mpdecimal
+# from source. ppa:ondrej/php (launchpad.net) are unreliable 
+# (https://status.canonical.com) so fetch the tarball directly
+# from the upstream host.
+# https://www.bytereef.org/mpdecimal/
+MPDECIMAL_VERSION=4.0.1
+curl -fsSL "https://www.bytereef.org/software/mpdecimal/releases/mpdecimal-${MPDECIMAL_VERSION}.tar.gz" \
+    | tar -xz -C /tmp
+(cd "/tmp/mpdecimal-${MPDECIMAL_VERSION}" \
+    && ./configure --prefix=/usr/local \
+    && make -j"$(nproc)" \
+    && make install)
+ldconfig