summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Grozin <grozin@gentoo.org>2018-01-13 20:38:45 +0700
committerAndrey Grozin <grozin@gentoo.org>2018-01-13 20:38:45 +0700
commit11c19699f31647ce20bee4ed56608df444278e32 (patch)
tree502c40f9420b1d474e3bdddc3687e525f28cdbcc /sci-mathematics/pari
parentmedia-libs/opencolorio: Remove 1.0.9_p20170719 (diff)
downloadgentoo-11c19699f31647ce20bee4ed56608df444278e32.tar.gz
gentoo-11c19699f31647ce20bee4ed56608df444278e32.tar.bz2
gentoo-11c19699f31647ce20bee4ed56608df444278e32.zip
sci-mathematics/pari: bump to 2.9.4
Closes: https://bugs.gentoo.org/600568 Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'sci-mathematics/pari')
-rw-r--r--sci-mathematics/pari/Manifest1
-rw-r--r--sci-mathematics/pari/files/pari-2.9.4-no-automagic.patch66
-rw-r--r--sci-mathematics/pari/files/pari-2.9.4-ppc.patch9
-rw-r--r--sci-mathematics/pari/files/pari-2.9.4-strip.patch10
-rw-r--r--sci-mathematics/pari/pari-2.9.4.ebuild126
5 files changed, 212 insertions, 0 deletions
diff --git a/sci-mathematics/pari/Manifest b/sci-mathematics/pari/Manifest
index a78f8a17c5f2..8a4f45c784ce 100644
--- a/sci-mathematics/pari/Manifest
+++ b/sci-mathematics/pari/Manifest
@@ -7,4 +7,5 @@ DIST pari-2.5.4-patchset.tar.bz2 11050 BLAKE2B 0ea4727bb03045c7cda9b39cd429db8ea
DIST pari-2.5.4.tar.gz 2721861 BLAKE2B 003113716c4aaea3836ee7f813ff4aacecb40e6c7d9119c0a6d6073f951e6c5fae887ee22d87d5c7d7320e0d873585f145dd14e7014075bf198143dde68325f9 SHA512 de2f0593682d638288908636d848489acf115f4858b91c574168db26c4ab7443465a21d1e6c43be19ecc57dcedcd883e5af72b65467a59a2c8811e4eec64e0b9
DIST pari-2.7.1-patchset.tar.bz2 4318 BLAKE2B 881354eec4f89f7b7e0a1d53d5fa169b0ea0de3964baff454f2e7aca1b7bd2e7ffa2f404e4df7a8ff7a662aed3920e10df4a3a1d5d86967579c360869abce557 SHA512 1ff40adcf638230e1aca951b4fdb291cd4d2048ef66215de0ec157b9ec0040e28c115c2684056cf582695e66ee8363aa776a4a50f8654c8dde7bad490a47b304
DIST pari-2.7.1.tar.gz 3140893 BLAKE2B 0f5c69ac2decb0ac26f51de7843c282606f854c257b06d1596eb7f4157e8f64d65b65f887e2d9bb8b77cbdffdac0bb1902e373b1d44e457ac25993bc308d3e09 SHA512 ff32c181e6810af8a38f0dfe45b9f15d930923da5759c3e88595f56bf3c65ec0a79fdb9fb5f0e4ce0adb1ebc56a84e6b1606085057762073a85c0d1946857d5f
+DIST pari-2.9.4.tar.gz 3851772 BLAKE2B 648e7fd14888bed2dfb7bbb9a25d097aa91899780da9734b444e29997916c27773109e735ecb2d3e9d164a596f3bb8da607d83f278e52d84c49a56df5c89b530 SHA512 539534496e9733bd905b6131374eef8019f93398423710d339bd3c01245e1af675a0a3f9489a05c3ceb2cf3b3426e6b1fb11ea4886b76a1b2e793b59f52e8787
DIST seadata.tgz 19214199 BLAKE2B cafb89905180ff481f578ff2cdb150b04533ecbccfa96d045bdb61e5fe2c230262f3459d31b11f049ad1e16ed9dd6fb734569ee621efa3831800cc3d99583e60 SHA512 393f2fae45964ad0921fcf417113e10b296cb4c3a0e0eec138c896827f43a5464c4b42a07313e0f3a4383e8df97912e2e359a4cd5225d014d7575e80c7dd996a
diff --git a/sci-mathematics/pari/files/pari-2.9.4-no-automagic.patch b/sci-mathematics/pari/files/pari-2.9.4-no-automagic.patch
new file mode 100644
index 000000000000..3612d8f020fc
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.9.4-no-automagic.patch
@@ -0,0 +1,66 @@
+diff -r -U2 pari-2.9.4.orig/config/Makefile.SH pari-2.9.4/config/Makefile.SH
+--- pari-2.9.4.orig/config/Makefile.SH 2017-11-09 16:26:14.000000000 +0700
++++ pari-2.9.4/config/Makefile.SH 2018-01-13 17:31:02.404210285 +0700
+@@ -80,10 +80,10 @@
+ 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=
+- PLOTLIBS="$FLTK_LIBS"
++ PLOTCFLAGS="`fltk-config --cxxflags` $X11_INC"
++ PLOTLIBS="`fltk-config --ldflags`"
+ postconfig='fltk-config --post '
+ graph=plotfltk;;
+@@ -277,5 +277,5 @@
+ # Graphic library.
+ QTDIR = "$QTDIR"
+-MOC = \$(QTDIR)/bin/moc
++MOC = "`which moc`"
+ PLOTCFLAGS = $PLOTCFLAGS
+ PLOTLIBS = $PLOTLIBS
+diff -r -U2 pari-2.9.4.orig/config/get_Qt pari-2.9.4/config/get_Qt
+--- pari-2.9.4.orig/config/get_Qt 2017-05-12 16:45:12.000000000 +0700
++++ pari-2.9.4/config/get_Qt 2018-01-13 17:35:49.481198212 +0700
+@@ -6,5 +6,5 @@
+ 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"
+diff -r -U2 pari-2.9.4.orig/config/get_config_options pari-2.9.4/config/get_config_options
+--- pari-2.9.4.orig/config/get_config_options 2017-11-09 16:26:14.000000000 +0700
++++ pari-2.9.4/config/get_config_options 2018-01-13 17:38:39.264191072 +0700
+@@ -87,8 +87,10 @@
+ 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=*)
+@@ -168,5 +170,7 @@
+
+ --with-qt[=DIR] use the Qt graphical library [prefix for Qt dir.]
++ --without-qt do not try to use the Qt lib
+ --with-fltk use the FLTK graphical library [need fltk-config]
++ --without-fltk do not try to use the FLTK lib
+
+ Miscellaneous
+diff -r -U2 pari-2.9.4.orig/config/get_graphic_lib pari-2.9.4/config/get_graphic_lib
+--- pari-2.9.4.orig/config/get_graphic_lib 2017-11-09 16:26:14.000000000 +0700
++++ pari-2.9.4/config/get_graphic_lib 2018-01-13 17:42:45.760180706 +0700
+@@ -8,4 +8,5 @@
+ 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
diff --git a/sci-mathematics/pari/files/pari-2.9.4-ppc.patch b/sci-mathematics/pari/files/pari-2.9.4-ppc.patch
new file mode 100644
index 000000000000..558f7eb9eda4
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.9.4-ppc.patch
@@ -0,0 +1,9 @@
+diff -r -U2 pari-2.9.4.orig/config/arch-osname pari-2.9.4/config/arch-osname
+--- pari-2.9.4.orig/config/arch-osname 2011-09-23 03:02:11.000000000 +0700
++++ pari-2.9.4/config/arch-osname 2018-01-13 16:22:39.623382825 +0700
+@@ -40,4 +40,5 @@
+ linux) arch=`uname -m`
+ case $arch in
++ ppc) arch=powerpc;;
+ sparc64) arch=sparcv9;;
+ parisc*) arch=hppa;;
diff --git a/sci-mathematics/pari/files/pari-2.9.4-strip.patch b/sci-mathematics/pari/files/pari-2.9.4-strip.patch
new file mode 100644
index 000000000000..f4a8af322c45
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.9.4-strip.patch
@@ -0,0 +1,10 @@
+diff -r -U2 pari-2.9.4.orig/config/Makefile.SH pari-2.9.4/config/Makefile.SH
+--- pari-2.9.4.orig/config/Makefile.SH 2017-11-09 16:26:14.000000000 +0700
++++ pari-2.9.4/config/Makefile.SH 2018-01-13 16:18:04.208394407 +0700
+@@ -250,5 +250,5 @@
+ LN = $ln_s
+ CP_F = cp -f
+-STRIP = strip
++STRIP = true
+ STRIPFLAGS =
+
diff --git a/sci-mathematics/pari/pari-2.9.4.ebuild b/sci-mathematics/pari/pari-2.9.4.ebuild
new file mode 100644
index 000000000000..e03aba49e6e2
--- /dev/null
+++ b/sci-mathematics/pari/pari-2.9.4.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+DESCRIPTION="Computer-aided number theory C library and tools"
+HOMEPAGE="http://pari.math.u-bordeaux.fr/"
+LICENSE="GPL-2"
+SLOT="0/5"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
+IUSE="data doc fltk gmp qt4 X"
+SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz"
+
+RDEPEND="
+ sys-libs/readline:0=
+ data? ( sci-mathematics/pari-data )
+ doc? ( X? ( x11-misc/xdg-utils ) )
+ fltk? ( x11-libs/fltk:1= )
+ gmp? ( dev-libs/gmp:0= )
+ qt4? ( dev-qt/qtgui:4= )
+ X? ( x11-libs/libX11:0= )"
+DEPEND="${RDEPEND}
+ doc? ( virtual/latex-base )"
+
+get_compile_dir() {
+ pushd "${S}/config" > /dev/null
+ local fastread=yes
+ source ./get_archos
+ popd > /dev/null
+ echo "O${osname}-${arch}"
+}
+
+PATCHES=( "${FILESDIR}"/${P}-strip.patch
+ "${FILESDIR}"/${P}-ppc.patch
+ "${FILESDIR}"/${P}-no-automagic.patch
+ )
+
+src_prepare() {
+ default
+
+ # 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"
+}
+
+src_configure() {
+ tc-export CC
+ export CPLUSPLUS=$(tc-getCXX)
+
+ # 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="${EPREFIX}"/usr \
+ --with-ncurses-lib="${EPREFIX}"/usr/$(get_libdir) \
+ $(use_with fltk) \
+ $(use_with gmp) \
+ $(use_with qt4 qt) \
+ || die "./Configure failed"
+}
+
+src_compile() {
+ use hppa && \
+ mymake=DLLD\="${EPREFIX}"/usr/bin/gcc\ DLLDFLAGS\=-shared\ -Wl,-soname=\$\(LIBPARI_SONAME\)\ -lm
+
+ mycxxmake=LD\=$(tc-getCXX)
+
+ 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} ${mycxxmake} \
+ CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp
+
+ if use doc; then
+ pushd "${S}" > /dev/null || die "failed to change directory"
+ VARTEXFONTS="${T}"/fonts emake -j1 docpdf
+ popd > /dev/null || die
+ fi
+}
+
+src_test() {
+ emake dobench
+}
+
+src_install() {
+ emake ${mymake} ${mycxxmake} DESTDIR="${D}" install
+ 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.
+ emake EXDIR="${ED}/usr/share/doc/${PF}/examples" \
+ -C $(get_compile_dir) install-examples
+ fi
+}