Ticket #9860: trac_9860-patched_files_not_under_revision_control.p4-p5.spkg.diff

File trac_9860-patched_files_not_under_revision_control.p4-p5.spkg.diff, 13.3 KB (added by leif, 10 years ago)

Diff of files in patches/files. Apply with patch -p1 inside spkg directory.

  • patches/files/get_config_options

    diff -Nau pari-2.4.3.svn-12577.p4/patches/files/get_config_options pari-2.4.3.svn-12577.p5/patches/files/get_config_options
    old new  
     1# Processing Options
     2dflt_conf_file=pari.cfg
     3fastread=yes
     4config_file=
     5optimization=full
     6target_host=
     7which_graphic_lib=auto
     8readline_enabledp=nil
     9share_prefix=
     10prefix=/usr/local
     11test -n "$GP_INSTALL_PREFIX" && prefix="$GP_INSTALL_PREFIX"
     12
     13while test $# -gt 0; do
     14  case "$1" in
     15  -l|--load) shift; initfile=$1;
     16     cd "$TOP"
     17     PATH=.:$PATH; export PATH
     18     if test -z "$1";then
     19       tmp_host=`$config_dir/arch-osname`
     20       arch=`echo "$tmp_host" | sed -e 's/\(.*\)-.*/\1/'`
     21       osname=`echo "$tmp_host" | sed -e 's/.*-\(.*\)/\1/'`
     22       objdir=O$osname-$arch;
     23       initfile=$objdir/$dflt_conf_file;
     24     fi
     25     if test -d "$initfile"; then
     26       initfile="$initfile/pari.cfg"
     27     fi
     28     if test -r "$initfile"; then
     29       . $initfile
     30       if test ! -d $objdir; then mkdir $objdir; fi
     31       . $config_dir/get_tests # in case the test set have been changed
     32       . $config_dir/extract_files
     33       exit 0
     34     else
     35       echo "Cannot read config file \"$initfile\"." >&2
     36       exit 1
     37     fi;;
     38  -p|-prefix)   shift; prefix=$1;;
     39  --prefix=*|--prefi=*|--pref=*|--pre=*|--pr=*|--p=*)
     40               prefix=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
     41  --share-prefix=*)
     42               share_prefix=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
     43  --bindir=*) dfltbindir=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
     44  --datadir=*) dfltdatadir=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
     45  --includedir=*) dfltincludedir=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
     46  --libdir=*) dfltlibdir=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
     47  --mandir=*) dfltmandir=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
     48  --sysdatadir=*) dfltsysdatadir=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
     49  --time=*) timing_fun=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
     50  --host=*) target_host=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
     51  --kernel=*) kernel=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
     52  --tune) tune=yes;;
     53  --builddir) dfltobjdir=auto;;
     54  --builddir=*) dfltobjdir=`echo "$1" | sed -e 's/[-a-z]*=//'`;;
     55  -a|-ask|--ask)     fastread=no;;
     56  -g)          optimization=debugging;;
     57  -pg)         optimization=profiling;;
     58  -h|-help|--help|-\?)error=true;;
     59  -v|-verbhelp|--verbhelp)error=verb;;
     60  -s|--static) static=y;;
     61  -graphic|--graphic)
     62      shift; which_graphic_lib="$1"
     63      case "$which_graphic_lib" in
     64        auto|none|X11|qt|Qt|fltk|win32) ;;
     65        *) echo "*** Unrecognized graphic lib \"$which_graphic_lib.\"" >&2
     66           error=true;;
     67      esac;;
     68  --graphic=*|--graphi=*|--graph=*|--grap=*|--gra=*|--gr=*|--g=*)
     69      which_graphic_lib=`echo "$1" | sed -e 's/[-a-z]*=//'`
     70      case "$which_graphic_lib" in
     71        auto|none|X11|qt|Qt|fltk|win32) ;;
     72        *) echo "*** Unrecognized graphic lib \"$which_graphic_lib.\"" >&2
     73           error=true;;
     74      esac;;
     75
     76  --without-readline|--with-readline=no) without_readline=yes ;;
     77  --with-readline) with_readline=yes ;;
     78  --with-readline=*)
     79      with_readline=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
     80  --with-readline-lib=*)
     81      with_readline_lib=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
     82  --with-readline-include=*)
     83      with_readline_include=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
     84
     85  --without-gmp|--with-gmp=no) without_gmp=yes ;;
     86  --with-gmp) with_gmp=yes ;;
     87  --with-gmp=*)
     88      with_gmp=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
     89  --with-gmp-lib=*)
     90      with_gmp_lib=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
     91  --with-gmp-include=*)
     92      with_gmp_include=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
     93
     94  --with-ncurses-lib=*|--with-ncurses=*)
     95      with_ncurses_lib=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
     96
     97  --with-qt) with_qt=yes ;;
     98  --with-qt=*)
     99      with_qt=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
     100
     101  --with-fltk) with_fltk=yes ;;
     102  --with-fltk=*)
     103      with_fltk=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
     104  --enable-tls) enable_tls=yes;;
     105  --enable-tls=*) enable_tls=`echo "$1" | sed -e 's/[-a-z]*=//'` ;;
     106  --disable-tls) enable_tls=no;;
     107  *) echo "*** Unrecognized option $1." >&2; error=true;;
     108  esac
     109  shift
     110done
     111# Convert relative paths to absolute.
     112# Variables that can be set interactively should not be listed here,
     113# see get_install.
     114for i in with_readline with_readline_lib with_readline_include \
     115         with_gmp with_gmp_lib with_gmp_include \
     116         with_ncurses_lib with_qt with_fltk ; do
     117  eval "dflt=\"\$$i\""
     118  case $dflt in
     119    ''|yes|/*) ;;
     120            *) eval "$i='$TOP/$dflt'";;
     121  esac
     122done
     123# The behaviour of $prefix/lib --> '//lib' is implementation-dependent
     124case "$prefix" in /) prefix=;; esac
     125case "$share_prefix" in /) prefix=;; esac
     126
     127case "$error" in
     128true) cat >&2 <<EOT
     129Usage: Configure [-ask|-help|-g|-pg] [ --load <filename> ] [ --prefix=<dir> ]
     130
     131Options: some names can be abbreviated to one character (e.g -h = -help)
     132-a, --ask        interactive configuration
     133-h, --help       this message
     134-l, --load       skip Configure and specify a default config file
     135-s, --static     build static GP binary only
     136-v, --verbhelp   a longer help message
     137Build Options:
     138  --host=<arch-osname>  target achitecture
     139  --kernel=<kern>       kernel used
     140  --graphic=<gr>        graphic library used (none X11 qt Qt fltk win32 auto)
     141  --time=<fun>          timing function to use (getrusage times ftime)
     142  --builddir=<dir>      directory where the object files will be created
     143  --tune                tune the binary for compiling host (slow)
     144Additional developer options:
     145  -g              creates debugging version (in Oxxx.dbg)
     146  -pg             creates profiling version (in Oxxx.prf)
     147  --enable-tls    (*experimental*) enable thread-local stack
     148
     149Installation directories:
     150  --prefix=<dir>        install files in <dir> (default $prefix)
     151  --share-prefix=<dir>  as 'prefix', for architecture independent files
     152  --bindir=<dir>        for binaries
     153  --includedir=<dir>    for C header files
     154  --libdir=<dir>        for libraries
     155  --mandir=<dir>        for manual pages
     156  --sysdatadir=<dir>    for architecture-dependent data
     157  --datadir=<dir>       for architecture-independent data
     158
     159Optional libraries:
     160  --without-readline          do not link with GNU readline
     161  --with-readline[=DIR]       use GNU readline [prefix for readline files]
     162  --with-readline-include=DIR specify location of readline headers
     163  --with-readline-lib=DIR     specify location of readline libs
     164  --with-ncurses-lib=DIR      specify location of ncurses lib (for readline)
     165
     166  --without-gmp               use the native kernel instead of GNU MP
     167  --with-gmp[=DIR]            use the GMP kernel [prefix for gmp files]
     168  --with-gmp-include=DIR      specify location of gmp headers
     169  --with-gmp-lib=DIR          specify location of gmp libs
     170
     171  --with-qt[=DIR]        use the Qt graphical library [prefix for Qt dir.]
     172  --with-fltk[=DIR]      use the FLTK graphical library [prefix for FLTK dir.]
     173
     174EOT
     175exit 1
     176;;
     177verb) cat >&2 <<EOT
     178Architecture, operating system and asm kernel.
     179  Configure tries to detect what is the architecture of the machine (CPU type)
     180  and what operating system it is running. Then, it decides whether an asm
     181  kernel exists and should be used. You can override this with Configure -ask.
     182Which compiler will be used ?
     183  Depending on the machine (architecture and operating system) and on what is
     184  found in the path, a compiler is automatically chosen. If you set the
     185  environment variable CC before typing Configure, it will be used instead.
     186  Typeset the installation help ('tex doc/INSTALL.tex') for more details.
     187EOT
     188exit 1
     189;;
     190esac
     191
     192test "$fastread" = yes || cat <<EOT
     193==========================================================================
     194             Beginning configuration questions for GP/PARI.
     195
     196You will be asked some questions about your system. Most of the time, a list
     197of acceptable answers will be supplied as well as a default between brackets.
     198Type a carriage return ('Enter') to accept these defaults.
     199
     200Though the present script strives to prevent any fatal mistake on your part,
     201there is currently no easy way out if you make one. Your best bet is to press
     202Ctrl-C, then start again.  Another possibility is to wait till the questions
     203end, edit the file "Oxxx/$dflt_conf_file", then run
     204
     205      Configure --load Oxxx/$dflt_conf_file
     206
     207(which can be abbreviated to simply "Configure -l", provided your architecture
     208is correctly detected)
     209==========================================================================
     210EOT
  • patches/files/get_fltk

    diff -Nau pari-2.4.3.svn-12577.p4/patches/files/get_fltk pari-2.4.3.svn-12577.p5/patches/files/get_fltk
    old new  
     1if test -z "$with_fltk"; then
     2  with_fltk=yes
     3fi
     4FLTKDIR=
     5case "$with_fltk" in
     6yes)
     7   pth=$libpth; lib=fltk; . ./locatelib
     8   if test -n "$fltk"; then
     9     FLTKDIR=`dirname $fltk | sed -e 's/lib\/$//'`
     10   fi
     11   ;;
     12*) if test ! -d "$with_fltk"; then
     13    echo "### Specified FLTK directory '$with_fltk' not found"
     14  else
     15    FLTKDIR=$with_fltk
     16  fi;;
     17esac
     18if test -n "$FLTKDIR"; then
     19  case "$FLTKDIR" in /) FLTKDIR=;; esac
     20  if test -d "$FLTKDIR/include/FL"; then
     21    echo "Using FLTK library, FLTKDIR = \"$FLTKDIR\""
     22  else
     23    echo "### Found the FLTK library, but not the necessary headers."
     24    echo "### Building without FLTK support."
     25    FLTKDIR=""
     26  fi
     27else
     28  echo "### FLTK not found. Building without FLTK support"
     29fi
     30case "$osname" in
     31  cygwin) FLTK_LIBS="-lgdi32 -lole32 -luuid -lwsock32 -lsupc++" ;;
     32  darwin) FLTK_LIBS="-framework Carbon -lsupc++" ;;
     33  *)      FLTK_LIBS="$X11_LIBS -lstdc++" ;;
     34esac
  • patches/files/get_X11

    diff -Nau pari-2.4.3.svn-12577.p4/patches/files/get_X11 pari-2.4.3.svn-12577.p5/patches/files/get_X11
    old new  
     1tdir=$osname-$arch-X11$$
     2mkdir $tdir; cp Imakefile $tdir; cd $tdir
     3if (xmkmf) >/dev/null 2>&1 && test -f Makefile; then
     4  eval `make gp-X11 2> /dev/null | grep -v make`
     5  x11pth="$usrlibdir $libdir";
     6fi
     7cd ..; rm -rf $tdir
     8
     9# Check xmkmf answer
     10# X11 -- Headers
     11if test ! -f $Xincroot/X11/Xos.h; then
     12  x11pth="\
     13    /usr/openwin/share/lib\
     14    /usr/openwin/lib\
     15    /usr/X11R6/lib       /usr/X11R5/lib       /usr/X11R4/lib\
     16    /usr/lib/X11R6       /usr/lib/X11R5       /usr/lib/X11R4\
     17    /usr/local/X11R6/lib /usr/local/X11R5/lib /usr/local/X11R4/lib\
     18    /usr/local/lib/X11R6 /usr/local/lib/X11R5 /usr/local/lib/X11R4\
     19    /usr/X11/lib\
     20    /usr/lib/X11\
     21    /usr/local/X11/lib\
     22    /usr/local/lib/X11\
     23    /usr/XFree86/lib/X11\
     24    /usr/lib\
     25    /usr/local/lib\
     26    /usr/athena/lib\
     27  ";
     28  pth=`echo $x11pth | sed 's,/lib,/include,g'`
     29  x=`./locate X11/Xos.h '' $pth`
     30  case $x in
     31   /*) Xincroot=`echo $x | sed 's,/X11/Xos.h,,'`
     32       # echo "...Found X11 header files in \"$Xincroot/X11\"."
     33       ;;
     34   *)  Xincroot=""
     35       echo "### Could not find X11 header files."
     36       ;;
     37  esac
     38fi
     39
     40# X11 -- Lib
     41# leif: ALSO search */lib64/* directories if we're doing a 64-bit build,
     42#       and do this FIRST (since we might find a 32-bit library in */lib/*).
     43#       E.g. on 64-bit Fedora 13, libX11.so is located in /usr/lib64, and
     44#       /usr/lib is NOT a symbolic link to /usr/lib64.
     45#       This still fails if ONLY a 32-bit X11 library is installed on a
     46#       64-bit system, and the */lib/* directories aren't the 64-bit ones.
     47if test "$sizeof_long" -eq 8; then
     48  # 64-bit build
     49  pth=`echo $x11pth | sed 's,/lib,/lib64,g'`
     50  lib=X11; . ./locatelib
     51fi
     52if test -z "$X11"; then
     53  # X11 library not yet found, search */lib/* directories
     54  pth=$x11pth
     55  lib=X11; . ./locatelib
     56fi
     57if test -z "$X11"; then
     58  echo "### Could not find X11 library."
     59fi
     60 
     61if test -f $Xincroot/X11/Xos.h -a -n "$X11"; then
     62  echo ..."Found X11 header files in $Xincroot/X11"
     63  echo ..."Found X11 library in $X11"
     64  test -n "$extralib" && echo ..."Extra Libraries are $extralib"
     65  X11_LIBS="-L$X11 -lX11 $extralib"
     66  X11_INC="-I$Xincroot"
     67else
     68  echo "### Not all necessary parts of X11 found."
     69  X11=
     70fi
     71
  • pari-2.4.3.svn-12577.

    diff -Nau pari-2.4.3.svn-12577.p4/patches/files/mp.c pari-2.4.3.svn-12577.p5/patches/files/mp.c
    old new  
    951951
    952952/* EXACT INTEGER DIVISION */
    953953
    954 #if 1 /* use undocumented GMP interface */
     954#ifndef PARI_DONT_USE_GMP_INTERNALS /* use "undocumented" GMP interface: */
     955/*
     956 * Note: "Undocumented" refers to directly accessing ("private") members
     957 *       of GMP's mpz_t / __mpz_struct types, which are defined in gmp.h.
     958 *       This is in fact (at least) compatible with both
     959 *        - GMP (<= 5.0.1) *and*
     960 *        - MPIR (<= 2.1.2),
     961 *       so we *don't* disable the use by default.
     962 */
     963
    955964static void
    956965GEN2mpz(mpz_t X, GEN x)
    957966{
     
    10101019    mpz2GEN(z, Z); return z;
    10111020  }
    10121021}
    1013 #else
     1022#else /* don't use "undocumented" GMP interface: */
    10141023/* assume y != 0 and the division is exact */
    10151024GEN
    10161025diviuexact(GEN x, ulong y)