The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Math::PariBuild - utility functions used during configuration of Math::Pari.

SYNOPSIS

  use Math::PariBuild;

DESCRIPTION

get_pari_version($dir)

extracts the version of GP/PARI given the build directory $dir; version is read from $$dir/config/version and has the form as in "2.3.1". Returns undef on failure.

pari_formatted_version($dir)

extracts the version of GP/PARI given the build directory $dir; version has the form as in "2003001" for version 2.3.1. Returns the directory name on failure.

find_pari_dir()

Returns the GP/PARI build directory, looking for it as a kid, sibling, or parent of the current directory. [Currently skips unsupported versions if supported versions are present - unless the directory is in the current directory.]

download_pari()

Using FTP connection, downloads the latest version of GP/PARI, and extracts it. Returns the GP/PARI build directory and the version in the format "2.3.1". [Currently skips versions 2.3.*]

Optional arguments: name of the tar file with GP/PARI source (undef OK), force download.

patches_for($version)

Returns patches appropriate for GP/PARI version $version (formatted as in 2.2.2).

patch_pari($dir [, $version])

Applies known necessary fixes to GP/PARI build directory $dir if needed.

Returns empty if no patching is needed, otherwise the string encoding return values of patch commands.

download_and_patch_pari()

Using FTP connection, downloads the latest version of GP/PARI, extracts it, and applies known necessary fixes if needed. Returns the GP/PARI build directory (in scalar context), otherwise the directory and the result of patching.

Same optional arguments as for download_pari().

make_pod($podfile, $gphelp_opt, $dir)

Makes POD documentation for functions in the PARI library. Converts the TeX file found in GP/PARI build directory $dir to POD using the given options for gphelp.

build_tests($dir)

Converts GP/PARI test files in GP/PARI build directory $dir to Perl test suite.

find_paricfg($dir)

Finds suitable (?) files paricfg.h in GP/PARI build directory $dir.

find_paricfg($dir, $do_configure)

Finds suitable (?) files paricfg.h in GP/PARI build directory $dir. If $do_configure is true, runs GP/PARI's Configure script to build one. Returns FALSE if paricfg.h needs to be build by Perl.

write_paricfg($formatted_version)

Writes PARI configuration file libPARI/paricfg.h. Returns hash with options found during the scan of the header files.

build_paricfg($dir, $do_configure)

Builds libPARI/paricfg.h either ourselves, or by looking for it in GP/PARI build directory $dir - and running GP/PARI's Configure script if needed. Returns hash with options found during the scan of the header files.

find_machine_architecture()

Returns the type of the processor of the current machine.

ep_codes_from_file($filename,%hash,%names)

Adds to the %hash the string interface descriptions corresponding to the numeric codes use in the file's entree array. %hash is indexed by by the numeric codes; the value are references to arrays with the corresponding string interface descriptions.

Adds to %names the list of name => code values.

ep_hash_report(%hash, %names, $fh)

Writes to $fh the diagnostic about problemes with the string interface descriptions corresponding to the numeric codes. If $fh is false, returns TRUE if no problem were found.

ep_in_version($version)

Updates the list of codes for the given version of GP/PARI (formatted as in 2002002).

code_C_translator()

Returns string for C code to translate code string to the interface number.

Due to a bug in C_constant(), need to translate '' to 9900 by hand outside of this subroutine.