Split up data to another pari-data packages, due to upstream not updating its package...
authorSebastien Fabbro <bicatali@gentoo.org>
Wed, 27 Jul 2011 19:03:56 +0000 (19:03 +0000)
committerSebastien Fabbro <bicatali@gentoo.org>
Wed, 27 Jul 2011 19:03:56 +0000 (19:03 +0000)
Package-Manager: portage-2.1.10.7/cvs/Linux x86_64

sci-mathematics/pari/ChangeLog
sci-mathematics/pari/files/pari-2.5.0-doc-make.patch [new file with mode: 0644]
sci-mathematics/pari/files/pari-2.5.0-macos.patch [new file with mode: 0644]
sci-mathematics/pari/files/pari-2.5.0-mp.c.patch [new file with mode: 0644]
sci-mathematics/pari/pari-2.5.0-r1.ebuild [new file with mode: 0644]
sci-mathematics/pari/pari-2.5.0.ebuild [deleted file]

index 10220da66922b7876c8322b0992d205010580dfa..305d6464cfb91836eef3d6f3950a1b1ed988ec26 100644 (file)
@@ -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 (file)
index 0000000..017d609
--- /dev/null
@@ -0,0 +1,82 @@
+--- config/DOC_Make.SH.orig    2010-09-07 07:26:42.000000000 +1200\r
++++ config/DOC_Make.SH 2010-09-26 14:56:35.445516459 +1300\r
+@@ -11,7 +11,8 @@\r
+ \r
+ doc all: develop.dvi libpari.dvi users.dvi refcard.ps tutorial.dvi\r
+ docps: develop.ps libpari.ps refcard.ps tutorial.ps users.ps INSTALL.ps\r
+-docpdf: develop.pdf libpari.pdf users.pdf tutorial.pdf refcard.pdf INSTALL.pdf\r
++#docpdf: develop.pdf libpari.pdf users.pdf tutorial.pdf refcard.pdf INSTALL.pdf\r
++docpdf: \$(PARI_TEX) \$(MACROS) pass1 pass2 indexing refcard.pdf INSTALL.pdf\r
+ \r
+ .SUFFIXES: .tex .ipf .pod .inf .dumbpod .3 .html\r
+ \r
+@@ -30,27 +31,49 @@\r
+ usersch3.tex: ../src/desc/doc_make ../src/desc/pari.desc usersFUNCS.tex\r
+       cd ../src/desc && \$(PERL) doc_make > ../../doc/usersch3.tex\r
+ \r
++pass1: \$(PARI_TEX) \$(USERS_TEX) develop.tex tutorial.tex \$(MACROS)\r
++      -rm -f *.std\r
++      pdftex libpari\r
++      pdftex develop\r
++      pdftex tutorial\r
++      pdftex users\r
++\r
++pass2: pass1\r
++      pdftex libpari\r
++      pdftex develop\r
++      pdftex tutorial\r
++      pdftex users\r
++\r
++indexing: pass2\r
++      \$(MAKE) libpari.std\r
++      \$(MAKE) develop.std\r
++      \$(MAKE) users.std\r
++      pdftex libpari\r
++      pdftex develop\r
++      pdftex users\r
++      -rm -f *.std\r
++\r
+ libpari.pdf: \$(PARI_TEX) \$(MACROS)\r
+       -rm -f libpari.std\r
+       pdftex libpari\r
+       pdftex libpari\r
+-      make libpari.std; pdftex libpari; rm -f libpari.std\r
++      \$(MAKE) libpari.std; pdftex libpari; rm -f libpari.std\r
+ libpari.dvi: \$(PARI_TEX) \$(MACROS)\r
+       -rm -f libpari.std\r
+       tex libpari\r
+       tex libpari\r
+-      make libpari.std; tex libpari; rm -f libpari.std\r
++      \$(MAKE) libpari.std; tex libpari; rm -f libpari.std\r
+ \r
+ develop.pdf: develop.tex \$(MACROS)\r
+       -rm -f develop.std\r
+       pdftex develop\r
+       pdftex develop\r
+-      make develop.std; pdftex develop; rm -f develop.std\r
++      \$(MAKE) develop.std; pdftex develop; rm -f develop.std\r
+ develop.dvi: develop.tex \$(MACROS)\r
+       -rm -f develop.std\r
+       tex develop\r
+       tex develop\r
+-      make develop.std; tex develop; rm -f develop.std\r
++      \$(MAKE) develop.std; tex develop; rm -f develop.std\r
+ \r
+ tutorial.pdf: tutorial.tex \$(MACROS)\r
+       -rm -f tutorial.std\r
+@@ -78,13 +101,13 @@\r
+       -rm -f users.std\r
+       tex users\r
+       tex users\r
+-      make users.std; tex users; rm -f users.std\r
++      \$(MAKE) users.std; tex users; rm -f users.std\r
+ \r
+ users.pdf: \$(USERS_TEX)\r
+       -rm -f users.std\r
+       pdftex users\r
+       pdftex users\r
+-      make users.std; pdftex users; rm -f users.std\r
++      \$(MAKE) users.std; pdftex users; rm -f users.std\r
+ \r
+ gpman: gp.1\r
+       nroff -man gp.1 | unix2dos -ascii > gp.man\r
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 (file)
index 0000000..3210072
--- /dev/null
@@ -0,0 +1,21 @@
+--- config/get_dlld.orig       2010-12-21 13:49:25.000000000 +1300\r
++++ config/get_dlld    2010-12-21 14:04:21.000000000 +1300\r
+@@ -93,7 +93,7 @@\r
+       *) extra=;;\r
+     esac\r
+     case "$osname" in\r
+-      darwin) shared=-dynamiclib;;\r
++      darwin) shared="-dynamiclib -install_name \$(PURELIBDIR)/\$(LIBPARI_DYN)";;\r
+       *) shared=-shared;;\r
+     esac\r
+     DLLDFLAGS="$shared $extra \$(CFLAGS) \$(DLCFLAGS) $DLLDFLAGS"\r
+--- config/Makefile.SH.orig    2010-12-23 11:51:01.000000000 +1300\r
++++ config/Makefile.SH 2010-12-23 11:52:10.000000000 +1300\r
+@@ -231,6 +231,7 @@\r
+ # DESTDIR is used to install to a false hierachy (to build a Debian package)\r
+ INCLUDEDIR= "\$(DESTDIR)$includedir"\r
+ LIBDIR    = "\$(DESTDIR)$libdir"\r
++PURELIBDIR= $libdir\r
+ BINDIR    = "\$(DESTDIR)$bindir"\r
+ MANDIR    = "\$(DESTDIR)$mandir"\r
+ DATADIR   = "\$(DESTDIR)$datadir"\r
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 (file)
index 0000000..1bdd047
--- /dev/null
@@ -0,0 +1,22 @@
+Index: src/kernel/gmp/mp.c\r
+===================================================================\r
+--- src/kernel/gmp/mp.c        (revision 13151)\r
++++ src/kernel/gmp/mp.c        (working copy)\r
+@@ -45,18 +45,8 @@\r
+ /*We need PARI invmod renamed to invmod_pari*/\r
+ #define INVMOD_PARI\r
+ \r
+-static void *gmp_realloc(void *ptr, size_t old_size, size_t new_size) {\r
+-  (void)old_size; return (void *) pari_realloc(ptr,new_size);\r
+-}\r
+-\r
+-static void gmp_free(void *ptr, size_t old_size){\r
+-  (void)old_size; pari_free(ptr);\r
+-}\r
+-\r
+ int pari_kernel_init(void)\r
+ {\r
+-  /* Use pari_malloc instead of malloc */\r
+-  mp_set_memory_functions((void *(*)(size_t)) pari_malloc, gmp_realloc, gmp_free);\r
+   return 0;\r
+ }\r
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 (file)
index 0000000..7755b7b
--- /dev/null
@@ -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 (file)
index 31b626d..0000000
+++ /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
-}