diff options
author | Markus Dittrich <markusle@gentoo.org> | 2008-05-13 01:44:37 +0000 |
---|---|---|
committer | Markus Dittrich <markusle@gentoo.org> | 2008-05-13 01:44:37 +0000 |
commit | 372847fad4a6d32a2ca2336a89f3c607a82eae77 (patch) | |
tree | ca3e3b5a277c6357f0dda097e5504c390da48529 /sci-mathematics/pari | |
parent | Stable for HPPA (bug #221063). (diff) | |
download | gentoo-2-372847fad4a6d32a2ca2336a89f3c607a82eae77.tar.gz gentoo-2-372847fad4a6d32a2ca2336a89f3c607a82eae77.tar.bz2 gentoo-2-372847fad4a6d32a2ca2336a89f3c607a82eae77.zip |
Added enhancements to pari ebuild needed for future sage ebuild (see bug #220521).
(Portage version: 2.1.5_rc7)
Diffstat (limited to 'sci-mathematics/pari')
-rw-r--r-- | sci-mathematics/pari/ChangeLog | 14 | ||||
-rw-r--r-- | sci-mathematics/pari/files/pari-2.3.3-alglin.patch | 17 | ||||
-rw-r--r-- | sci-mathematics/pari/pari-2.3.3.ebuild | 62 |
3 files changed, 78 insertions, 15 deletions
diff --git a/sci-mathematics/pari/ChangeLog b/sci-mathematics/pari/ChangeLog index 2e7ba1828d7f..2aec28588630 100644 --- a/sci-mathematics/pari/ChangeLog +++ b/sci-mathematics/pari/ChangeLog @@ -1,10 +1,22 @@ # ChangeLog for sci-mathematics/pari # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/pari/ChangeLog,v 1.59 2008/05/12 16:04:21 corsair Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/pari/ChangeLog,v 1.60 2008/05/13 01:44:37 markusle Exp $ + + 13 May 2008; Markus Dittrich <markusle@gentoo.org> + +files/pari-2.3.3-alglin.patch, pari-2.3.3.ebuild: + Added enhancements to pari ebuild needed for future sage ebuild (see + bug #220521). Thanks much to Francois Bissey + <f.r.bissey@massey.ac.nz> for his patches. 12 May 2008; Markus Rothe <corsair@gentoo.org> pari-2.3.2-r1.ebuild: Stable on ppc64 + 07 May 2008; Markus Dittrich <markusle@gentoo.org> + +files/pari-2.3.3-alglin.patch, pari-2.3.3.ebuild: + Added additional bits eventually needed by sage (see bug #220521). Many + thanks go to Francois Bissey <f.r.bissey@massey.ac.nz> for providing the + necessary patches. + *pari-2.3.3 (04 May 2008) 04 May 2008; Markus Dittrich <markusle@gentoo.org> -pari-2.1.5-r4.ebuild, diff --git a/sci-mathematics/pari/files/pari-2.3.3-alglin.patch b/sci-mathematics/pari/files/pari-2.3.3-alglin.patch new file mode 100644 index 000000000000..f0a9acc0fcb9 --- /dev/null +++ b/sci-mathematics/pari/files/pari-2.3.3-alglin.patch @@ -0,0 +1,17 @@ +diff -Naur pari-2.3.3/src/basemath/alglin2.c pari-2.3.3.new/src/basemath/alglin2.c +--- pari-2.3.3/src/basemath/alglin2.c 2006-10-03 19:15:33.000000000 -0400 ++++ pari-2.3.3.new/src/basemath/alglin2.c 2008-05-06 21:05:06.000000000 -0400 +@@ -3082,11 +3082,9 @@ + for (i=h[j]; i; i--) + { + a = gcoeff(A,i,j); +- if (!signe(a)) continue; +- + k = c[i]; +- ZV_elem(a,gcoeff(A,i,k), A,B, j,k); +- ZM_reduce(A,B, i,k); ++ if (signe(a)) ZV_elem(a,gcoeff(A,i,k), A,B, j,k); ++ ZM_reduce(A,B, i,k); /* ensure non-negative entries, even if a = 0 */ + if (low_stack(lim, stack_lim(av1,1))) + { + if (DEBUGMEM>1) pari_warn(warnmem,"hnfall[3], j = %ld", j); diff --git a/sci-mathematics/pari/pari-2.3.3.ebuild b/sci-mathematics/pari/pari-2.3.3.ebuild index 5ddfd4d87fa5..53c7cd4c2ec5 100644 --- a/sci-mathematics/pari/pari-2.3.3.ebuild +++ b/sci-mathematics/pari/pari-2.3.3.ebuild @@ -1,22 +1,26 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/pari/pari-2.3.3.ebuild,v 1.1 2008/05/04 16:34:52 markusle Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/pari/pari-2.3.3.ebuild,v 1.2 2008/05/13 01:44:37 markusle Exp $ inherit elisp-common eutils flag-o-matic multilib 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/pari/unix/${P}.tar.gz" +SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz + elliptic? ( http://pari.math.u-bordeaux.fr/pub/${PN}/packages/elldata.tgz ) + galois? ( http://pari.math.u-bordeaux.fr/pub/${PN}/packages/galdata.tgz )" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86" -IUSE="doc emacs X" +IUSE="doc emacs X elliptic galois gmp static" DEPEND="doc? ( virtual/tetex ) sys-libs/readline X? ( x11-libs/libX11 ) - emacs? ( virtual/emacs )" + emacs? ( virtual/emacs ) + gmp? ( dev-libs/gmp )" + SITEFILE=50${PN}-gentoo.el get_compile_dir() { @@ -31,8 +35,15 @@ src_unpack() { unpack ${A} cd "${S}" + # move data into place + if ( use galois || use elliptic ); 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}/"${P}-alglin.patch # disable default building of docs during install sed -e "s:install-doc install-examples:install-examples:" \ @@ -47,26 +58,37 @@ src_compile() { append-flags -O2 fi + local myconf="--with-readline" + use gmp && myconf="${myconf} --kernel=gmp" + ./Configure \ --prefix=/usr \ --datadir=/usr/share/${P} \ --libdir=/usr/$(get_libdir) \ - --mandir=/usr/share/man/man1 || die "./Configure failed" + --mandir=/usr/share/man/man1 \ + ${myconf} \ + || die "./Configure failed" if use hppa; then mymake=DLLD\=/usr/bin/gcc\ DLLDFLAGS\=-shared\ -Wl,-soname=\$\(LIBPARI_SONAME\)\ -lm fi - # Shared libraries should be PIC on ALL architectures. - # Danny van Dyk <kugelfang@gentoo.org> 2005/03/31 - # Fixes BUG #49583 local installdir=$(get_compile_dir) - einfo "Building shared library..." cd "${installdir}" || die "Bad directory. File a BUG!" - emake ${mymake} CFLAGS="${CFLAGS} -DGCC_INLINE -fPIC" lib-dyn || die "Building shared library failed!" + + einfo "Building shared library..." + emake ${mymake} CFLAGS="${CFLAGS} -DGCC_INLINE -fPIC" lib-dyn \ + || die "Building shared library failed!" + + if use static; then + einfo "Building static library..." + emake ${mymake} CFLAGS="${CFLAGS} -DGCC_INLINE" lib-sta \ + || die "Building static library failed!" + fi einfo "Building executables..." - emake ${mymake} CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp || die "Building executables failed!" + emake ${mymake} CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp \ + || die "Building executables failed!" if use doc; then cd "${S}" @@ -84,11 +106,12 @@ src_test() { } src_install() { - emake DESTDIR="${D}" LIBDIR="${D}"/usr/$(get_libdir) install || \ - die "Install failed" + emake DESTDIR="${D}" LIBDIR="${D}"/usr/$(get_libdir) install \ + || die "Install failed" if use emacs; then - elisp-install ${PN} emacs/*.el emacs/*.elc || die "elisp-install failed" + elisp-install ${PN} emacs/*.el emacs/*.elc \ + || die "elisp-install failed" elisp-site-file-install "${FILESDIR}/${SITEFILE}" fi @@ -100,6 +123,17 @@ src_install() { doins doc/*.pdf || die "Failed to install pdf docs" fi + if (use galois || use elliptic); then + emake DESTDIR="${D}" LIBDIR="${D}"/usr/$(get_libdir) install-data \ + || die "Failed to install data files" + fi + + if use static; then + emake DESTDIR="${D}" LIBDIR="${D}"/usr/$(get_libdir) install-lib-sta || \ + die "Install of static library failed" + fi + + #remove superfluous doc directory rm -fr "${D}/usr/share/${P}/doc" || \ die "Failed to clean up doc directory" |