Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 018e5fb9 authored by Vincent Lefèvre's avatar Vincent Lefèvre
Browse files

Updated versions Perl script.

parent 8a7e3aff
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,11 @@
# For packages only, similar information can be found on Repology:
# https://repology.org/project/mpfr/versions
# A Mozilla/5.0 User-Agent header is provided to avoid a "Forbidden" error
# with some websites, but for repology.org, this is the opposite! Note that
# this script is intended to be run manually from time to time, contrary to
# a usual robot.
# Usage: versions [ <site> ... ]
use strict;
......@@ -21,6 +26,7 @@ sub getvers ($$$;$)
if ($url ne $oldurl)
{
my $ua = LWP::UserAgent->new;
$ua->agent('Mozilla/5.0');
$ua->timeout(30);
my $response = $ua->get($url);
unless ($response->is_success)
......@@ -246,14 +252,15 @@ getvers "Microsoft vcpkg",
"https://raw.githubusercontent.com/microsoft/vcpkg/master/ports/mpfr/vcpkg.json",
qr!"version": "([-0-9.]+)"!;
# https://doc.sagemath.org/html/en/reference/spkg/mpfr.html
# cannot be used directly (fetch error).
getvers "SAGE (reference)",
"https://repology.org/project/mpfr/versions",
sub {
my @v = sort vsort ($file =~ m!<a href="https://doc.sagemath.org/html/en/reference/spkg/mpfr.html">([0-9.]+)</a>!g);
$v[$#v];
};
"https://doc.sagemath.org/html/en/reference/spkg/mpfr.html",
qr!package-version.txt:.*?>([0-9.]+)<!s;
# "https://repology.org/project/mpfr/versions",
# sub {
# my @v = sort vsort ($file =~ m!<a href="https://doc.sagemath.org/html/en/reference/spkg/mpfr.html">([0-9.]+)</a>!g);
# $v[$#v];
# };
getvers "SAGE (upstream)",
"http://www-ftp.lip6.fr/pub/math/sagemath/spkg/upstream/mpfr/index.html",
......@@ -266,4 +273,4 @@ getvers "Termux",
"https://packages.termux.dev/apt/termux-main/pool/main/libm/libmpfr/",
qr!libmpfr_([-0-9.a-z]+)_\S+\.deb!;
# $Id: versions 177518 2025-03-21 13:17:27Z vinc17/qaa $
# $Id: versions 177641 2025-03-25 11:28:01Z vinc17/cventin $
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment