Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

155.4. pari-2.17.4

Number theory and arbitrary-precision arithmetic, at a prompt

2.17.4-1 · GPL-2.0-or-later · 2.4 SBU · 18.8 MiB, 73 files · 41_system, 739 of 1047 · ports/core/math/pari

Homepage: https://pari.math.u-bordeaux.fr/

Why it is in KDOS. The comment above it in script/phases/41_system/packages.d/math.txt:

PARI answers exact integer and number-theoretic questions; maxima answers symbolic ones. Neither substitutes for the other.

Depends on: gmp, readline, perl.

Required by: no port names it.

Sources: pari-2.17.4.tar.gz (5.1 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install pari'

build.sh:

export CFLAGS="${CFLAGS/-O2/-O3}"
DLLDFLAGS="$LDFLAGS" ./Configure --prefix=/usr --with-gmp --with-readline --graphic=svg --mt=pthread
make gp
make DESTDIR=$PKG RUNPTH_FINAL= install-doctex install-nodata install-data

install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/pari-gp.desktop" <<'EOF'
[Desktop Entry]
Type=Application
Name=PARI/GP
GenericName=Number Theory Calculator
Comment=Exact arithmetic and number theory at a prompt
Exec=gp
Icon=accessories-calculator
Terminal=true
Categories=Education;Science;Math;
Keywords=math;number;theory;prime;factor;pari;gp;calculator;
EOF
chmod 644 "$PKG/usr/share/applications/pari-gp.desktop"

Programs: gp, gp-2.17, gphelp, tex2mail.

Libraries: libpari-gmp-tls.so, libpari.so.

Directories: /usr/include/pari, /usr/lib/pari, /usr/share/licenses/pari, /usr/share/pari.