diff -ruN pari-2.11.4-orig/doc/appa.tex pari-2.11.4/doc/appa.tex --- pari-2.11.4-orig/doc/appa.tex 2020-03-25 06:58:26.000000000 -0500 +++ pari-2.11.4/doc/appa.tex 2020-04-24 21:23:59.000000000 -0500 @@ -505,7 +505,7 @@ gprc first. (Unless you tampered with this via Configure, \kbd{datadir} is \kbd{\$prefix/share/pari}.) If you have superuser privileges and want to provide system-wide defaults, copy your customized \kbd{.gprc} file to -\kbd{/etc/gprc}. +\kbd{@FINK@/etc/gprc}. In older versions, \kbd{gphelp} was hidden in pari lib directory and was not meant to be used from the shell prompt, but not anymore. If gp complains it diff -ruN pari-2.11.4-orig/doc/gp.1 pari-2.11.4/doc/gp.1 --- pari-2.11.4-orig/doc/gp.1 2020-03-25 06:58:26.000000000 -0500 +++ pari-2.11.4/doc/gp.1 2020-04-24 21:24:14.000000000 -0500 @@ -184,7 +184,7 @@ shell. A default gprc .I gprc.dft is provided with the distribution. If this file cannot be found, -.I /etc/gprc +.I @FINK@/etc/gprc is checked instead. .TP @@ -218,7 +218,7 @@ .TP .I $GPRC place to look for the user's preference file (gprc); if the file does not exist, -we then check in $HOME/.gprc, /etc/gprc, and finally for a file named 'gprc' +we then check in $HOME/.gprc, @FINK@/etc/gprc, and finally for a file named 'gprc' in PARI's .B datadir. diff -ruN pari-2.11.4-orig/doc/usersch2.tex pari-2.11.4/doc/usersch2.tex --- pari-2.11.4-orig/doc/usersch2.tex 2020-03-25 06:58:26.000000000 -0500 +++ pari-2.11.4/doc/usersch2.tex 2020-04-24 21:24:32.000000000 -0500 @@ -3071,7 +3071,7 @@ \kbd{\$HOME\bs gprc.txt} on a DOS, OS/2, or Windows system. \noindent\item If no gprc was found among the user files mentioned above -we look for \kbd{/etc/gprc} for a system-wide gprc file (you will need root +we look for \kbd{@FINK@/etc/gprc} for a system-wide gprc file (you will need root privileges to set up such a file yourself). \noindent\item Finally, we look in pari's \kbd{datadir} for a file named diff -ruN pari-2.11.4-orig/emacsen-install pari-2.11.4/emacsen-install --- pari-2.11.4-orig/emacsen-install 1969-12-31 18:00:00.000000000 -0600 +++ pari-2.11.4/emacsen-install 2020-04-24 21:22:39.000000000 -0500 @@ -0,0 +1,33 @@ +#!/bin/sh +# @FINK@/lib/emacsen-common/packages/install/pari-gp +set -e + +FLAVOR=$1 +echo install/pari-gp: Handling install of emacsen flavor ${FLAVOR} + +byte_compile_options="-batch -f batch-byte-compile" +el_files="pari.el pari-*.el sli-tools.el" +el_dir=@FINK@/share/emacs/site-lisp/pari +elc_dir=@FINK@/share/${FLAVOR}/site-lisp/pari +el_path_list="${el_dir}/pari.el ${el_dir}/pari-*.el ${el_dir}/sli-tools.el" +elc_path_list="${elc_dir}/pari.el ${elc_dir}/pari-*.el ${elc_dir}/sli-tools.el" + +if [ ${FLAVOR} != emacs ] +then + echo install/pari-gp: byte-compiling for ${FLAVOR} + + # Create the directory + mkdir -p ${elc_dir} + + # Copy the temp .el files + cp ${el_path_list} ${elc_dir} + + # Byte compile them + ${FLAVOR} ${byte_compile_options} ${elc_path_list} + + # remove the redundant .el files + # presumes that any .el files in the dir are trash. + rm ${elc_dir}/*.el +fi +exit 0; + diff -ruN pari-2.11.4-orig/emacsen-remove pari-2.11.4/emacsen-remove --- pari-2.11.4-orig/emacsen-remove 1969-12-31 18:00:00.000000000 -0600 +++ pari-2.11.4/emacsen-remove 2020-04-24 21:22:39.000000000 -0500 @@ -0,0 +1,13 @@ +#!/bin/sh +# @FINK@/lib/emacsen-common/packages/remove/pari-gp +set -e + +FLAVOR=$1 +echo remove/pari-gp: Handling removal of emacsen flavor ${FLAVOR} + +if [ ${FLAVOR} != emacs ] +then + echo emacsen-common: purging byte-compiled files for ${FLAVOR} + rm -f @FINK@/share/${FLAVOR}/site-lisp/pari/*.elc +fi +exit 0; diff -ruN pari-2.11.4-orig/misc/gprc.dft pari-2.11.4/misc/gprc.dft --- pari-2.11.4-orig/misc/gprc.dft 2020-03-25 06:58:26.000000000 -0500 +++ pari-2.11.4/misc/gprc.dft 2020-04-24 21:25:32.000000000 -0500 @@ -1,7 +1,7 @@ /* SAMPLE GP INIT FILE. * * Customize (by uncommenting and modifying the relevant lines) and put in - * $HOME/.gprc (or $GPRC) or /etc/gprc. Syntax is explained at the end. */ + * $HOME/.gprc (or $GPRC) or @FINK@/etc/gprc. Syntax is explained at the end. */ \\ Read ~/.gprc.gp (GP script) before gp prompts you for commands. \\ read "~/.gprc.gp" @@ -92,7 +92,7 @@ \\ READL is readline available? \\ VERSION {<,>,<=,>=} a.b.c does version number satisfy the inequality? \\ -\\ This file should be put in $HOME/.gprc or /etc/gprc and contains: +\\ This file should be put in $HOME/.gprc or @FINK@/etc/gprc and contains: \\ * references to gp scripts that are to be run BEFORE the first gp prompt. \\ \\ Syntax: read "filename" (quotes mandatory; ~ syntax for homedir allowed) diff -ruN pari-2.11.4-orig/src/language/gplib.c pari-2.11.4/src/language/gplib.c --- pari-2.11.4-orig/src/language/gplib.c 2020-03-25 06:58:26.000000000 -0500 +++ pari-2.11.4/src/language/gplib.c 2020-04-24 21:24:48.000000000 -0500 @@ -804,7 +804,7 @@ f = gprc_chk(str); /* in $HOME */ if (!f) f = gprc_chk(s); /* in . */ #ifndef _WIN32 - if (!f) f = gprc_chk("/etc/gprc"); + if (!f) f = gprc_chk("@FINK@/etc/gprc"); #else if (!f) /* in basedir */ {