= pari =

== Description ==

PARI/GP is a widely used computer algebra system designed for fast
computations in number theory (factorizations, algebraic number
theory, elliptic curves...), but also contains a large number of other
useful functions to compute with mathematical entities such as
matrices, polynomials, power series, algebraic numbers etc., and a lot
of transcendental functions. PARI is also available as a C library to
allow for faster computations.

Originally developed by Henri Cohen and his co-workers (Université
Bordeaux I, France), PARI is now under the GPL and maintained by Karim
Belabas with the help of many volunteer contributors.

Website: http://pari.math.u-bordeaux.fr/

== License ==

GPL version 2+

== SPKG Maintainers ==
 * Robert Bradshaw
 * William Stein
 * David Kirkby
 * Jeroen Demeyer

== Upstream Contact ==
 * Karim Belabas, http://www.math.u-bordeaux.fr/~belabas/
 * pari-dev@list.cr.yp.to

== Dependencies ==
 * MPIR (in place of GMP)
 * Readline
 * Termcap
 * GNU patch (shipped with Sage)

== Special Update/Build Instructions ==

See patches/README.txt for a list of patches.

Most of the building of a new version of the PARI spkg is automated
in the script spkg-src.  Normally, the following should work.  In case
of doubt, have a look at the file spkg-src.

  0) Edit the line "git checkout pari-2.5.5".

  1) ./spkg-src
     This will download the git sources to the directory parigit/
     and will also download galdata.tgz and ellsea-small.tgz.
     Then, a src/ directory will be created.
     WARNING: This script will remove any existing src/ directory.
     NOTES: The script ./spkg-src will actually compile PARI/GP, but
     the compiled files are not used for the spkg.  We only need a few
     files, in particular those created by bison.
     Running spkg-src should be done on a reasonably standard machine
     on which PARI/GP compiles out of the box.

  2) Check that everything is okay somehow.  In particular, look at
     patches/README.txt

  3) rm -rf parigit
     The directory parigit contains a git repository for the PARI sources.
     When making this package just for testing, you can keep the parigit
     directory.  However, it should not be there in a final version.

  4) cd ..; sage --spkg pari-version-name

== Changelog ==

=== pari-2.5.5.p1 (Jeroen Demeyer, 12 November 2013) ===
 * Trac #15402: add patch q_eint1.patch

=== pari-2.5.5.p0 (Jeroen Demeyer, 2 October 2013) ===
 * Trac #15250: upgrade to version 2.5.5.

=== pari-2.5.4.p0 (Jeroen Demeyer, 13 May 2013) ===
 * Trac #14539: upgrade to version 2.5.4.
 * Improve documentation of patches.

=== pari-2.5.3.p3 (Jeroen Demeyer, 31 January 2013) ===
 * Trac #13054: polred.patch: fix polred() bug.
 * Trac #6743: remove Cygwin-specific hacks from spkg-install.

=== pari-2.5.3.p2 (Jeroen Demeyer, 7 January 2013) ===
 * Trac #13921: KERNELCFLAGS.patch: when SAGE_DEBUG=yes, compile mp.c
   with -O1 (and without -funroll-loops) to avoid a segmentation fault
   on some OS X systems.
 * Rename PARI_EXTRA_OPTS to PARI_CONFIGURE (consistent with other
   packages).
 * Trac #13863: galoisanalysis_p4.patch: fix a segmentation fault
   under Electric Fence.

=== pari-2.5.3.p1 (Jeroen Demeyer, 3 January 2013) ===
 * Trac #13902: add a patch (backported from upstream PARI 2.6.0)
   for integer determinants.

=== pari-2.5.3.p0 (Jeroen Demeyer, 5 October 2012) ===
 * Trac #13534: upgrade to version 2.5.3
 * Remove upstreamed patch rootpol.patch

=== pari-2.5.2.p2 (Jean-Pierre Flori, 30 September 2012) ===
 * Trac #13333: add upstream patch to copy libpari.dll.a on Cygwin.

=== pari-2.5.2.p1 (Paul Zimmermann, 28 August 2012) ===
 * Trac #13314: add upstream patch rootpol.patch for rootpol().

=== pari-2.5.2.p0 (Jeroen Demeyer, 1 August 2012) ===
 * Trac #13320: upgrade to version 2.5.2
 * Rename spkg-make to spkg-src
 * Remove various upstreamed patches:
    - pari_1302.patch
    - pari_1304.patch
    - reorder_init_opts.patch

=== pari-2.5.1.p3 (Jeroen Demeyer, 20 March 2012) ===
 * Trac #12638: add upstream patch pari_1304.patch for issquarefree(0),
   see http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1304

=== pari-2.5.1.p2 (Jeroen Demeyer, 13 March 2012) ===
 * Trac #12638: add upstream patch pari_1302.patch for ispower(),
   see http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1302
 * Apply all patches at -p1 level instead of -p0 (just like most other
   Sage packages).

=== pari-2.5.1.p1 (Jeroen Demeyer, 7 March 2012) ===
 * Trac #12638: add patch GCC_PR49330.patch to work around a bug
   in gcc-4.6.3 on OS X 10.4 PPC.

=== pari-2.5.1.p0 (Jeroen Demeyer, 11 February 2012) ===
 * Trac #12363: upgrade to PARI 2.5.1.
 * Use git instead of svn in spkg-make to obtain the PARI sources.
 * Remove upstreamed patch osx_13318_13330.patch.

=== pari-2.5.0.p3 (Jeroen Demeyer, 20 December 2011) ===
 * Trac #12158: add reorder_init_opts.patch such that warnings
   during pari_init_opts() do not cause segfaults.

=== pari-2.5.0.p2 (Jeroen Demeyer, 26 July 2011) ===
 * Trac #11130: update to PARI stable version 2.5.0, which is
   equal to svn version 13228.
 * Moving to this upstream version fixes #10195, #10767, #11604.
 * Remove all previous upstream patches.
 * Add current working directory "." to default path in gprc.expect.
 * Add patches osx_13318_13330.patch from upstream to fix linking on
   Mac OS X.

=== pari-2.4.3.alpha.p7 (Leif Leonhardy, July 16th, 2011) ===
 * Trac #11605: Fix typo in spkg-install and add `exit 1` (again) in
   case the build fails.
 * Quote some more variables and filenames in messages.

=== pari-2.4.3.alpha.p6 (Dima Pasechnik, 22 April, 2011) ===
 * Trac #10240: made a proper check for libpari.dll on Cygwin.

=== pari-2.4.3.alpha.p5 (Jeroen Demeyer, January 23th, 2011) ===
 * Avoid parallel "make install" because of race conditions.
 * Remove Makefile_mv.patch because it doesn't actually fix the race
   conditions in "make install".

=== pari-2.4.3.alpha.p4 (Jeroen Demeyer, January 11th, 2011) ===
 * Trac #10430 (fixing also #9620, #10279, #10369, #10559)
 * Use `patch` to apply patches (at -p0 level because this is how svn
   gives the diffs).
 * Apply patches for PARI bugs 1084, 1132, 1141, 1143, 1144.
 * Move all comments about the patches to patches/README.txt
 * Simplify the "install" part of spkg-install by doing "make install"
   instead of copying everything by hand.  This requires a small patch
   to config/Makefile.SH (install_doc_no_make.patch) to ensure that
   "make install-doc" does not build the documentation.
 * Add patch Makefile_mv.patch to fix race condition in parallel make
   install, see
   http://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=1148
 * Add patch perl_path.patch to change first line of all perl scripts
   to "#!/usr/bin/env perl" (#10559).
 * Add src/desc/pari.desc after config/get_MANIFEST in spkg-make to
   remove build-time dependency on perl

=== pari-2.4.3.alpha.p0 (Jeroen Demeyer, November 4th, 2010) ===
 * Update to PARI 2.4.3 (by using SVN revision 12623).  Note that the
   PARI developers consider version 2.4.3 to be an "alpha" version with
   the idea that 2.4.4 might be a "beta" version and 2.5 will then be
   the "stable" version.
 * Removed patch for gphelp.in which is now upstream
 * Removed patch for paripriv.h because of an upstream change removing
   the need for the patch
 * Rebased patch for config/get_fltk

=== pari-2.4.3.svn-12577.p9 (Jeroen Demeyer, September 24th, 2010) ===
 * Add gprc.expect file to be installed in $SAGE_LOCAL/etc
 * Remove $detex = 1; from gphelp.in patch

=== pari-2.4.3.svn-12577.p7 (Jeroen Demeyer, September 17th, 2010) ===
 * Add -fno-common to DLCFLAGS on all Darwin systems instead of
   PPC/PPC64 only.
 * Add upstream fix for rnfequation(,,1) over Q

=== pari-2.4.3.svn-12577.p6 (Jeroen Demeyer, September 11th, 2010) ===
 * Add upstream fix for config/get_dlcflags and remove the patch
 * Add upstream fix for bnfinit() and the rnfkummer test
 * Instead of patching Configure, force bash in spkg-install

=== pari-2.4.3.svn-12577.p5 (Leif Leonhardy, Jeroen Demeyer, September 5th, 2010) ===
 * Added patches to:
   - config/get_config_options:
     * Make invalid arguments to "--graphic" a "Configure" error
       (rather than potentially running into *compilation* errors
       later).
   - config/get_fltk: (see also/ported from #9722)
     * Add libstdc++ to the libraries (to support Fedora 13 et al.).
     * Also check the presence of the FLTK include directory to
       prevent compilation errors on broken installations.
   - config/get_X11: (see also/ported from #9722)
     * Also search */lib64/* directories when doing a 64-bit build.
     * Give more specific messages.
 * Slightly extended existing patch to src/kernel/gmp/mp.c:
   - Allow disabling PARI's use of "GMP internals" by preprocessor
     directive (i.e. by adding "-DPARI_DONT_USE_GMP_INTERNALS" to
     CFLAGS). Brief explanation added.
 * spkg-install:
   - Don't override user-specified CFLAGS (w.r.t. optimization, unless
     SAGE_DEBUG=yes).
   - Handle PARI_EXTRA_OPTS properly, and print informative messages
     (regarding graphics support for plotting).
   - Recognize SAGE_TUNE_PARI in addition to SAGE_TUNE_pari, and
     add "--tune" to PARI_EXTRA_OPTS if self-tuning was requested.
   - Clear/unset lots of (environment) variables used by PARI that might
     unintentionally get their values from user settings.
   - Quote *all* occurrences of SAGE_LOCAL (and some other expressions).
   - Use $UNAME instead of `uname` everywhere, use "elif ...".
   - *Always* use $MAKE (changed for "install-data").
   - Begin all error messages with "Error".
   - Removed useless tests of $? at end.
   - Some clean-up (typos, formatting); some comments, some messages added.
 * spkg-check:
   - Use $MAKE instead of "make".
   - Don't override user-specified CFLAGS (w.r.t. optimization, unless
     SAGE_DEBUG=yes).
   - Begin error message with "Error".
   - Some clean-up.
 * Slight corrections to SPKG.txt.
 * Updated patches/README.txt, some cosmetic changes.
 * Remove patch for config/Makefile.SH and add upstream fix instead
   in spkg-make.
 * Add upstream fix for src/test/tune.c which should fix tuning.
 * Add -O0 to CFLAGS in spkg-make to speed up compiling (the output of
   the compiling is not used anyway).

=== pari-2.4.3.svn-12577.p4 (Jeroen Demeyer, August 22, 2010) ===
 * Change "test -e" to "test -f" for Solaris.
 * Configure using "#!/usr/bin/env bash" instead of "#!/bin/sh"

=== pari-2.4.3.svn-12577.p3 (Jeroen Demeyer, August 21, 2010) ===
 * Cosmetic changes

=== pari-2.4.3.svn-12577.p2 (Jeroen Demeyer, August 17, 2010) ===
 * Patch get_dlcflags on Darwin

=== pari-2.4.3.svn-12577 (Jeroen Demeyer, August 5, 2010) ===

=== pari-2.4.3.svn-12546 (Jeroen Demeyer, July 25, 2010) ===
 * Removed the non-existent get_dlld patching.
 * Cleaned up patches/README.txt

=== pari-2.4.3.svn.p7 (Jeroen Demeyer, July 23, 2010) ===
 * pari 2.4.3 version svn 12543
 * Remove patches for get_cc, get_dlcflags, get_kernel, get_dlld

=== pari-2.4.3.svn.p6 (Jeroen Demeyer, July 22, 2010) ===
 * pari 2.4.3 version svn 12541
 * Added spkg-make script to automate building of this spkg
 * Changed patch logic in spkg-install
 * Add patches for PARI bug 1079

=== pari-2.4.3.svn.p5 (John Cremona July 13, 2010) ===
 * pari 2.4.3 version svn 12541
 * adds spkg-check by David Kirkby

=== pari-2.4.3.svn.p1, p2, p3, p4 (Robert Bradshaw and William Stein,
June 26, 2010; John Cremona July 13, 2010) ===
 * Major new version
 * p4 contains pari 2.4.3 version svn 12534

=== pari-2.3.5.p1 (Mike Hansen, May 25th, 2010) ===
 * Do the same fix for Cygwin that we do on Solaris.

=== pari-2.3.5.p0 (Georg S. Weber, May 2nd, 2010 ===
 * restore resp. correct the file patches/get_dlld
   (there seems to have been a copy'n'paste issue w.r.t. pari-2.3.3.p8)
   so that pari is buildable (again) as a dynamical library on Mac OS
   (fixes trac ticket #8837, see there for more details)

=== pari-2.3.5 (Mike Hansen, March 5th, 2010 ===
 * Update to PARI 2.3.5
 * Removed the alglin2.c patch since it was included upstream.

=== pari-2.3.3.p8 (Jaap Spies, January 28th 2010) ===
 * Added 64 bit support for Open Solaris x64
 * This is trac http://trac.sagemath.org/sage_trac/ticket/8099

=== pari-2.3.3.p7 (David Kirkby, January 12th 2010) ===
 * #7901 Changes $MKDIR to 'mkdir' in the spkg-install file.
 * #7738 Removed Michael Abshoff as a maintainer.
 * Corrected the date on the previous entry - (it was
   previously marked as 2009.

=== pari-2.3.3.p6 (Mike Hansen, January 4th, 2010) ===
 * Fix on FreeBSD -- see #7825.

=== pari-2.3.3.p5 (David Kirkby, October 14th, 2009) ===
 * Removed the use of $CP, since it has been agreed there is no
   need for 'cp' to be specified as an environment variable
   and to just use the normal CP command. Likewise for 'rm'
 * Copied over a paripriv.h specific to Solaris, just as was done
   on OS X. This is trac #6579 which allows 'modified sage library code'
   to build on Solaris (SPARC) with no changes as long as the
   Sun compiler suite can not be found in the path. If that can
   be found, then the 'modified sage library code' will fail
   for a different reason (see #6595)

=== pari-2.3.3.p4 (???????????????????????????????????) ===

=== pari-2.3.3.p3 (???????????????????????????????????) ===

=== pari-2.3.3.p2 (Minh Van Nguyen, October 02nd, 2009) ===
 * Change optimization flag of src/config/get_cc from "-O3" to
   "-O1". This fixes a build issue on 32-bit Fedora 11. See ticket #7092.

=== pari-2.3.3.p1 (David Kirkby, June 30th, 2009)    ===
 * Change code in spkg-install which was supposed to add -fPIC on
   Solaris, to code that actually does add -fPIC on Solaris.
   Prior to this, PARI built fine on a Sun Blade 2000 without
   -fPIC, but failed on a Sun T5240 (hostname t2). I'm not
   entirely sure whether this is actually need on Solaris x86
   or not - GCC manual says SPARC (no mention of Solaris x86)
   but someone on comp.unxi.solaris reckons it should be on
   Solaris x86 too.

   Hopefully this issue can be resolved by the PARI developers and
   so the hack removed later. I'll report it to the PAPI developers.

   Thanks are due to Marc Glisse marc.glisse@gmail.com
   whose reply to my query on comp.unix.solaris solved this.

 * Corrected a mis-spelling on my name written by someone else.

=== pari-2.3.3.p0 (Michael Abshoff, Feb. 18th, 2008) ===
 * apply Karim's hnf patch
 * add OSX 10.5 64 bit build support

=== pari-2.3.3 (William Stein) ===
 * upgrade to the 2.3.3 release

=== pari-2.3.2 ===

* 2007-10-31: (Carl Witty)
   disable runpath altogether; we want Sage to be relocatable.
   install gphelp, and required documentation source files.

* 2007-09-09: (Michael Abshoff)
   add -fPIC to DCLFLAGS on Linux PPC in src/config/get_dlcflags

* 2007-03-04: included Pablo De Napoli (denapo@gmail.com)'s
   improvement so PARI will build on systems with runpath support.
   See sage/runpath.txt for details.

* 2006-09-28: (William Stein and Justin Walker)
  Modified PARI build scripts so that they build the
  PARI *shared* library even under OS X, and on OS X intel
  they build the x86/gmp kernel.


* I took the standard PARI tarball, but ran the script spkg-dist on it
  to create this directory.  This script does various things to some
  of the PARI files to make them work better with SAGE, the most
  important being to replace calls to exit() with calls to abort().

* Also, I placed a directory "sage" in this directory with some files
  needed by spkg-install.

* This changed removed -- 09/28/2006
#* I changed a line of config/Makefile.SH to
#      DLLDFLAGS  = $DLLDFLAGS -mimpure-text


* Put the extra galois groups data files in the data/galdata subdirectory,
