bicatali 14/05/08 21:27:43 Added: pari-2.7.0-doc-make.patch pari-2.7.0-slow-discriminant.patch pari-2.7.0-no-automagic.patch Log: Import from sage-on-gentoo overlay (Portage version: HEAD/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Revision Changes Path 1.1 sci-mathematics/pari/files/pari-2.7.0-doc-make.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/files/pari-2.7.0-doc-make.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/files/pari-2.7.0-doc-make.patch?rev=1.1&content-type=text/plain Index: pari-2.7.0-doc-make.patch =================================================================== diff -Naur pari-2.7.0/config/DOC_Make.SH pari-2.7.0_a/config/DOC_Make.SH --- pari-2.7.0/config/DOC_Make.SH 2014-03-20 21:59:28.000000000 +1300 +++ pari-2.7.0_a/config/DOC_Make.SH 2014-05-05 13:20:09.119923587 +1200 @@ -23,7 +23,8 @@ doc all: develop.dvi libpari.dvi parallel.dvi users.dvi refcard.ps tutorial.dvi docps: develop.ps libpari.ps parallel.ps refcard.ps tutorial.ps users.ps INSTALL.ps -docpdf: develop.pdf libpari.pdf parallel.pdf users.pdf tutorial.pdf refcard.pdf INSTALL.pdf +#docpdf: develop.pdf libpari.pdf parallel.pdf users.pdf tutorial.pdf refcard.pdf INSTALL.pdf +docpdf: \$(PARI_TEX) \$(MACROS) pass1 pass2 indexing refcard.pdf INSTALL.pdf .SUFFIXES: .tex .ipf .pod .inf .dumbpod .3 .html @@ -39,38 +40,60 @@ %.dvi: %.tex \$(MACROS) \$(TEX) \$< +pass1: \$(PARI_TEX) \$(USERS_TEX) develop.tex tutorial.tex \$(MACROS) + -rm -f *.std + pdftex libpari + pdftex develop + pdftex tutorial + pdftex users + +pass2: pass1 + pdftex libpari + pdftex develop + pdftex tutorial + pdftex users + +indexing: pass2 + \$(MAKE) libpari.std + \$(MAKE) develop.std + \$(MAKE) users.std + pdftex libpari + pdftex develop + pdftex users + -rm -f *.std + libpari.pdf: \$(PARI_TEX) \$(MACROS) -rm -f libpari.std \$(PDFTEX) libpari \$(PDFTEX) libpari - make libpari.std; \$(PDFTEX) libpari; rm -f libpari.std + \$(MAKE) libpari.std; \$(PDFTEX) libpari; rm -f libpari.std libpari.dvi: \$(PARI_TEX) \$(MACROS) -rm -f libpari.std \$(TEX) libpari \$(TEX) libpari - make libpari.std; \$(TEX) libpari; rm -f libpari.std + \$(MAKE) libpari.std; \$(TEX) libpari; rm -f libpari.std develop.pdf: develop.tex \$(MACROS) -rm -f develop.std \$(PDFTEX) develop \$(PDFTEX) develop - make develop.std; \$(PDFTEX) develop; rm -f develop.std + \$(MAKE) develop.std; \$(PDFTEX) develop; rm -f develop.std develop.dvi: develop.tex \$(MACROS) -rm -f develop.std \$(TEX) develop \$(TEX) develop - make develop.std; \$(TEX) develop; rm -f develop.std + \$(MAKE) develop.std; \$(TEX) develop; rm -f develop.std parallel.pdf: parallel.tex \$(MACROS) -rm -f parallel.std \$(PDFTEX) parallel \$(PDFTEX) parallel - make parallel.std; \$(PDFTEX) parallel; rm -f parallel.std + \$(MAKE) parallel.std; \$(PDFTEX) parallel; rm -f parallel.std parallel.dvi: parallel.tex \$(MACROS) -rm -f parallel.std \$(TEX) parallel \$(TEX) parallel - make parallel.std; \$(TEX) parallel; rm -f parallel.std + \$(MAKE) parallel.std; \$(TEX) parallel; rm -f parallel.std tutorial.pdf: tutorial.tex \$(MACROS) -rm -f tutorial.std @@ -104,7 +127,7 @@ -rm -f users.std \$(PDFTEX) users \$(PDFTEX) users - make users.std; \$(PDFTEX) users; rm -f users.std + \$(MAKE) users.std; \$(PDFTEX) users; rm -f users.std gpman: gp.1 nroff -man gp.1 | unix2dos -ascii > gp.man 1.1 sci-mathematics/pari/files/pari-2.7.0-slow-discriminant.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/files/pari-2.7.0-slow-discriminant.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/files/pari-2.7.0-slow-discriminant.patch?rev=1.1&content-type=text/plain Index: pari-2.7.0-slow-discriminant.patch =================================================================== diff -ru src/src/basemath/alglin1.c b/src/basemath/alglin1.c --- src/src/basemath/alglin1.c 2014-01-29 18:00:27.000000000 +0100 +++ b/src/basemath/alglin1.c 2014-02-09 01:54:37.676725196 +0100 @@ -247,6 +247,7 @@ a = RgM_shallowcopy(a); for (i=1; i<nbco; i++) { + int garbage = 0; /* Only gerepile() once per loop iteration */ for(k=i; k<=nbco; k++) { gcoeff(a,k,i) = ff->red(E,gcoeff(a,k,i)); @@ -271,7 +272,7 @@ for (j=i+1; j<=nbco; j++) { gcoeff(a,j,k) = ff->add(E, gcoeff(a,j,k), ff->mul(E,m,gcoeff(a,j,i))); - if (low_stack(lim, stack_lim(av,1))) + if (low_stack(lim, stack_lim(av,1)) && (garbage++ == 0)) { if(DEBUGMEM>1) pari_warn(warnmem,"det. col = %ld",i); gerepileall(av,4, &a,&x,&q,&m); @@ -3721,6 +3722,7 @@ a = RgM_shallowcopy(a); for (i=1; i<nbco; i++) { + int garbage = 0; /* Only gerepile() once per loop iteration */ k = pivot(a, data, i, NULL); if (k > nbco) return gerepilecopy(av, gcoeff(a,i,i)); if (k != i) @@ -3740,7 +3742,7 @@ for (j=i+1; j<=nbco; j++) { gcoeff(a,j,k) = gsub(gcoeff(a,j,k), gmul(m,gcoeff(a,j,i))); - if (low_stack(lim, stack_lim(av,3))) + if (low_stack(lim, stack_lim(av,3)) && (garbage++ == 0)) { if(DEBUGMEM>1) pari_warn(warnmem,"det. col = %ld",i); gerepileall(av,2, &a,&x); @@ -3791,6 +3793,7 @@ { GEN ci, ck, m; int diveuc = (gequal1(pprec)==0); + int garbage = 0; /* Only gerepile() once per loop iteration */ p = gcoeff(a,i,i); if (gequal0(p)) @@ -3827,7 +3830,7 @@ GEN p1 = gsub(gmul(p,gel(ck,j)), gmul(m,gel(ci,j))); if (diveuc) p1 = mydiv(p1,pprec); gel(ck,j) = gerepileupto(av2, p1); - if (low_stack(lim,stack_lim(av,2))) + if (low_stack(lim,stack_lim(av,2)) && (garbage++ == 0)) { if(DEBUGMEM>1) pari_warn(warnmem,"det. col = %ld",i); gerepileall(av,2, &a,&pprec); 1.1 sci-mathematics/pari/files/pari-2.7.0-no-automagic.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/files/pari-2.7.0-no-automagic.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/files/pari-2.7.0-no-automagic.patch?rev=1.1&content-type=text/plain Index: pari-2.7.0-no-automagic.patch =================================================================== diff -Naur pari-2.7.0/config/Makefile.SH pari-2.7.0_a/config/Makefile.SH --- pari-2.7.0/config/Makefile.SH 2014-03-20 21:59:28.000000000 +1300 +++ pari-2.7.0_a/config/Makefile.SH 2014-05-05 12:00:21.095724368 +1200 @@ -75,12 +75,12 @@ PLOTLIBS="-L\$(QTDIR)/lib $QTLIB" graph=plotQt;; Qt4) - PLOTCFLAGS='-D__FANCY_WIN__ -I$(QTDIR)/include' - PLOTLIBS="-L\$(QTDIR)/lib $QTLIB" + PLOTCFLAGS='-D__FANCY_WIN__ `pkg-config --cflags QtGui`' + PLOTLIBS="`pkg-config --libs QtGui`" graph=plotQt4;; fltk) - PLOTCFLAGS="-I\$(FLTKDIR)/include $X11_INC" - PLOTLIBS="$FLTK_LIBS" + PLOTCFLAGS="`fltk-config --cxxflags` $X11_INC" + PLOTLIBS="`fltk-config --ldflags`" postconfig='fltk-config --post ' graph=plotfltk;; win32) @@ -269,7 +269,7 @@ GMPINCLUDE = $GMPINCLUDE # Graphic library. QTDIR = "$QTDIR" -MOC = \$(QTDIR)/bin/moc +MOC = "`which moc`" PLOTCFLAGS = $PLOTCFLAGS PLOTLIBS = $PLOTLIBS CPLUSPLUS = g++ diff -Naur pari-2.7.0/config/get_Qt pari-2.7.0_a/config/get_Qt --- pari-2.7.0/config/get_Qt 2014-03-20 21:59:28.000000000 +1300 +++ pari-2.7.0_a/config/get_Qt 2014-05-05 11:56:42.453465262 +1200 @@ -5,7 +5,7 @@ case "$with_qt" in yes) pth="/usr/local/lib /usr/local/share /usr/lib /usr/share" - QTDIR=`locatedir qt4/bin $pth` + QTDIR=`locatedir qt4 $pth` if test -n "$QTDIR"; then QTLIB="-lQtCore -lQtGui" which_graphic_lib=Qt4 diff -Naur pari-2.7.0/config/get_config_options pari-2.7.0_a/config/get_config_options --- pari-2.7.0/config/get_config_options 2014-03-20 21:59:28.000000000 +1300 +++ pari-2.7.0_a/config/get_config_options 2014-05-05 11:49:14.577963840 +1200 @@ -85,10 +85,12 @@ --with-ncurses-lib=*|--with-ncurses=*) with_ncurses_lib=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; + --without-qt|--with-qt=no) without_qt=yes ;; --with-qt) with_qt=yes ;; --with-qt=*) with_qt=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; + --without-fltk|--with-fltk=no) without_fltk=yes ;; --with-fltk) with_fltk=yes ;; --with-fltk=*) with_fltk=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; @@ -164,7 +166,9 @@ --with-gmp-lib=DIR specify location of gmp libs --with-qt[=DIR] use the Qt graphical library [prefix for Qt dir.] + --without-qt do not try to use the Qt lib --with-fltk[=DIR] use the FLTK graphical library [prefix for FLTK dir.] + --without-fltk do not try to use the FLTK lib Environment variables affecting the build: CC C compiler diff -Naur pari-2.7.0/config/get_fltk pari-2.7.0_a/config/get_fltk --- pari-2.7.0/config/get_fltk 2014-03-20 21:59:28.000000000 +1300 +++ pari-2.7.0_a/config/get_fltk 2014-05-05 11:49:14.578963841 +1200 @@ -2,6 +2,9 @@ with_fltk=yes fi FLTKDIR= +if test -z "$without_fltk; then + FLTKDIR="`fltk-config --prefix 2>/dev/null`" +fi case "$with_fltk" in yes) pth=$libpth; lib=fltk; . ./locatelib diff -Naur pari-2.7.0/config/get_graphic_lib pari-2.7.0_a/config/get_graphic_lib --- pari-2.7.0/config/get_graphic_lib 2014-03-20 21:59:28.000000000 +1300 +++ pari-2.7.0_a/config/get_graphic_lib 2014-05-05 11:54:45.469333702 +1200 @@ -7,6 +7,7 @@ if test -n "$with_fltk"; then which_graphic_lib=fltk; fi if test -n "$with_qt"; then which_graphic_lib=Qt; fi +if test -n "$without_fltk" -a -n "$without_qt"; then which_graphic_lib=none; fi if test "$fastread" != yes; then cat << EOT ========================================================================== @@ -38,7 +39,7 @@ case $osname in darwin) ;; # fltk brings in CoreFoundation, incompatible with pari_daemon *). ./get_fltk # FLTKDIR, FLTK_LIBS ;; - if test -z "$FLTKDIR"; then + if test -z "`fltk-config --ldflags 2> /dev/null`"; then case $which_graphic_lib in fltk) which_graphic_lib=none;; esac else which_graphic_lib=fltk