summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-mathematics/pari/ChangeLog11
-rw-r--r--sci-mathematics/pari/files/pari-2.5.0-doc-make.patch82
-rw-r--r--sci-mathematics/pari/files/pari-2.5.0-macos.patch21
-rw-r--r--sci-mathematics/pari/files/pari-2.5.0-mp.c.patch22
-rw-r--r--sci-mathematics/pari/pari-2.5.0-r1.ebuild141
-rw-r--r--sci-mathematics/pari/pari-2.5.0.ebuild132
6 files changed, 276 insertions, 133 deletions
diff --git a/sci-mathematics/pari/ChangeLog b/sci-mathematics/pari/ChangeLog
index 10220da66922..305d6464cfb9 100644
--- a/sci-mathematics/pari/ChangeLog
+++ b/sci-mathematics/pari/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sci-mathematics/pari
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/pari/ChangeLog,v 1.83 2011/07/26 19:30:38 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/pari/ChangeLog,v 1.84 2011/07/27 19:03:56 bicatali Exp $
+
+*pari-2.5.0-r1 (27 Jul 2011)
+
+ 27 Jul 2011; Sébastien Fabbro <bicatali@gentoo.org> -pari-2.5.0.ebuild,
+ +pari-2.5.0-r1.ebuild, +files/pari-2.5.0-doc-make.patch,
+ +files/pari-2.5.0-macos.patch, +files/pari-2.5.0-mp.c.patch:
+ Split up data to another pari-data packages, due to upstream not updating its
+ package names. Added a few patches submitted by Francois Bissey: one for
+ parallel make, one for sage compatibility and one for ppc-macos
*pari-2.5.0 (26 Jul 2011)
diff --git a/sci-mathematics/pari/files/pari-2.5.0-doc-make.patch b/sci-mathematics/pari/files/pari-2.5.0-doc-make.patch
new file mode 100644
index 000000000000..017d6098f368
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.5.0-doc-make.patch
@@ -0,0 +1,82 @@
+--- config/DOC_Make.SH.orig 2010-09-07 07:26:42.000000000 +1200
++++ config/DOC_Make.SH 2010-09-26 14:56:35.445516459 +1300
+@@ -11,7 +11,8 @@
+
+ doc all: 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
++#docpdf: develop.pdf libpari.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
+
+@@ -30,27 +31,49 @@
+ usersch3.tex: ../src/desc/doc_make ../src/desc/pari.desc usersFUNCS.tex
+ cd ../src/desc && \$(PERL) doc_make > ../../doc/usersch3.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
+
+ tutorial.pdf: tutorial.tex \$(MACROS)
+ -rm -f tutorial.std
+@@ -78,13 +101,13 @@
+ -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
++ \$(MAKE) users.std; pdftex users; rm -f users.std
+
+ gpman: gp.1
+ nroff -man gp.1 | unix2dos -ascii > gp.man
diff --git a/sci-mathematics/pari/files/pari-2.5.0-macos.patch b/sci-mathematics/pari/files/pari-2.5.0-macos.patch
new file mode 100644
index 000000000000..321007210076
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.5.0-macos.patch
@@ -0,0 +1,21 @@
+--- config/get_dlld.orig 2010-12-21 13:49:25.000000000 +1300
++++ config/get_dlld 2010-12-21 14:04:21.000000000 +1300
+@@ -93,7 +93,7 @@
+ *) extra=;;
+ esac
+ case "$osname" in
+- darwin) shared=-dynamiclib;;
++ darwin) shared="-dynamiclib -install_name \$(PURELIBDIR)/\$(LIBPARI_DYN)";;
+ *) shared=-shared;;
+ esac
+ DLLDFLAGS="$shared $extra \$(CFLAGS) \$(DLCFLAGS) $DLLDFLAGS"
+--- config/Makefile.SH.orig 2010-12-23 11:51:01.000000000 +1300
++++ config/Makefile.SH 2010-12-23 11:52:10.000000000 +1300
+@@ -231,6 +231,7 @@
+ # DESTDIR is used to install to a false hierachy (to build a Debian package)
+ INCLUDEDIR= "\$(DESTDIR)$includedir"
+ LIBDIR = "\$(DESTDIR)$libdir"
++PURELIBDIR= $libdir
+ BINDIR = "\$(DESTDIR)$bindir"
+ MANDIR = "\$(DESTDIR)$mandir"
+ DATADIR = "\$(DESTDIR)$datadir"
diff --git a/sci-mathematics/pari/files/pari-2.5.0-mp.c.patch b/sci-mathematics/pari/files/pari-2.5.0-mp.c.patch
new file mode 100644
index 000000000000..1bdd047e07d2
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.5.0-mp.c.patch
@@ -0,0 +1,22 @@
+Index: src/kernel/gmp/mp.c
+===================================================================
+--- src/kernel/gmp/mp.c (revision 13151)
++++ src/kernel/gmp/mp.c (working copy)
+@@ -45,18 +45,8 @@
+ /*We need PARI invmod renamed to invmod_pari*/
+ #define INVMOD_PARI
+
+-static void *gmp_realloc(void *ptr, size_t old_size, size_t new_size) {
+- (void)old_size; return (void *) pari_realloc(ptr,new_size);
+-}
+-
+-static void gmp_free(void *ptr, size_t old_size){
+- (void)old_size; pari_free(ptr);
+-}
+-
+ int pari_kernel_init(void)
+ {
+- /* Use pari_malloc instead of malloc */
+- mp_set_memory_functions((void *(*)(size_t)) pari_malloc, gmp_realloc, gmp_free);
+ return 0;
+ }
diff --git a/sci-mathematics/pari/pari-2.5.0-r1.ebuild b/sci-mathematics/pari/pari-2.5.0-r1.ebuild
new file mode 100644
index 000000000000..7755b7b8d6fb
--- /dev/null
+++ b/sci-mathematics/pari/pari-2.5.0-r1.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/pari/pari-2.5.0-r1.ebuild,v 1.1 2011/07/27 19:03:56 bicatali Exp $
+
+EAPI="4"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A software package for computer-aided number theory"
+HOMEPAGE="http://pari.math.u-bordeaux.fr/"
+SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="doc data fltk gmp X"
+
+RDEPEND="sys-libs/readline
+ fltk? ( x11-libs/fltk:1 )
+ gmp? ( dev-libs/gmp )
+ X? ( x11-libs/libX11 )
+ doc? ( X? ( x11-misc/xdg-utils ) )
+ data? ( sci-mathematics/pari-data )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+SITEFILE=50${PN}-gentoo.el
+
+get_compile_dir() {
+ pushd "${S}/config" > /dev/null
+ local fastread=yes
+ source ./get_archos
+ popd > /dev/null
+ echo "O${osname}-${arch}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}"-2.3.2-strip.patch
+ epatch "${FILESDIR}/${PN}"-2.3.2-ppc-powerpc-arch-fix.patch
+ # fix parallel make
+ epatch "${FILESDIR}/${PN}"-2.5.0-doc-make.patch
+ # sage error handling patch
+ epatch "${FILESDIR}/${PN}"-2.5.0-mp.c.patch
+ # OS X: add -install_name to the linker option
+ epatch "${FILESDIR}/${PN}"-2.5.0-macos.patch
+
+ # disable default building of docs during install
+ sed -i \
+ -e "s:install-doc install-examples:install-examples:" \
+ config/Makefile.SH || die "Failed to fix makefile"
+
+ # propagate ldflags
+ sed -i \
+ -e 's/$shared $extra/$shared $extra \\$(LDFLAGS)/' \
+ config/get_dlld || die "failed to fix LDFLAGS"
+ # move doc dir to a gentoo doc dir and replace acroread by xdg-open
+ sed -i \
+ -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \
+ -e 's:"acroread":"xdg-open":' \
+ doc/gphelp.in || die "Failed to fix doc dir"
+
+ sed -i "s:/usr:${EPREFIX}/usr:g" config/get_X11 \
+ || die "Failed to fix get_X11"
+
+ # usersch3.tex is generated
+ rm -f doc/usersch3.tex || die "failed to remove generated file"
+}
+
+src_configure() {
+ tc-export CC
+
+ # need to force optimization here, as it breaks without
+ if is-flag -O0; then
+ replace-flags -O0 -O2
+ elif ! is-flag -O?; then
+ append-flags -O2
+ fi
+
+ local myconfig
+ if use gmp ; then
+ myconfig="--with-gmp=${EPREFIX}/usr"
+ else
+ myconfig="--with-gmp=no"
+ fi
+
+ # sysdatadir installs a pari.cfg stuff which is informative only
+ ./Configure \
+ --prefix="${EPREFIX}"/usr \
+ --datadir="${EPREFIX}"/usr/share/${PN} \
+ --libdir="${EPREFIX}"/usr/$(get_libdir) \
+ --sysdatadir="${EPREFIX}"/usr/share/doc/${PF} \
+ --mandir="${EPREFIX}"/usr/share/man/man1 \
+ --with-readline="${EPREFIX}"/usr \
+ --with-ncurses-lib="${EPREFIX}"/usr/$(get_libdir) \
+ $myconfig \
+ || die "./Configure failed"
+}
+
+src_compile() {
+ if use hppa; then
+ mymake=DLLD\="${EPREFIX}"/usr/bin/gcc\ DLLDFLAGS\=-shared\ -Wl,-soname=\$\(LIBPARI_SONAME\)\ -lm
+ fi
+
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+
+ # upstream set -fno-strict-aliasing.
+ # aliasing is a known issue on amd64, work on x86 by sheer luck
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -fno-strict-aliasing -DGCC_INLINE -fPIC" lib-dyn
+ emake ${mymake} \
+ CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp
+
+ if use doc; then
+ cd "${S}" || die "failed to change directory"
+ # To prevent sandbox violations by metafont
+ VARTEXFONTS="${T}"/fonts emake docpdf
+ fi
+}
+
+src_test() {
+ emake dobench
+}
+
+src_install() {
+ default
+ dodoc MACHINES COMPAT
+ if use doc; then
+ # install gphelp and the pdf documentations manually.
+ # the install-doc target is overkill.
+ dodoc doc/*.pdf
+ dobin doc/gphelp
+ insinto /usr/share/doc/${PF}
+ # gphelp looks for some of the tex sources...
+ doins doc/*.tex doc/translations
+ # Install the examples - for real.
+ local installdir=$(get_compile_dir)
+ cd "${installdir}" || die "failed to change directory"
+ emake EXDIR="${ED}/usr/share/doc/${PF}/examples" install-examples
+ fi
+}
diff --git a/sci-mathematics/pari/pari-2.5.0.ebuild b/sci-mathematics/pari/pari-2.5.0.ebuild
deleted file mode 100644
index 31b626d984c8..000000000000
--- a/sci-mathematics/pari/pari-2.5.0.ebuild
+++ /dev/null
@@ -1,132 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/pari/pari-2.5.0.ebuild,v 1.1 2011/07/26 19:30:38 bicatali Exp $
-
-EAPI=4
-inherit eutils flag-o-matic toolchain-funcs
-
-DESCRIPTION="A software package for computer-aided number theory"
-HOMEPAGE="http://pari.math.u-bordeaux.fr/"
-
-SRC_COM="http://pari.math.u-bordeaux.fr/pub/${PN}"
-SRC_URI="${SRC_COM}/unix/${P}.tar.gz
- data? ( ${SRC_COM}/packages/elldata.tgz
- ${SRC_COM}/packages/galdata.tgz
- ${SRC_COM}/packages/galpol.tgz
- ${SRC_COM}/packages/seadata.tgz
- ${SRC_COM}/packages/nftables.tgz )"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-solaris"
-IUSE="doc data fltk gmp static-libs X"
-
-RDEPEND="sys-libs/readline
- fltk? ( x11-libs/fltk:1 )
- gmp? ( dev-libs/gmp )
- X? ( x11-libs/libX11 )
- doc? ( X? ( x11-misc/xdg-utils ) )"
-DEPEND="${RDEPEND}
- doc? ( virtual/latex-base )"
-
-SITEFILE=50${PN}-gentoo.el
-
-get_compile_dir() {
- pushd "${S}/config" >& /dev/null
- local fastread=yes
- source ./get_archos
- popd >& /dev/null
- echo "O${osname}-${arch}"
-}
-
-src_prepare() {
- # move data into place
- if use data; then
- mv "${WORKDIR}"/data "${S}" || die "failed to move data"
- fi
- epatch "${FILESDIR}/"${PN}-2.3.2-strip.patch
- epatch "${FILESDIR}/"${PN}-2.3.2-ppc-powerpc-arch-fix.patch
- epatch "${FILESDIR}/"${PN}-2.3.5-doc-make.patch
-
- # disable default building of docs during install
- sed -i \
- -e "s:install-doc install-examples:install-examples:" \
- config/Makefile.SH || die "Failed to fix makefile"
- # propagate ldflags
- sed -i \
- -e 's/-shared $extra/-shared $extra \\$(LDFLAGS)/' \
- config/get_dlld || die "Failed to fix LDFLAGS"
- # move doc dir to a gentoo doc dir and replace hardcoded xdvi by xdg-open
- sed -i \
- -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \
- -e 's:"xdvi":"xdg-open":' \
- -e 's:xdvi -paper 29.7x21cm:xdg-open:' \
- doc/gphelp.in || die "Failed to fix doc dir"
-}
-
-src_configure() {
- append-flags -fno-strict-aliasing
- tc-export CC
- # need to force optimization here, as it breaks without
- if is-flag -O0; then
- replace-flags -O0 -O2
- elif ! is-flag -O?; then
- append-flags -O2
- fi
- # sysdatadir installs a pari.cfg stuff which is informative only
- ./Configure \
- --prefix="${EPREFIX}"/usr \
- --datadir="${EPREFIX}"/usr/share/${PN} \
- --libdir="${EPREFIX}"/usr/$(get_libdir) \
- --sysdatadir="${EPREFIX}"/usr/share/doc/${PF} \
- --mandir="${EPREFIX}"/usr/share/man/man1 \
- --with-readline \
- $(use_with gmp) \
- || die "./Configure failed"
-}
-
-src_compile() {
- if use hppa; then
- mymake=DLLD\=/usr/bin/gcc\ DLLDFLAGS\=-shared\ -Wl,-soname=\$\(LIBPARI_SONAME\)\ -lm
- fi
-
- local installdir=$(get_compile_dir)
- cd "${installdir}" || die "Bad directory"
-
- emake ${mymake} CFLAGS="${CFLAGS} -DGCC_INLINE -fPIC" lib-dyn
-
- use static-libs && \
- emake ${mymake} CFLAGS="${CFLAGS} -DGCC_INLINE" lib-sta
-
- emake ${mymake} CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp
-
- if use doc; then
- cd "${S}"
- # To prevent sandbox violations by metafont
- VARTEXFONTS="${T}"/fonts emake -j1 docpdf
- fi
-}
-
-src_test() {
- emake dobench
-}
-
-src_install() {
- default
- dodoc MACHINES COMPAT
- if use doc; then
- emake -j1 \
- DESTDIR="${D}" \
- EXDIR="${ED}/usr/share/doc/${PF}/examples" \
- DOCDIR="${ED}/usr/share/doc/${PF}" \
- install-doc
- insinto /usr/share/doc/${PF}
- doins doc/*.pdf
- fi
-
- use data && \
- emake DESTDIR="${D}" install-data
-
- use static-libs && \
- emake DESTDIR="${D}" install-lib-sta
-}