summaryrefslogtreecommitdiff
path: root/sci-mathematics/pari
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-23 04:19:44 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-03-23 04:19:44 +0000
commitc5283d322accc6097afec74eab24550829788bab (patch)
treeb99ce668128d82a026eaa31461643f9173f9b77b /sci-mathematics/pari
parent5510d9d7d1c93c2ea71a2bd6f0666168808d5dd6 (diff)
gentoo resync : 23.03.2018
Diffstat (limited to 'sci-mathematics/pari')
-rw-r--r--sci-mathematics/pari/Manifest2
-rw-r--r--sci-mathematics/pari/files/pari-2.9.4-fltk-detection.patch22
-rw-r--r--sci-mathematics/pari/pari-2.9.4-r1.ebuild126
3 files changed, 150 insertions, 0 deletions
diff --git a/sci-mathematics/pari/Manifest b/sci-mathematics/pari/Manifest
index 561ae94ca2dc..01c83641ab30 100644
--- a/sci-mathematics/pari/Manifest
+++ b/sci-mathematics/pari/Manifest
@@ -1,3 +1,4 @@
+AUX pari-2.9.4-fltk-detection.patch 572 BLAKE2B 1c2e1fa6e52521c7865c3fd011824c83fa92623903dd1e056bda29c6735eb01013e7937f66d6ffff42d0de83f7ed104c7f933d232ee37be7c4351788e76f8daa SHA512 2ec0d8035a87b693ee6a4dfa913f0b24eed20bb4db7f8cd1a47db444310d33d19e6651d475c635be747e79a02df2705e42f6f7032b60dc763583cf9fa8633b29
AUX pari-2.9.4-no-automagic.patch 2638 BLAKE2B a0e88763f7f69d6d284286961ad90719cf0a02e533164342dbc34206c44dd447cc1ee5aac27dbd0f61c850082f0d19049886fe9d05676ef506e6154c5395c03f SHA512 1f9ded97ebffa20a248ad86c635e90fc2e38d318a7d47caa27c695b153dbefe2107d6a2e67d87653f4d0c703b047073b025e01a528b7ef4422d50a96aaf8b3fd
AUX pari-2.9.4-ppc.patch 363 BLAKE2B 135e76972e4121362666a25e3da236c4a5b7cffa058bbc25b59ca19ea20ccb0665327f70701adca5239cb936d513976e3ba7b5cda915a3f77c7b2eb28e75eaa0 SHA512 aaf5960010e56722f11234079a20ee7a7f8819dc084e1f6567fd11ad2820e3ae47617608f312941c2f373b5312a8c09c9cd51bfa44e263ffe1e8062c9fd9877d
AUX pari-2.9.4-strip.patch 323 BLAKE2B 85a2b56f5501b4dafc0bffe48249c1662d6f96e81f8e8260ad52ecf84f053efef2ee6d6be6a6fda47886c372eb338d8bbf4443910df79a0d4e168b2666228c37 SHA512 50624ead82da41819ccfadfbdb746fb6ff414196ae2576c5d6a86e83c67355740b0e6e901a2860cab202db15adb1b00e346aabba338ab303230bc6aee8d33076
@@ -9,5 +10,6 @@ DIST pari-2.3.5.tar.gz 2018097 BLAKE2B b5f4f8bc83cd77aceab791263e1a2f0294d0663d3
DIST pari-2.9.4.tar.gz 3851772 BLAKE2B 648e7fd14888bed2dfb7bbb9a25d097aa91899780da9734b444e29997916c27773109e735ecb2d3e9d164a596f3bb8da607d83f278e52d84c49a56df5c89b530 SHA512 539534496e9733bd905b6131374eef8019f93398423710d339bd3c01245e1af675a0a3f9489a05c3ceb2cf3b3426e6b1fb11ea4886b76a1b2e793b59f52e8787
DIST seadata.tgz 19214199 BLAKE2B cafb89905180ff481f578ff2cdb150b04533ecbccfa96d045bdb61e5fe2c230262f3459d31b11f049ad1e16ed9dd6fb734569ee621efa3831800cc3d99583e60 SHA512 393f2fae45964ad0921fcf417113e10b296cb4c3a0e0eec138c896827f43a5464c4b42a07313e0f3a4383e8df97912e2e359a4cd5225d014d7575e80c7dd996a
EBUILD pari-2.3.5.ebuild 3950 BLAKE2B ae0e6d47d07e75865d4d7352ea336582a605f26a786f353925378b80a6a2049f6b4c085402859f5a4fe48389473ce7f7445e4691bd8b133bb167e2ada8d01207 SHA512 cdd3fe315addc1620c8fafaa211697171f9859d66d7019544a3cfd4b21102b23701eb2c1d159ab47f548caacd3f3513d939e14f4e94ab28a95be3d6a584f8e27
+EBUILD pari-2.9.4-r1.ebuild 3515 BLAKE2B 5bda76d4650e90c242ce210b5672d073db58197bb3e6ccd75d76bb75de1b86f585fafdbcc8313b20b81d894b2d0c420dfd5897b1d6d2e42b0202de998452069f SHA512 0d87da0cf1c2f12e6ab6af952f352ab0848bee2917f272e9b375eea1134d2efdea7c3683d774540755cfd847db0a6af4a4619ac3b6bfd52d0c063ff30b00e878
EBUILD pari-2.9.4.ebuild 3477 BLAKE2B c6c67a3d566a3772086f27e80c7dd6125f4ed33df583a45194cb903b8256007062c1e43330246f442607114a926bea8f925a98641568beb0d72ffccede8a5fc1 SHA512 7c85feed4950b02e8fab5d5cac9ed517a94fccfc800741f6e473db13af65f20a423e019b13aa951fded5611eae2906e119d931a1be4ecfce9e3ec4af7a40107d
MISC metadata.xml 1223 BLAKE2B 57268bb1e2649602e4a6228924f0ea7b32d8fea2718f83595b971e1d5338a8cdd8b91ecf245401f2eefbf206b80dde0e56784d8e147128733fa45dc7edd2eece SHA512 3bb69fc9e0757e6fd1ed9f9394565a34269cd9ccc8dc2ce88283e2f2da8b4ef586b20fb914be28a4b3617ff074319f5925e0fc7a1e264b655303e943a63d6bfe
diff --git a/sci-mathematics/pari/files/pari-2.9.4-fltk-detection.patch b/sci-mathematics/pari/files/pari-2.9.4-fltk-detection.patch
new file mode 100644
index 000000000000..26e146e032a6
--- /dev/null
+++ b/sci-mathematics/pari/files/pari-2.9.4-fltk-detection.patch
@@ -0,0 +1,22 @@
+diff --git a/config/get_fltk b/config/get_fltk
+index 87d0c1d..22f5bd8 100644
+--- a/config/get_fltk
++++ b/config/get_fltk
+@@ -2,13 +2,16 @@ if test -z "$with_fltk"; then
+ with_fltk=yes
+ fi
+
++cmd="FLTK_CXXFLAGS=\`fltk-config --cxxflags\`"
++. log_cmd
++
+ cmd="FLTK_LIBS=\`fltk-config --ldflags\`"
+ . log_cmd
+
+ exe=$osname-$arch-fltk$$$exe_suff
+ cxx=$CXX
+ if test -z "$cxx"; then cxx=g++; fi;
+-cmd="$cxx $CFLAGS $FLTK_LIBS -o $exe has_fltk.c"
++cmd="$cxx $CFLAGS $FLTK_CXXFLAGS $FLTK_LIBS -o $exe has_fltk.c"
+ . log_cmd
+ if test -r "$exe"; then
+ echo "Using FLTK library"
diff --git a/sci-mathematics/pari/pari-2.9.4-r1.ebuild b/sci-mathematics/pari/pari-2.9.4-r1.ebuild
new file mode 100644
index 000000000000..ce071489ded2
--- /dev/null
+++ b/sci-mathematics/pari/pari-2.9.4-r1.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 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= )
+ 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
+ "${FILESDIR}"/${P}-fltk-detection.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) \
+ --without-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
+}