diff options
author | wiz <wiz@pkgsrc.org> | 2016-03-03 13:23:22 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2016-03-03 13:23:22 +0000 |
commit | 3ff28c6529114ea0a70b0c0ac9cddf5e69ad126f (patch) | |
tree | 95539e25e823d9ddfe8a5bb5e049b9d8a3bd1ca0 /math/pari23 | |
parent | bd229064e54f66dc00bb0ab4c9aebb27841117f1 (diff) | |
download | pkgsrc-3ff28c6529114ea0a70b0c0ac9cddf5e69ad126f.tar.gz |
Re-import pari-2.3.5nb19 as math/pari23 to prepare for pari update.
PARI-GP is a package which is aimed at efficient computations in
number theory, but also contains a large number of other useful
functions. It is somewhat related to a Computer Algebra System, but
is not really one since it treats symbolic expressions as mathematical
entities such as matrices, polynomials, series, etc..., and not as
expressions per se. However it is often much faster than other CAS,
and contains a large number of specific functions not found elsewhere,
essentially for use in number theory.
This package can be used in an interactive shell (GP) or as a C/C++
library (PARI). It is free software, in the sense of freedom AND 'free
of charge'.
This is the old 2.3 version of pari.
Diffstat (limited to 'math/pari23')
27 files changed, 1288 insertions, 0 deletions
diff --git a/math/pari23/DESCR b/math/pari23/DESCR new file mode 100644 index 00000000000..4acbda8d97d --- /dev/null +++ b/math/pari23/DESCR @@ -0,0 +1,14 @@ +PARI-GP is a package which is aimed at efficient computations in +number theory, but also contains a large number of other useful +functions. It is somewhat related to a Computer Algebra System, but +is not really one since it treats symbolic expressions as mathematical +entities such as matrices, polynomials, series, etc..., and not as +expressions per se. However it is often much faster than other CAS, +and contains a large number of specific functions not found elsewhere, +essentially for use in number theory. + +This package can be used in an interactive shell (GP) or as a C/C++ +library (PARI). It is free software, in the sense of freedom AND 'free +of charge'. + +This is the old 2.3 version of pari. diff --git a/math/pari23/Makefile b/math/pari23/Makefile new file mode 100644 index 00000000000..161f40eee0c --- /dev/null +++ b/math/pari23/Makefile @@ -0,0 +1,50 @@ +# $NetBSD: Makefile,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +DISTNAME= pari-2.3.5 +PKGREVISION= 19 +CATEGORIES= math +MASTER_SITES= http://pari.math.u-bordeaux.fr/pub/pari/unix/ + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://pari.math.u-bordeaux.fr/ +COMMENT= Software package for computer-aided number theory (2.3 version) +LICENSE= gnu-gpl-v2 + +MAKE_JOBS_SAFE= no + +USE_LIBTOOL= yes +USE_TOOLS+= perl:run +USE_LANGUAGES+= c c++ +HAS_CONFIGURE= yes +CONFIGURE_ENV+= LOCALBASE=${LOCALBASE} +CONFIGURE_ENV+= PERL5=${PERL5:Q} + +CONFIGURE_SCRIPT= ${WRKSRC}/Configure +CONFIGURE_ARGS+= --prefix=${PREFIX} +CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}/man1 +CONFIGURE_ARGS+= --share-prefix=${PREFIX}/share + +REPLACE_PERL+= src/desc/PARI/822.pm + +BUILD_TARGET= all +TEST_TARGET= test-compat bench +INSTALL_TARGET= install + +SUBST_CLASSES+= fix-cfg +SUBST_STAGE.fix-cfg= pre-configure +SUBST_MESSAGE.fix-cfg= Adding CFLAGS to Configure scripts. +SUBST_FILES.fix-cfg= config/get_* +SUBST_SED.fix-cfg= -e 's,$$CC $$extraflag,$$CC $$CFLAGS $$extraflag,g' + +SUBST_CLASSES+= fix-wrap +SUBST_STAGE.fix-wrap= post-build +SUBST_MESSAGE.fix-wrap= Removing TOOLS_DIR references +SUBST_FILES.fix-wrap= */pari.cfg +SUBST_SED.fix-wrap= -e "s,${TOOLS_DIR}/bin/,,g" + +.include "options.mk" + +.include "../../devel/ncurses/buildlink3.mk" +# rl_save_prompt() +.include "../../devel/readline/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/math/pari23/PLIST b/math/pari23/PLIST new file mode 100644 index 00000000000..d0b38083452 --- /dev/null +++ b/math/pari23/PLIST @@ -0,0 +1,86 @@ +@comment $NetBSD: PLIST,v 1.1 2016/03/03 13:23:22 wiz Exp $ +bin/gp +bin/gp-2.3 +${PLIST.doc}bin/gphelp +bin/tex2mail +include/pari/genpari.h +include/pari/pari.h +include/pari/paricast.h +include/pari/paricfg.h +include/pari/paricom.h +include/pari/paridecl.h +include/pari/parierr.h +include/pari/parigen.h +include/pari/pariinl.h +include/pari/parinf.h +include/pari/pariold.h +include/pari/pariport.h +include/pari/paripriv.h +include/pari/paristio.h +include/pari/parisys.h +include/pari/paritune.h +include/pari/paritype.h +${PLIST.nogmp}lib/libpari.la +${PLIST.gmp}lib/libpari-gmp.la +lib/pari/pari.cfg +man/man1/gp.1 +man/man1/gphelp.1 +man/man1/pari.1 +man/man1/tex2mail.1 +share/emacs/site-lisp/pari/pari-completion.el +share/emacs/site-lisp/pari/pari-conf.el +share/emacs/site-lisp/pari/pari-fontification.el +share/emacs/site-lisp/pari/pari-help.el +share/emacs/site-lisp/pari/pari-messages.el +share/emacs/site-lisp/pari/pari.el +share/emacs/site-lisp/pari/pariemacs.txt +share/emacs/site-lisp/pari/sli-tools.el +${PLIST.doc}share/pari/AUTHORS +${PLIST.doc}share/pari/CHANGES +${PLIST.doc}share/pari/COMPAT +${PLIST.doc}share/pari/COPYING +${PLIST.doc}share/pari/MACHINES +${PLIST.doc}share/pari/NEW +share/pari/PARI/822.pm +${PLIST.doc}share/pari/README +${PLIST.doc}share/pari/doc/Makefile +${PLIST.doc}share/pari/doc/appa.tex +${PLIST.doc}share/pari/doc/appb.tex +${PLIST.doc}share/pari/doc/appc.tex +${PLIST.doc}share/pari/doc/libpari.pdf +${PLIST.doc}share/pari/doc/paricfg.tex +${PLIST.doc}share/pari/doc/parimacro.tex +${PLIST.doc}share/pari/doc/pdfmacs.tex +${PLIST.doc}share/pari/doc/refcard.pdf +${PLIST.doc}share/pari/doc/refcard.tex +${PLIST.doc}share/pari/doc/translations +${PLIST.doc}share/pari/doc/tutorial.pdf +${PLIST.doc}share/pari/doc/tutorial.tex +${PLIST.doc}share/pari/doc/users.pdf +${PLIST.doc}share/pari/doc/users.tex +${PLIST.doc}share/pari/doc/usersch1.tex +${PLIST.doc}share/pari/doc/usersch2.tex +${PLIST.doc}share/pari/doc/usersch3.tex +${PLIST.doc}share/pari/doc/usersch4.tex +${PLIST.doc}share/pari/doc/usersch5.tex +share/pari/examples/EXPLAIN +share/pari/examples/Inputrc +share/pari/examples/Makefile +share/pari/examples/bench.gp +share/pari/examples/cl.gp +share/pari/examples/classno.gp +share/pari/examples/contfrac.gp +share/pari/examples/extgcd.c +share/pari/examples/lucas.gp +share/pari/examples/rho.gp +share/pari/examples/squfof.gp +share/pari/examples/taylor.gp +share/pari/misc/README +share/pari/misc/color.dft +share/pari/misc/gpalias +share/pari/misc/gpflog +share/pari/misc/gprc.dft +share/pari/misc/new.dic +share/pari/misc/pari.xpm +share/pari/misc/xgp +share/pari/pari.desc diff --git a/math/pari23/buildlink3.mk b/math/pari23/buildlink3.mk new file mode 100644 index 00000000000..d7be889cef1 --- /dev/null +++ b/math/pari23/buildlink3.mk @@ -0,0 +1,23 @@ +# $NetBSD: buildlink3.mk,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +BUILDLINK_TREE+= pari + +.if !defined(PARI_BUILDLINK3_MK) +PARI_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.pari+= pari>=2.3.4 +BUILDLINK_ABI_DEPENDS.pari+= pari>=2.3.5nb5 +BUILDLINK_PKGSRCDIR.pari?= ../../math/pari23 + +pkgbase := pari +.include "../../mk/pkg-build-options.mk" + +PARI_LIB?= pari +.if !empty(PKG_BUILD_OPTIONS.pari:Mgmp) +PARI_LIB= pari-gmp +. include "../../devel/gmp/buildlink3.mk" +.endif + +.endif # PARI_BUILDLINK3_MK + +BUILDLINK_TREE+= -pari diff --git a/math/pari23/distinfo b/math/pari23/distinfo new file mode 100644 index 00000000000..855a5eeb483 --- /dev/null +++ b/math/pari23/distinfo @@ -0,0 +1,27 @@ +$NetBSD: distinfo,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +SHA1 (pari-2.3.5.tar.gz) = f211ccfe42a4b18dbcde832dfd1ece6f477f4966 +RMD160 (pari-2.3.5.tar.gz) = 488adf3af5398d0ab5390eb86b65cd79bd1044c5 +SHA512 (pari-2.3.5.tar.gz) = 0e49e6310b4c76ef3370786a13aa8cbc5bb0b7dc84ec1665866d623e6284f45db8584eea759e8b5954dc9b5c8a3e866e77a377d18073ed33f11708a7e88a4cca +Size (pari-2.3.5.tar.gz) = 2018097 bytes +SHA1 (patch-aa) = 34efbc67afe5a98874c4fb3f18f4591bfa859d1f +SHA1 (patch-ab) = b008e8c3388fe7dae4eecbb6613408492ba03e14 +SHA1 (patch-ac) = a53784be5a94a289f86e1e6bae108adecd2d01c3 +SHA1 (patch-ad) = 5399688168b6f55073a460459fb3a89971583a6d +SHA1 (patch-ae) = 34e174cf1c97ee8b627691f3a5bf19fbbea43324 +SHA1 (patch-af) = 985b3a35f4c69124336c23c9c78690eb7e7d1567 +SHA1 (patch-ag) = 8c50e5b01832bc876874d51df02905dddb7839f3 +SHA1 (patch-ah) = 3febc677f1b94a9b3f4dec79388fdb8f77fa184f +SHA1 (patch-ai) = 19b1f467ee0e534c19cce5768de070950e147c67 +SHA1 (patch-aj) = 9231890613515ceb2c7018189dc549872f04a14d +SHA1 (patch-ak) = 622a06c67fd16c61ca8219c01e7f9dc9de202df4 +SHA1 (patch-al) = 4b9fe2464fb1136449ab3f46dcd743e937db470f +SHA1 (patch-am) = 09e158e5cd3a680d786aa876ce66d034df0c3b86 +SHA1 (patch-an) = 4e1f9c8e0c63e2f1922bb8b181212b3e09c56ce6 +SHA1 (patch-ao) = 44bf077f1585e20277dcd42a7c5fd38d12b19af5 +SHA1 (patch-ap) = 21a20b68b589f8be3036d1f2f9c4b2a7f43210a8 +SHA1 (patch-config_get_fltk) = 2c2aa271fad5880a44b2df70a7143d2aea690ca0 +SHA1 (patch-src_headers_paridecl.h) = ee02e487807d8ed1c1a11268965ade76a2f80cf2 +SHA1 (patch-src_language_anal.c) = d0028a51e8ef14cae766cb881fcfce82cec0346f +SHA1 (patch-src_language_es.c) = 27c286da66ce1a2fc6e5179cfb3f4e222984813d +SHA1 (patch-src_modules_mpqs.c) = 3dd164e5c686fd2eb8317569cf05906a4c527721 diff --git a/math/pari23/options.mk b/math/pari23/options.mk new file mode 100644 index 00000000000..9169c069528 --- /dev/null +++ b/math/pari23/options.mk @@ -0,0 +1,45 @@ +# $NetBSD: options.mk,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.pari +PKG_SUPPORTED_OPTIONS= doc gmp x11 +# x11 is not suggested because it's not reasonable to include a GUI in +# a foundation library. +PKG_SUGGESTED_OPTIONS= doc gmp + +.include "../../mk/bsd.options.mk" + +PLIST_VARS+= doc +.if !empty(PKG_OPTIONS:Mdoc) +BUILD_DEPENDS+= tex-amsfonts>=3.0:../../fonts/tex-amsfonts +BUILD_DEPENDS+= tex-pdftex>=1.40.11:../../print/tex-pdftex +PLIST.doc= yes +BUILD_TARGET+= doc +INSTALL_TARGET+= install-doc +MAKE_ENV+= PDFTEX=${LOCALBASE}/bin/pdftex +.endif + +PLIST_VARS+= nogmp gmp +.if !empty(PKG_OPTIONS:Mgmp) +PLIST.gmp= yes +CONFIGURE_ARGS+= --with-gmp=${BUILDLINK_PREFIX.gmp} +.include "../../devel/gmp/buildlink3.mk" +.else +PLIST.nogmp= yes +CONFIGURE_ARGS+= --without-gmp +.endif + +.if !empty(PKG_OPTIONS:Mx11) +USE_TOOLS+= imake +CONFIGURE_ARGS+= --graphic=X11 +CONFIGURE_ARGS+= --with-fltk=${BUILDLINK_PREFIX.fltk} +CONFIGURE_ENV+= X11BASE=${X11BASE} +CONFIGURE_ENV+= Xincroot=${X11BASE}/include +.include "../../x11/libX11/buildlink3.mk" +.include "../../x11/libXft/buildlink3.mk" +.include "../../x11/libXrender/buildlink3.mk" +.include "../../x11/fltk13/buildlink3.mk" +.else +CONFIGURE_ARGS+= --graphic=none +# don't let the configure script find an installed fltk +CONFIGURE_ARGS+= --with-fltk={BUILDLINK_DIR:Q}/nonexistent +.endif diff --git a/math/pari23/patches/patch-aa b/math/pari23/patches/patch-aa new file mode 100644 index 00000000000..110dccbecae --- /dev/null +++ b/math/pari23/patches/patch-aa @@ -0,0 +1,41 @@ +$NetBSD: patch-aa,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- config/get_PATH.orig 2008-01-16 15:57:16.000000000 +0000 ++++ config/get_PATH +@@ -4,35 +4,7 @@ if test -z "$OS2_SHELL"; then dir_sep=': + pth="\ + /bin\ + /usr/bin\ +- /usr/locateal/bin\ +- /usr/ucb\ +- /usr/locateal\ +- /usr/lbin\ +- /usr/5bin\ +- /etc\ +- /usr/etc\ +- /usr/gnu/bin\ +- /usr/new\ +- /usr/new/bin\ +- /usr/nbin\ +- /sys5.3/bin\ +- /sys5.3/usr/bin\ +- /bsd4.3/bin\ +- /bsd4.3/usr/ucb\ +- /bsd4.3/usr/bin\ +- /usr/bsd\ +- /bsd43/bin\ +- /opt/ansic/bin\ +- /usr/ccs/bin\ +- /usr/lib\ +- /usr/ucblib\ +- /lib\ +- /usr/ccs/lib\ +- /sbin\ +- /usr/sbin\ +- /usr/libexec\ +- /usr/openwin/bin\ +- /usr/local/bin\ ++ $LOCALBASE/bin\ + " + # /usr/openwin/bin added for xmkmf + diff --git a/math/pari23/patches/patch-ab b/math/pari23/patches/patch-ab new file mode 100644 index 00000000000..a174ccd2423 --- /dev/null +++ b/math/pari23/patches/patch-ab @@ -0,0 +1,57 @@ +$NetBSD: patch-ab,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- Configure.orig 2008-01-16 15:57:54.000000000 +0000 ++++ Configure +@@ -36,7 +36,7 @@ cd $config_dir + . ./get_PATH + # We might need the following : + echo Looking for some tools first ... +-list='ld zcat gzip ranlib perl emacs' ++list='ld zcat ranlib emacs' + pathspace=`echo $PATH | sed -e "s/$dir_sep/ /g" | sed -e 's,\\\\,/,g'` + + for file in $list; do +@@ -49,6 +49,7 @@ for file in $list; do + esac + done + if test -z "$zcat" -a -n "$gzip"; then zcat="$gzip -dc"; fi ++perl=${PERL5} + + ####################### CONFIGURE - ARCHITECTURE ############################ + . ./get_archos # arch, osname +@@ -101,14 +102,14 @@ fi + . ./get_static # static + # For dynamic linking, before and after installing + runpath="$libdir" +-LDDYN="-L$libdir -lpari" ++LDDYN="-Wl,-R$libdir -L$libdir -lpari" + # get_modld needs $includedir from get_install, static, and LDDYN + . ./get_modld # $_modld_list + + # Which copy, SHELL ? + case "$osname" in + os2) ln_s=cp; make_sh=sh;; +- *) ln_s="ln -s"; make_sh="/bin/sh";; ++ *) ln_s="ln -sf"; make_sh="/bin/sh";; + esac + ####################### CONFIGURE - CLEANUP ################################# + rm -f gmon.out # created by Configure -pg +@@ -172,14 +173,14 @@ if test "$objdir" != "$mkobjdir"; then + fi + + case $ans in +-y) if (cd $objdir; make gp); then ++y) if (cd $objdir; ${MAKE} gp); then + echo $n "Shall we install the files where they belong (y/n)? $c" + dflt=n; rep='y n'; . $config_dir/myread + case $ans in +- y) make install;; +- n) echo "Ok. Type \"${cdobjdir}make install\" when you are ready";; ++ y) ${MAKE} install;; ++ n) echo "Ok. Type \"${cdobjdir}${MAKE} install\" when you are ready";; + esac + fi;; +-n) echo "Ok. Type \"${cdobjdir}make install\" when you are ready";; ++n) echo "Ok. Type \"${cdobjdir}${MAKE} install\" when you are ready";; + esac + echo 'Bye !' diff --git a/math/pari23/patches/patch-ac b/math/pari23/patches/patch-ac new file mode 100644 index 00000000000..e732eec2084 --- /dev/null +++ b/math/pari23/patches/patch-ac @@ -0,0 +1,13 @@ +$NetBSD: patch-ac,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- config/get_archos.orig 2008-01-16 15:57:13.000000000 +0000 ++++ config/get_archos +@@ -26,7 +26,7 @@ if test "$fastread" != yes; then + ========================================================================== + I know of the following Operating Systems + EOM +- rep='os2 freebsd netbsd cygwin linux hpux aix osf1 solaris sunos nextstep concentrix irix'; ++ rep='os2 freebsd netbsd cygwin linux hpux aix osf1 solaris sunos nextstep concentrix irix dragonfly'; + . ./display + echo $n ..."Any of these apply ? $c" + dflt=$osname; . ./myread diff --git a/math/pari23/patches/patch-ad b/math/pari23/patches/patch-ad new file mode 100644 index 00000000000..a5f989e3455 --- /dev/null +++ b/math/pari23/patches/patch-ad @@ -0,0 +1,36 @@ +$NetBSD: patch-ad,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- config/get_libpth.orig 2008-01-16 15:56:55.000000000 +0000 ++++ config/get_libpth +@@ -1,7 +1,3 @@ +-case "$sizeof_long" in +- 8) addlib64="/usr/local/lib64 /lib64 /usr/lib64" +-esac +- + libpth="`echo $LIBRARY_PATH | sed -e \"s%\([^$dir_sep]*\)$dir_sep*%\1 %g\"`" + case "$osname" in + cygwin*) +@@ -34,21 +30,9 @@ case "$osname" in + " + fi;; + os2) libpth=`echo $libpth | sed 's,\\\\,/,g'`;; +- *) libpth="$libpth $addlib64\ +- /usr/local/lib\ +- /lib\ ++ *) libpth=" + /usr/lib\ +- /opt/lib\ +- /opt/local/lib\ +- /opt/gnu/lib\ +- /lib/pa1.1\ +- /usr/lib/large\ +- /lib/large\ +- /usr/lib/small\ +- /lib/small\ +- /usr/ccs/lib\ +- /usc/ucblib\ +- /usr/shlib\ ++ $LOCALBASE/lib\ + .\ + ";; + esac diff --git a/math/pari23/patches/patch-ae b/math/pari23/patches/patch-ae new file mode 100644 index 00000000000..c15ee338b5a --- /dev/null +++ b/math/pari23/patches/patch-ae @@ -0,0 +1,60 @@ +$NetBSD: patch-ae,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- config/get_readline.orig 2008-01-16 15:57:14.000000000 +0000 ++++ config/get_readline +@@ -33,21 +33,11 @@ if test -n "$readline"; then + $cygtop/H-${arch}-cygwin32/${arch}-cygwin32/include\ + ";; + *) incpth="$incpth\ +- /usr/local/include/readline\ +- /usr/include/readline\ +- /opt/include/readline\ +- /opt/local/include/readline\ +- /opt/gnu/include/readline\ +- /usr/unsupported/include/readline\ +- /usr/local/include\ +- /usr/include\ +- /opt/include\ +- /opt/local/include\ +- /opt/gnu/include\ ++ $LOCALBASE/include\ + ";; + esac + pth="$with_readline_include $readline_add $incpth" +- x=`./locate 'readline.h' '' $pth` ++ x=`./locate 'readline/readline.h' '' $pth` + CPPF_defined= + case $x in + ?:/*|/*) rl_include=`dirname $x` +@@ -111,22 +101,11 @@ if test -n "$readline"; then + lib=$rl_fullname; sym=tgetent; . ./locatesymbol + need_tgetent="$try" + if test -n "$need_tgetent"; then +- opth=$pth; pth="$with_ncurses_lib $libpth" +- lib=ncurses; . ./locatelib +- if test -n "$try"; then # ncurses found. Does it contain tgetent ? +- lib=$try; . ./locatesymbol +- fi +- pth=$opth +- if test -n "$try"; then +- rl_ncurses=$ncurses +- need_tgetent= +- else # give termcap a try + lib=termcap; . ./locatelib + if test -n "$try"; then + rl_termcap=$termcap + need_tgetent= + fi +- fi + fi + # Readline -- CFLAGS + if (echo $rl_include | grep "readline$" > /dev/null); then +@@ -135,7 +114,7 @@ if test -n "$readline"; then + else # in case headers are not installed correctly + RLINCLUDE="-I$rl_include -DREADLINE_LIBRARY" + fi +- RLLIBS="-L$readline -lreadline" ++ RLLIBS="-Wl,-R$readline -L$readline -lreadline" + if test -n "$rl_ncurses"; then + echo ..."Library ncurses needed by readline" + RLLIBS="$RLLIBS -L$rl_ncurses -lncurses" diff --git a/math/pari23/patches/patch-af b/math/pari23/patches/patch-af new file mode 100644 index 00000000000..d378afddfe6 --- /dev/null +++ b/math/pari23/patches/patch-af @@ -0,0 +1,26 @@ +$NetBSD: patch-af,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- config/get_X11.orig 2008-01-16 15:57:17.000000000 +0000 ++++ config/get_X11 +@@ -10,20 +10,7 @@ cd ..; rm -rf $tdir + # X11 -- Headers + if test ! -f $Xincroot/X11/Xos.h; then + x11pth="\ +- /usr/openwin/share/lib\ +- /usr/openwin/lib\ +- /usr/X11R6/lib /usr/X11R5/lib /usr/X11R4/lib\ +- /usr/lib/X11R6 /usr/lib/X11R5 /usr/lib/X11R4\ +- /usr/local/X11R6/lib /usr/local/X11R5/lib /usr/local/X11R4/lib\ +- /usr/local/lib/X11R6 /usr/local/lib/X11R5 /usr/local/lib/X11R4\ +- /usr/X11/lib\ +- /usr/lib/X11\ +- /usr/local/X11/lib\ +- /usr/local/lib/X11\ +- /usr/XFree86/lib/X11\ +- /usr/lib\ +- /usr/local/lib\ +- /usr/athena/lib\ ++ $X11BASE/lib\ + "; + pth=`echo $x11pth | sed 's,/lib,/include,g'` + x=`./locate X11/Xos.h '' $pth` diff --git a/math/pari23/patches/patch-ag b/math/pari23/patches/patch-ag new file mode 100644 index 00000000000..d8771234a6d --- /dev/null +++ b/math/pari23/patches/patch-ag @@ -0,0 +1,30 @@ +$NetBSD: patch-ag,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- config/get_dlld.orig 2009-09-19 12:01:14.000000000 +0000 ++++ config/get_dlld +@@ -9,7 +9,7 @@ DLSUFFIX=so + soname=.$soname_num + do_dll=yes + case "$osname" in +- gnu*|aix|osf1|solaris|linux|freebsd|netbsd) ++ dragonfly*|gnu*|aix|osf1|solaris|linux|freebsd|netbsd) + case $pari_release_verbose in + *STABLE*) sodest=.$version.$patch;; # released version + *DEVELOPMENT*) sodest=.$patch.0.0;; # unstable version +@@ -67,6 +67,7 @@ if test -n "$DLLD"; then + aix) DLLDFLAGS='-r' ;; + darwin) DLLD=; DLLDFLAGS='-dylib -flat_namespace -undefined suppress' ;; + freebsd) DLLDFLAGS='-Bshareable -x' ;; ++ dragonfly*) DLLDFLAGS='-Bshareable -x' ;; + hpux) DLLDFLAGS='-b' ;; + irix) DLLDFLAGS='-shared -elf -no_unresolved -all' ;; + osf1) DLLDFLAGS='-shared' ;; +@@ -91,7 +92,7 @@ if test -n "$DLLD"; then + DLLDFLAGS="-shared $extra \$(CFLAGS) \$(DLCFLAGS) $DLLDFLAGS" + fi + case "$osname" in +- gnu*|cygwin|osf1|freebsd|linux|sunos|solaris) EXTRADLLDFLAGS='-lc ${LIBS}';; ++ dragonfly*|gnu*|cygwin|osf1|freebsd|linux|sunos|solaris) EXTRADLLDFLAGS='-lc ${LIBS}';; + esac + + if test "$fastread" != yes; then diff --git a/math/pari23/patches/patch-ah b/math/pari23/patches/patch-ah new file mode 100644 index 00000000000..a175f977c65 --- /dev/null +++ b/math/pari23/patches/patch-ah @@ -0,0 +1,13 @@ +$NetBSD: patch-ah,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- config/get_install.orig 2008-01-16 15:57:11.000000000 +0000 ++++ config/get_install +@@ -23,7 +23,7 @@ fi + echo $n "...for architecture-independent files (share-prefix) ? $c" + dflt=$share_prefix; . ./myread; share_prefix=$ans + +-dfltman=$share_prefix/man/man1 ++dfltman=$prefix/man/man1 + dfltemacs=$share_prefix/emacs/site-lisp/pari + dfltdata=$share_prefix/pari + diff --git a/math/pari23/patches/patch-ai b/math/pari23/patches/patch-ai new file mode 100644 index 00000000000..3b2e56d6636 --- /dev/null +++ b/math/pari23/patches/patch-ai @@ -0,0 +1,349 @@ +$NetBSD: patch-ai,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- config/Makefile.SH.orig 2010-01-09 17:59:48.000000000 +0000 ++++ config/Makefile.SH +@@ -70,7 +70,7 @@ plotrunpath= + case "$which_graphic_lib" in + *X11*) + PLOTCFLAGS="$PLOTCFLAGS $X11_INC" +- PLOTLIBS="$PLOTLIBS $X11_LIBS" ++ PLOTLIBS="-Wl,-R${X11BASE}/lib $PLOTLIBS $X11_LIBS" + plotrunpath=$X11 + graph="plotX $graph" + ;; +@@ -110,25 +110,12 @@ if test -n "$runpathprefix"; then + RUNPTH=`$config_dir/ldflags "$LDneedsWl" "$runpathprefix$TOP/$objdir$dir_sep$tmp"` + fi + +-if test -z "$DLLD"; then +- exec="gp-sta"; static=y +-else +- exec="gp-sta gp-dyn" +-fi + case "$sizeof_long" in + 4) numbits=32;; + 8) numbits=64;; + esac + dotest="env \"LD_LIBRARY_PATH=.$dir_sep\$\$LD_LIBRARY_PATH\" \$(SHELL) $src/test/dotest $numbits" +-if test -z "$emacs"; then +- install_emacs_files= +-else +- install_emacs_files=install_emacs_files +-fi +-case "$static" in +- n) dft=dyn; libdft=lib-dyn;; +- y) dft=sta; libdft= ;; +-esac ++install_emacs_files=install_emacs_files + + CPPFLAGS="-I. -I$src/headers" + if test "$has_dlopen" = builtin; then +@@ -153,16 +140,14 @@ AR = ar + SIZEOF_LONG= $sizeof_long + + CC_FLAVOR = +-CC = $CC \$(CC_FLAVOR) ++CC = \$(LIBTOOL) --mode=compile $CC \$(CC_FLAVOR) + CPPFLAGS = $CPPFLAGS + CFLAGS = $CFLAGS + DLCFLAGS = $DLCFLAGS + LD_FLAVOR = \$(CC_FLAVOR) +-LD = $LD \$(LD_FLAVOR) ++LD = \$(LIBTOOL) --mode=link $LD \$(LD_FLAVOR) + LDFLAGS = $LDFLAGS + DLLD_FLAVOR = \$(LD_FLAVOR) +-DLLD = $DLLD \$(DLLD_FLAVOR) +-DLLDFLAGS = $DLLDFLAGS + EXTRADLLDFLAGS = $EXTRADLLDFLAGS + + # HIGHLY EXPERIMENTAL (only tested with gmp-4.0 on ix86 and Ultra). +@@ -179,29 +164,19 @@ EXTRADLLDFLAGS = $EXTRADLLDFLAGS + #the following line + #GMPO2 = \$(GMP)/sparcv9.o + +-_O = .o +-_A = .a ++_O = .lo ++_A = .la + LIB_PREFIX = $lib_prefix +-DLLIB_PREFIX = $dllib_prefix +-LIBPARI_BASE = $libpari_base +-LIBPARI = \$(LIB_PREFIX)pari +-DLLIBPARI = \$(DLLIB_PREFIX)pari +-LIBPARI_STA = \$(LIBPARI)\$(_A) +-LIBPARI_SO = \$(DLLIBPARI).$DLSUFFIX +-SOLIBPARI = \$(DLLIB_PREFIX)\$(LIBPARI_BASE).$DLSUFFIX +-LIBPARI_DYN = \$(SOLIBPARI)$sodest +-LIBPARI_SONAME= \$(SOLIBPARI)$soname ++LIBPARI = \$(LIB_PREFIX)$libpari_base\$(_A) + DL_DFLT_NAME = $DL_DFLT_NAME + + EXPORT_FILE = $export_file + EXPORT_CREATE = $export_create + EXPORT_LIB = $export_lib + EXPORT_LIB_CREATE = $export_lib_create +-DLLD_IGNORE = $dlld_ignore + + RUNPTH = $RUNPTH + RUNPTH_FINAL = $RUNPTH_FINAL +-LDDYN = $LDDYN + LIBS = $LIBS + + RM = rm -f +@@ -226,8 +201,10 @@ MISCDIR = \$(DATADIR)/misc + DOCDIR = \$(DATADIR)/doc + + INSTALL = $cfg/install +-INSTALL_PROGRAM = \$(INSTALL) +-INSTALL_DATA = \$(INSTALL) -m 644 ++INSTALL_PROGRAM = \$(BSD_INSTALL_PROGRAM) ++INSTALL_SCRIPT = \$(BSD_INSTALL_SCRIPT) ++INSTALL_DATA = \$(BSD_INSTALL_DATA) ++INSTALL_MAN = \$(BSD_INSTALL_MAN) + + # Readline + RLINCLUDE = $RLINCLUDE +@@ -239,7 +216,7 @@ QTDIR = "$QTDIR" + MOC = \$(QTDIR)/bin/moc + PLOTCFLAGS = $PLOTCFLAGS + PLOTLIBS = $PLOTLIBS +-CPLUSPLUS = g++ ++CPLUSPLUS = \$(LIBTOOL) --mode=compile $CXX \$(CXX_FLAVOR) + + FLTKDIR = "$FLTKDIR" + +@@ -254,21 +231,16 @@ DOTEST=$dotest + OBJS = $OBJS + OBJSGP = $OBJSGP + +-gp: gp-$dft ../gp$suffix$exe_suff $libdft ++all: \$(LIBPARI) + +-../gp$suffix$exe_suff: gp-$dft +- -\$(RM) \$@ +- -\$(LN) $ln_objdir/gp-$dft$exe_suff \$@ ++lib: \$(LIBPARI) + +-all: $exec lib-sta ++\$(LIBPARI): \$(OBJS) ++ \$(LD) -o \$@ \$(OBJS) -rpath \$(LIBDIR) --version-info 0:0 + +-lib-sta: \$(LIBPARI_STA) +-lib-dyn: \$(LIBPARI_DYN) +- +-\$(LIBPARI_STA): $add_funclist \$(OBJS) +- -\$(RM) \$@ +- \$(AR) r \$@ \$(OBJS) +- -$ranlib \$@ ++gp: \$(OBJSGP) \$(LIBPARI) ++ \$(RM) \$@ ++ \$(LD) -o \$@ \$(LDFLAGS) \$(OBJSGP) \$(RUNPTH_FINAL) \$(PLOTLIBS) \$(LIBS) \$(RLLIBS) \$(LIBPARI) + + kerntest\$(_O): $src/test/kerntest.c + \$(CC) -c \$(CFLAGS) -I$src/language \$(CPPFLAGS) -o \$@ $src/test/kerntest.c +@@ -297,11 +269,6 @@ tune-dyn: tune.o \$(LIBPARI_DYN) + tune-sta: tune.o \$(LIBPARI_STA) + \$(LD) \$(LDFLAGS) -o \$@ \$< \$(GMPOBJS) ./\$(LIBPARI_STA) \$(LIBS) + +-gp-sta: $add_funclist \$(OBJS) \$(OBJSGP) +- \$(RM) \$@ +- \$(LD) -o \$@ \$(LDFLAGS) \$(OBJS) \$(OBJSGP) \$(RUNPTH) \$(RLLIBS) \$(PLOTLIBS) \$(LIBS) +- $postconfig gp-sta +- + cleanemacs: + \$(RM) $emx/*.elc + cleantest: +@@ -316,7 +283,7 @@ clean: cleanobj cleantest cleanemacs cle + .headers: $HEADERS + @touch \$@ + +-install: install-lib-$dft install-include install-bin install-man install-misc install-doc install-examples install-cfg install-data ++install: install-lib install-include install-bin install-man install-misc install-examples install-cfg install-data + + install-include: + -mkdir -p \$(INCLUDEDIR)/pari +@@ -324,23 +291,11 @@ install-include: + \$(INSTALL_DATA) \$\$i \$(INCLUDEDIR)/pari; done + -for i in $headerlist; do \\ + \$(INSTALL_DATA) $src/headers/\$\$i.h \$(INCLUDEDIR)/pari; done +- -\$(RM) \$(INCLUDEDIR)/pari/genpari.h + -\$(LN) pari.h \$(INCLUDEDIR)/pari/genpari.h + +-install-bin: install-bin-$dft +- +-install-bin-dyn: gp-dyn ++install-bin: gp + -mkdir -p \$(BINDIR) +- -\$(RM) \$(BINDIR)/gp-$version$exe_suff \$(BINDIR)/gp$exe_suff +- \$(LD) -o \$(BINDIR)/gp-$version$exe_suff \$(LDFLAGS) \$(OBJSGP) \$(RUNPTH_FINAL) \$(TOPLDDYN) \$(LDDYN) \$(PLOTLIBS) \$(LIBS) +- -\$(STRIP) \$(STRIPFLAGS) \$(BINDIR)/gp-$version$exe_suff +- $postconfig \$(BINDIR)/gp-$version$exe_suff +- -\$(LN) gp-$version$exe_suff \$(BINDIR)/gp$exe_suff +- +-install-bin-sta: gp-sta +- -mkdir -p \$(BINDIR) +- -\$(RM) \$(BINDIR)/gp-$version$exe_suff \$(BINDIR)/gp$exe_suff +- \$(INSTALL_PROGRAM) gp-sta$exe_suff \$(BINDIR)/gp-$version$exe_suff ++ \$(LIBTOOL) --mode=install \$(INSTALL_PROGRAM) gp$exe_suff \$(BINDIR)/gp-$version$exe_suff + -\$(LN) gp-$version$exe_suff \$(BINDIR)/gp$exe_suff + # Can't strip it if we want install() to work on OSF. + # -\$(STRIP) \$(STRIPFLAGS) \$(BINDIR)/gp-$version +@@ -348,24 +303,22 @@ install-bin-sta: gp-sta + + install-man:: + -mkdir -p \$(MANDIR) +- -\$(RM) \$(MANDIR)/pari.1 \$(MANDIR)/gp.1 \$(MANDIR)/gp-$version.1 +- \$(INSTALL_DATA) $doc/gphelp.1 \$(MANDIR) +- \$(INSTALL_DATA) $doc/gp.1 \$(MANDIR)/gp-$version.1 ++ \$(INSTALL_MAN) $doc/gphelp.1 \$(MANDIR) ++ \$(INSTALL_MAN) $doc/gp.1 \$(MANDIR) + -\$(LN) gp.1 \$(MANDIR)/pari.1 +- -\$(LN) gp-$version.1 \$(MANDIR)/gp.1 + + install-misc: $install_emacs_files + -mkdir -p \$(MISCDIR) \$(BINDIR) +- \$(INSTALL_PROGRAM) $misc/tex2mail \$(BINDIR) +- \$(INSTALL_DATA) $doc/tex2mail.1 \$(MANDIR) +- \$(INSTALL_DATA) $misc/README \$(MISCDIR) +- \$(INSTALL_DATA) $misc/color.dft \$(MISCDIR) +- \$(INSTALL_DATA) $misc/gpalias \$(MISCDIR) +- \$(INSTALL_PROGRAM) $misc/gpflog \$(MISCDIR) +- \$(INSTALL_DATA) $misc/gprc.dft \$(MISCDIR) +- \$(INSTALL_DATA) $misc/new.dic \$(MISCDIR) +- \$(INSTALL_DATA) $misc/pari.xpm \$(MISCDIR) +- \$(INSTALL_PROGRAM) $misc/xgp \$(MISCDIR) ++ \$(INSTALL_SCRIPT) $misc/tex2mail \$(BINDIR) ++ \$(INSTALL_MAN) $doc/tex2mail.1 \$(MANDIR) ++ \$(INSTALL_DATA) $misc/README \$(MISCDIR) ++ \$(INSTALL_DATA) $misc/color.dft \$(MISCDIR) ++ \$(INSTALL_DATA) $misc/gpalias \$(MISCDIR) ++ \$(INSTALL_SCRIPT) $misc/gpflog \$(MISCDIR) ++ \$(INSTALL_DATA) $misc/gprc.dft \$(MISCDIR) ++ \$(INSTALL_DATA) $misc/new.dic \$(MISCDIR) ++ \$(INSTALL_DATA) $misc/pari.xpm \$(MISCDIR) ++ \$(INSTALL_SCRIPT) $misc/xgp \$(MISCDIR) + + install-cfg:: + -mkdir -p \$(SYSDATADIR) +@@ -377,8 +330,15 @@ install-cfg:: + + install-doc:: + -mkdir -p \$(BINDIR) \$(DOCDIR) ++ -\$(INSTALL_DATA) ../AUTHORS \$(DATADIR) ++ -\$(INSTALL_DATA) ../CHANGES \$(DATADIR) ++ -\$(INSTALL_DATA) ../COMPAT \$(DATADIR) ++ -\$(INSTALL_DATA) ../COPYING \$(DATADIR) ++ -\$(INSTALL_DATA) ../MACHINES \$(DATADIR) ++ -\$(INSTALL_DATA) ../NEW \$(DATADIR) ++ -\$(INSTALL_DATA) ../README \$(DATADIR) + -cd $doc; \$(MAKE) all +- -\$(INSTALL_PROGRAM) $doc/gphelp \$(BINDIR) ++ -\$(INSTALL_SCRIPT) $doc/gphelp \$(BINDIR) + -\$(INSTALL_DATA) $doc/Makefile \$(DOCDIR) + -\$(INSTALL_DATA) $doc/translations \$(DOCDIR) + -\$(INSTALL_DATA) $doc/appa.tex \$(DOCDIR) +@@ -395,11 +355,10 @@ install-doc:: + -\$(INSTALL_DATA) $doc/usersch4.tex \$(DOCDIR) + -\$(INSTALL_DATA) $doc/usersch5.tex \$(DOCDIR) + -\$(INSTALL_DATA) $doc/paricfg.tex \$(DOCDIR) +- -\$(INSTALL_DATA) $doc/libpari.dvi \$(DOCDIR) +- -\$(INSTALL_DATA) $doc/users.dvi \$(DOCDIR) +- -\$(INSTALL_DATA) $doc/tutorial.dvi \$(DOCDIR) +- -\$(INSTALL_DATA) $doc/refcard.dvi \$(DOCDIR) +- -\$(INSTALL_DATA) $doc/refcard.ps \$(DOCDIR) ++ -\$(INSTALL_DATA) $doc/libpari.pdf \$(DOCDIR) ++ -\$(INSTALL_DATA) $doc/users.pdf \$(DOCDIR) ++ -\$(INSTALL_DATA) $doc/tutorial.pdf \$(DOCDIR) ++ -\$(INSTALL_DATA) $doc/refcard.pdf \$(DOCDIR) + + install-examples: + -mkdir -p \$(EXDIR) +@@ -426,20 +385,9 @@ install-data: + done; \ + fi + +-install-lib-sta: \$(LIBPARI_STA) ++install-lib: \$(LIBPARI) + -mkdir -p \$(LIBDIR) +- -\$(RM) \$(LIBDIR)/\$(LIBPARI_STA) +- \$(INSTALL_DATA) \$(LIBPARI_STA) \$(LIBDIR)/\$(LIBPARI_STA) +- +-install-lib-dyn-base: +- -mkdir -p \$(LIBDIR) +- -\$(RM) \$(LIBDIR)/\$(LIBPARI_DYN) \$(LIBDIR)/\$(LIBPARI_SONAME) \$(LIBDIR)/\$(LIBPARI_SO) +- \$(INSTALL_PROGRAM) \$(LIBPARI_DYN) \$(LIBDIR)/\$(LIBPARI_DYN) +-install-lib-dyn-link: install-lib-dyn-base +- -if test "\$(LIBPARI_SONAME)" != "\$(LIBPARI_SO)"; then \ +- \$(LN) \$(LIBPARI_DYN) \$(LIBDIR)/\$(LIBPARI_SONAME);\ +- \$(LN) \$(LIBPARI_DYN) \$(LIBDIR)/\$(LIBPARI_SO); fi +-install-lib-dyn: \$(LIBPARI_DYN) install-lib-dyn-link ++ \$(LIBTOOL) --mode=install \$(BSD_INSTALL_LIB) \$(LIBPARI) \$(LIBDIR)/ + + pariinl.h: parilvl0.h parilvl1.h + cat parilvl0.h parilvl1.h > pariinl.h +@@ -462,63 +410,13 @@ dotest-$i:: + EOT + done + +-if test -z "$DLLD"; then +- cat >> $file << EOT +- +-\$(LIBPARI_DYN):: +- @echo "Configure could not find a way to build a shared library on this machine" +- +-EOT +-else +- if test -n "$export_file"; then +- cat >> $file << EOT +- +-EXPORT_FILE_BASE = $src/systems/os2/pari.def.base +-VERSION_VERBOSE = $pari_release_verbose +- +-\$(EXPORT_FILE): \$(OBJS) \$(EXPORT_FILE_BASE) +- cat \$(EXPORT_FILE_BASE) | sed 's/<DLL_BASE>/\$(DLLIBPARI)/' | sed 's/<VENDOR>/pari.math.u-bordeaux.fr\//' | sed 's/<VERSION>/\$(VERSION_VERBOSE)/' | sed 's/<DESCR>/GP\/PARI compiled with \$(CFLAGS)/' > \$@ +- \$(EXPORT_CREATE) \$(OBJS) >> \$@ +- +-\$(DLLIBPARI)\$(_A): \$(EXPORT_FILE) +- \$(EXPORT_LIB_CREATE) -o \$@ \$(EXPORT_FILE) +- +-EOT +- fi +- cat >> $file << EOT +- +-gp-dyn: $add_funclist \$(OBJSGP) \$(LIBPARI_DYN) \$(EXPORT_LIB) +- \$(RM) \$@ +- \$(LD) -o \$@ \$(LDFLAGS) \$(OBJSGP) \$(RUNPTH) \$(TOPLDDYN) \$(LDDYN) \$(PLOTLIBS) \$(LIBS) +- $postconfig gp-dyn +- +-\$(LIBPARI_DYN): $add_funclist \$(OBJS) \$(EXPORT_FILE) +- -\$(RM) \$(LIBPARI_DYN) +- \$(DLLD_IGNORE)\$(DLLD) -o \$(LIBPARI_DYN) \$(DLLDFLAGS) \$(OBJS) \$(EXTRADLLDFLAGS) \$(EXPORT_FILE) +- -if test "\$(LIBPARI_DYN)" != "\$(LIBPARI_SO)"; then \ +- \$(RM) \$(LIBPARI_SO);\ +- \$(LN) \$(LIBPARI_DYN) \$(LIBPARI_SO); fi +- -if test "\$(LIBPARI_DYN)" != "\$(LIBPARI_SONAME)"; then \ +- \$(RM) \$(LIBPARI_SONAME);\ +- \$(LN) \$(LIBPARI_DYN) \$(LIBPARI_SONAME); fi +-EOT +-fi +- +-if test -n "$emacs"; then +- cat >> $file << EOT +-elc: +- @echo "Byte-Compiling elisp files..." +- -cd $emx; $emacs -batch \ +- --eval '(setq load-path (append (list ".") load-path))' \ +- -f batch-byte-compile *.el +- +-$install_emacs_files: elc ++cat >> $file << EOT ++$install_emacs_files: + -mkdir -p \$(EMACSDIR) + -cd $emx; for f in *.elc *.el pariemacs.txt; do \ + \$(INSTALL_DATA) \$\$f \$(EMACSDIR); \ + done + EOT +-fi + + if test -n "$add_funclist"; then + cat >> $file << EOT diff --git a/math/pari23/patches/patch-aj b/math/pari23/patches/patch-aj new file mode 100644 index 00000000000..a8eee38ed19 --- /dev/null +++ b/math/pari23/patches/patch-aj @@ -0,0 +1,13 @@ +$NetBSD: patch-aj,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- src/headers/paristio.h.orig 2008-01-16 15:55:40.000000000 +0000 ++++ src/headers/paristio.h +@@ -15,6 +15,8 @@ Foundation, Inc., 59 Temple Place - Suit + + /* This file contains memory and I/O management definitions */ + ++#include <fcntl.h> ++ + typedef struct { + long s, us; + } pari_timer; diff --git a/math/pari23/patches/patch-ak b/math/pari23/patches/patch-ak new file mode 100644 index 00000000000..643ab8cf57b --- /dev/null +++ b/math/pari23/patches/patch-ak @@ -0,0 +1,96 @@ +$NetBSD: patch-ak,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- src/test/dotest.orig 2010-02-05 10:43:24.000000000 +0000 ++++ src/test/dotest +@@ -44,14 +44,8 @@ else + fi + $RM -f $file_bench + +-dotestSUF=${dotestSUF:-"sta dyn"} +-for arg in $dotestSUF; do +- case "$arg" in +- sta|dyn) if test $x $execdir/gp-$arg; then SUF="$SUF $arg"; fi ;; +- esac +-done + file_test=gp.out +-for suf in $SUF; do eval time$suf=0 files$suf=; done ++eval time=0 files= + for testdata in $testlist; do + O=$IFS;IFS=_;set $testdata;IFS=$O;testname=$1;testmul=$2 + file_in=$testdir/in/$testname +@@ -65,44 +59,37 @@ for testdata in $testlist; do + + testmul=${testmul:-1000} + wr "* Testing $testname $c" +- for suf in $SUF; do +- wr " for gp-$suf..$c" +- case "$suf" in +- exe) file_diff=$testname.dif;; +- *) file_diff=$testname-$suf.dif +- gp=$execdir/gp-$suf;; +- esac ++ wr " for gp..$c" ++ file_diff=$testnamef.dif ++ gp=$execdir/gp + $gp -q --test < $file_in > $file_test 2>&1 + diff -c $file_out $file_test > $file_diff + pat=`grep "^[-+!] " $file_diff | grep -v "Total time"` + time=`${tail}2 $file_test | sed -n 's,.*Total time spent: \(.*\),\1,p'` + if test -n "$time"; then +- eval t='$'time$suf ++ eval t='$'time + if test -n "$exprbug"; then + t=`expr $time \'\*\' $testmul / 1000 + $t` + else + t=`expr $time '*' $testmul / 1000 + $t` + fi +- eval time$suf=$t ++ eval time=$t + fi + if test -z "$pat"; then + wr "TIME=$time"; + else + eval BUG$suf=BUG +- eval files$suf=\"'$'files$suf $file_diff\" ++ eval files=\"'$'files $file_diff\" + wr "BUG [${time:-0}]" + fi +- done + wrln + done + $RM -f $file_test + BUG= +-for suf in $SUF; do +- B=`eval echo '$'BUG$suf`; BUG="$BUG$B" +- t=`eval echo '$'time$suf` ++ B=`eval echo '$'BUG`; BUG="$BUG$B" ++ t=`eval echo '$'time` + if test -n "$B"; then B=' [BUG]'; fi +- wrln "+++$B Total bench for gp-$suf is $t" +-done ++ wrln "+++$B Total bench for gp is $t" + if test -z "$BUG"; then exit 0; fi + + pwd=`pwd` +@@ -110,18 +97,16 @@ wrln + wrln "PROBLEMS WERE NOTED. The following files list them in diff format: " + wrln "Directory: $pwd" + bugp=; buge=; +-for suf in $SUF; do +- B=`eval echo '$'BUG$suf`; BUG="$BUG$B" ++ B=`eval echo '$'BUG`; BUG="$BUG$B" + if test -n "$B"; then +- flist=`eval echo '$'files$suf` ++ flist=`eval echo '$'files` + for f in $flist; do + wrln " $f" + case "$f" in +- *program*) bugp="$suf$bugp";; ++ *program*) bugp="$bugp";; + esac + done + fi +-done + + case "x$bugp" in + x) file_diff=;; diff --git a/math/pari23/patches/patch-al b/math/pari23/patches/patch-al new file mode 100644 index 00000000000..bed4592adbd --- /dev/null +++ b/math/pari23/patches/patch-al @@ -0,0 +1,103 @@ +$NetBSD: patch-al,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- config/DOC_Make.SH.orig 2008-03-31 11:43:59.000000000 +0000 ++++ config/DOC_Make.SH +@@ -8,11 +8,11 @@ MACROS= paricfg.tex parimacro.tex + USERS_TEX=\$(MACROS) users.tex usersch1.tex usersch2.tex usersch3.tex + PARI_TEX=\$(MACROS) libpari.tex appa.tex appb.tex appc.tex usersch4.tex usersch5.tex + +-doc all: develop.dvi libpari.dvi users.dvi refcard.ps tutorial.dvi ++docdvi: develop.dvi libpari.dvi users.dvi refcard.ps tutorial.dvi + docps: develop.ps libpari.ps refcard.ps tutorial.ps users.ps INSTALL.ps +-docpdf: develop.pdf libpari.pdf users.pdf tutorial.pdf refcard.pdf INSTALL.pdf ++all doc docpdf: develop.pdf libpari.pdf users.pdf tutorial.pdf refcard.pdf INSTALL.pdf + +-.SUFFIXES: .tex .ipf .pod .inf .dumbpod .3 .html ++.SUFFIXES: .tex .ipf .pod .inf .dumbpod .3 .html .ps .pdf .dvi .idx .std + + paricfg.tex: paricfg.tex.in + sed -e 's/@version@/$version.$patch/'\\ +@@ -20,50 +20,50 @@ paricfg.tex: paricfg.tex.in + -e 's!@libdir@!$libdir!'\\ + -e 's!@datadir@!$datadir!' paricfg.tex.in > \$@ + +-%.pdf: %.tex \$(MACROS) +- pdftex \$< ++.tex.pdf: \$*.tex \$(MACROS) ++ \$(PDFTEX) \$< + +-%.dvi: %.tex \$(MACROS) ++.tex.dvi: \$*.tex \$(MACROS) + tex \$< + + libpari.pdf: \$(PARI_TEX) \$(MACROS) + -rm -f libpari.std +- pdftex libpari +- pdftex libpari +- make libpari.std; pdftex libpari; rm -f libpari.std ++ \$(PDFTEX) libpari ++ \$(PDFTEX) libpari ++ \$(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 ++ \$(PDFTEX) develop ++ \$(PDFTEX) develop ++ \$(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 + + tutorial.pdf: tutorial.tex \$(MACROS) + -rm -f tutorial.std +- pdftex tutorial +- pdftex tutorial ++ \$(PDFTEX) tutorial ++ \$(PDFTEX) tutorial + tutorial.dvi: tutorial.tex \$(MACROS) + -rm -f tutorial.std + tex tutorial + tex tutorial + +-%.ps: %.dvi ++.dvi.ps: \$*.dvi + dvips \$< -o \$@ + + refcard.ps: refcard.dvi + dvips -t landscape -t a4 refcard.dvi -o \$@ + +-%.std: %.idx ++.idx.std: \$*.idx + sed -e 's/!\([1-9]\)!/!00\1!/'\\ + -e 's/!\([1-9][0-9]\)!/!0\1!/'\\ + -e 's/\\\\EFF {}/f/g'\\ +@@ -74,13 +74,13 @@ users.dvi: \$(USERS_TEX) + -rm -f users.std + tex users + tex users +- make users.std; tex users; rm -f users.std ++ \$(MAKE) users.std; tex users; rm -f users.std + + users.pdf: \$(USERS_TEX) + -rm -f users.std +- pdftex users +- pdftex users +- make users.std; pdftex users; rm -f users.std ++ \$(PDFTEX) users ++ \$(PDFTEX) users ++ \$(MAKE) users.std; \$(PDFTEX) users; rm -f users.std + + gpman: gp.1 + nroff -man gp.1 | unix2dos -ascii > gp.man diff --git a/math/pari23/patches/patch-am b/math/pari23/patches/patch-am new file mode 100644 index 00000000000..8e076610474 --- /dev/null +++ b/math/pari23/patches/patch-am @@ -0,0 +1,13 @@ +$NetBSD: patch-am,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- config/get_ld.orig 2008-01-16 15:56:58.000000000 +0000 ++++ config/get_ld +@@ -58,7 +58,7 @@ if test "$GNULDused" = yes; then + runpathprefix='-rpath ' + else # guess... + case "$osname" in +- gnu|osf1|linux|cygwin*|freebsd|netbsd) runpathprefix='-rpath ' ;; ++ gnu|osf1|linux|cygwin*|freebsd|netbsd|dragonfly*) runpathprefix='-rpath ' ;; + solaris) runpathprefix='-R ' ;; + hpux) runpathprefix='+b ' ;; + aix) runpathprefix='-blibpath:' ;; diff --git a/math/pari23/patches/patch-an b/math/pari23/patches/patch-an new file mode 100644 index 00000000000..50366d1887c --- /dev/null +++ b/math/pari23/patches/patch-an @@ -0,0 +1,50 @@ +$NetBSD: patch-an,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- src/language/anal.h.orig 2008-06-10 15:43:14.000000000 +0000 ++++ src/language/anal.h +@@ -61,7 +61,6 @@ void changevalue_p(entree *ep, GEN x); + void changevalue(entree *ep, GEN val); + entree *do_alias(entree *ep); + int is_identifier(char *s); +-entree *is_entry_intern(char *s, entree **table, long *hash); + long is_keyword_char(char c); + char *readstring(char *src, char *s); + long loop_break(void); +@@ -80,23 +79,15 @@ void hit_return(void); + extern char *gp_function_name; + extern int (*whatnow_fun)(char *, int); + extern void (*sigint_fun)(void); +-extern void *foreignHandler; +-extern GEN (*foreignExprHandler)(char*); +-extern char foreignExprSwitch; +-extern entree * (*foreignAutoload)(char*, long); +-extern void (*foreignFuncFree)(entree *); + extern int (*default_exception_handler)(long); + + extern const long functions_tblsz; /* hashcodes table size */ + /* Variables containing the list of PARI functions */ +-extern entree **functions_hash; /* functions hashtable */ + extern entree **members_hash; /* members hashtable */ +-extern entree functions_basic[]; + + /* Variables containing the list of specific GP functions */ + extern entree functions_gp[]; + extern entree gp_member_list[]; +-extern entree functions_highlevel[]; + + /* Variables containing the list of old PARI fonctions (up to 1.39.15) */ + extern entree **funct_old_hash; /* hashtable */ +@@ -118,13 +109,6 @@ enum { RET_GEN, RET_INT, RET_LONG, RET_V + extern void *PARI_stack_limit; + #endif + +-/* entrees */ +-#define EpVALENCE(ep) ((ep)->valence & 0xFF) +-#define EpSTATIC(ep) ((ep)->valence & 0x100) +-#define EpSETSTATIC(ep) ((ep)->valence |= 0x100) +-#define EpPREDEFINED(ep) (EpVALENCE(ep) < EpUSER) +-enum { EpUSER = 100, EpNEW, EpALIAS, EpVAR, EpGVAR, EpMEMBER, EpINSTALL }; +- + /* defaults */ + char* get_sep(const char *t); + long get_int(const char *s, long dflt); diff --git a/math/pari23/patches/patch-ao b/math/pari23/patches/patch-ao new file mode 100644 index 00000000000..ac0d1a8bcd2 --- /dev/null +++ b/math/pari23/patches/patch-ao @@ -0,0 +1,29 @@ +$NetBSD: patch-ao,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- src/headers/paripriv.h.orig 2008-03-31 11:43:59.000000000 +0000 ++++ src/headers/paripriv.h +@@ -850,4 +850,24 @@ GEN kbesselnew(GEN n, GEN z, long pr + GEN polylogd0(long m, GEN x, long flag, long prec); + GEN twistpartialzeta(GEN p, GEN q, long f, long c, GEN va, GEN cff); + ++/* Something from src/languages/anal.[ch] to support Math::Pari */ ++ ++/* entrees */ ++#define EpVALENCE(ep) ((ep)->valence & 0xFF) ++#define EpSTATIC(ep) ((ep)->valence & 0x100) ++#define EpSETSTATIC(ep) ((ep)->valence |= 0x100) ++#define EpPREDEFINED(ep) (EpVALENCE(ep) < EpUSER) ++enum { EpUSER = 100, EpNEW, EpALIAS, EpVAR, EpGVAR, EpMEMBER, EpINSTALL }; ++ ++extern entree **functions_hash; /* functions hashtable */ ++extern entree functions_basic[]; ++extern entree functions_highlevel[]; ++extern entree *is_entry_intern(char *s, entree **table, long *hash); ++ ++extern void *foreignHandler; ++extern GEN (*foreignExprHandler)(char*); ++extern char foreignExprSwitch; ++extern entree * (*foreignAutoload)(char*, long); ++extern void (*foreignFuncFree)(entree *); ++ + ENDEXTERN diff --git a/math/pari23/patches/patch-ap b/math/pari23/patches/patch-ap new file mode 100644 index 00000000000..6fe8242d65a --- /dev/null +++ b/math/pari23/patches/patch-ap @@ -0,0 +1,13 @@ +$NetBSD: patch-ap,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- config/TOP_Make.SH.orig 2008-10-23 16:30:37.000000000 +0000 ++++ config/TOP_Make.SH +@@ -40,7 +40,7 @@ dft target:: + @echo "Available extra tests: test-all $top_test_extra" + + all:: +- @-cd doc && \$(MAKE) doc ++# @-cd doc && \$(MAKE) doc + @\$(MAKE) gp + + gp bench test-kernel test-all $top_test_extra $top_dotest_extra install cleanobj cleantest install-bin install-doc install-data install-lib-sta install-bin-sta dobench tune:: diff --git a/math/pari23/patches/patch-config_get_fltk b/math/pari23/patches/patch-config_get_fltk new file mode 100644 index 00000000000..e07b86a9548 --- /dev/null +++ b/math/pari23/patches/patch-config_get_fltk @@ -0,0 +1,12 @@ +$NetBSD: patch-config_get_fltk,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- config/get_fltk.orig 2008-03-31 11:43:59.000000000 +0000 ++++ config/get_fltk +@@ -30,6 +30,6 @@ if test -n "$with_fltk"; then + case "$osname" in + cygwin) FLTK_LIBS="-lgdi32 -lole32 -luuid -lwsock32 -lsupc++" ;; + darwin) FLTK_LIBS="-framework Carbon -lsupc++" ;; +- *) FLTK_LIBS="$X11_LIBS" ;; ++ *) FLTK_LIBS="$X11_LIBS -lstdc++" ;; + esac + fi diff --git a/math/pari23/patches/patch-src_headers_paridecl.h b/math/pari23/patches/patch-src_headers_paridecl.h new file mode 100644 index 00000000000..2bd3ac58a97 --- /dev/null +++ b/math/pari23/patches/patch-src_headers_paridecl.h @@ -0,0 +1,13 @@ +$NetBSD: patch-src_headers_paridecl.h,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- src/headers/paridecl.h.orig 2015-01-22 19:57:35.000000000 +0000 ++++ src/headers/paridecl.h +@@ -264,7 +264,7 @@ GEN readseq(char *t); + long manage_var(long n, entree *ep); + void name_var(long n, char *s); + GEN strtoGENstr(const char *s); +-GEN strtoi(char *s); ++GEN pari_strtoi(char *s); + GEN strtor(char *s, long prec); + GEN type0(GEN x); + diff --git a/math/pari23/patches/patch-src_language_anal.c b/math/pari23/patches/patch-src_language_anal.c new file mode 100644 index 00000000000..1b05c32d674 --- /dev/null +++ b/math/pari23/patches/patch-src_language_anal.c @@ -0,0 +1,13 @@ +$NetBSD: patch-src_language_anal.c,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- src/language/anal.c.orig 2015-01-22 19:57:33.000000000 +0000 ++++ src/language/anal.c +@@ -2520,7 +2520,7 @@ int_read(char **s) + } + + GEN +-strtoi(char *s) { return int_read(&s); } ++pari_strtoi(char *s) { return int_read(&s); } + + GEN + strtor(char *s, long PREC) diff --git a/math/pari23/patches/patch-src_language_es.c b/math/pari23/patches/patch-src_language_es.c new file mode 100644 index 00000000000..49780c60086 --- /dev/null +++ b/math/pari23/patches/patch-src_language_es.c @@ -0,0 +1,23 @@ +$NetBSD: patch-src_language_es.c,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +Remove fgets() indirection to fix build with USE_FORTIFY. + +--- src/language/es.c.orig 2008-03-31 11:43:58.000000000 +0000 ++++ src/language/es.c +@@ -215,7 +215,6 @@ gp_read_stream_buf(FILE *fi, Buffer *b) + init_filtre(&F, b); + + IM.file = fi; +- IM.fgets= &fgets; + IM.getline= &file_input; + IM.free = 0; + return input_loop(&F,&IM); +@@ -309,7 +308,7 @@ file_input(char **s0, int junk, input_me + *s0 = b->buf + used0; + } + s = b->buf + used; +- if (! IM->fgets(s, left, IM->file)) ++ if (! fgets(s, left, IM->file)) + return first? NULL: *s0; /* EOF */ + + l = strlen(s); first = 0; diff --git a/math/pari23/patches/patch-src_modules_mpqs.c b/math/pari23/patches/patch-src_modules_mpqs.c new file mode 100644 index 00000000000..1a67027cf06 --- /dev/null +++ b/math/pari23/patches/patch-src_modules_mpqs.c @@ -0,0 +1,40 @@ +$NetBSD: patch-src_modules_mpqs.c,v 1.1 2016/03/03 13:23:22 wiz Exp $ + +--- src/modules/mpqs.c.orig 2015-01-22 19:57:31.000000000 +0000 ++++ src/modules/mpqs.c +@@ -2345,7 +2345,7 @@ mpqs_combine_large_primes(mpqs_handle_t + *f = gerepileuptoint(av0, inv_q); + return c; + } +- Y1 = strtoi(e[0].Y); ++ Y1 = pari_strtoi(e[0].Y); + av2 = avma; /* preserve inv_q and Y1 */ + + while (fgets(buf, MPQS_STRING_LENGTH, COMB)) +@@ -2371,7 +2371,7 @@ mpqs_combine_large_primes(mpqs_handle_t + *f = gerepileuptoint(av0, inv_q); + return c; + } +- Y1 = strtoi(e[i].Y); ++ Y1 = pari_strtoi(e[i].Y); + i = 1 - i; /* subsequent relations go to other row */ + av2 = avma; /* preserve inv_q and Y1 */ + continue; +@@ -2381,7 +2381,7 @@ mpqs_combine_large_primes(mpqs_handle_t + memset((void *)ei, 0, ei_size * sizeof(long)); + mpqs_set_exponents(ei, e[0].E); + mpqs_set_exponents(ei, e[1].E); +- Y2 = strtoi(e[i].Y); ++ Y2 = pari_strtoi(e[i].Y); + new_Y = modii(mulii(mulii(Y1, Y2), inv_q), h->N); + new_Y1 = subii(h->N, new_Y); + if (absi_cmp(new_Y1, new_Y) < 0) new_Y = new_Y1; +@@ -2692,7 +2692,7 @@ mpqs_add_relation(GEN Y_prod, GEN N, lon + s = strchr(rel, ':') - 1; + *s = '\0'; + +- res = remii(mulii(Y_prod, strtoi(rel)), N); ++ res = remii(mulii(Y_prod, pari_strtoi(rel)), N); + + s = strtok(s + 3, " \n"); + while (s != NULL) |