Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/pari/
Date: Sun, 26 Apr 2020 08:40:28
Message-Id: 1587890392.8439106d175ffd82e8039e227b61c659847f30b1.juippis@gentoo
1 commit: 8439106d175ffd82e8039e227b61c659847f30b1
2 Author: François Bissey <frp.bissey <AT> gmail <DOT> com>
3 AuthorDate: Wed Apr 22 02:16:40 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 26 08:39:52 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8439106d
7
8 sci-mathematics/pari: New upstream release
9
10 Package-Manager: Portage-2.3.89, Repoman-2.3.20
11 Signed-off-by: François René Pierre Bissey <frp.bissey <AT> gmail.com>
12 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
13
14 sci-mathematics/pari/Manifest | 1 +
15 sci-mathematics/pari/pari-2.11.4.ebuild | 111 ++++++++++++++++++++++++++++++++
16 2 files changed, 112 insertions(+)
17
18 diff --git a/sci-mathematics/pari/Manifest b/sci-mathematics/pari/Manifest
19 index dc1b0ad1731..a01ef39374a 100644
20 --- a/sci-mathematics/pari/Manifest
21 +++ b/sci-mathematics/pari/Manifest
22 @@ -1,2 +1,3 @@
23 DIST pari-2.11.2.tar.gz 4433038 BLAKE2B 89fd8c14d6ee8c8640432bec75e10b79897f0180212dcb1b04b654478a3258fc13a7f982bcb400e28997934a21667c0c3cb08fdb2e843a80a24c6499feafb639 SHA512 22f5a6ecad6d9b8b337c2655f538a196a0460f6fe98256d0f49557ce7b843f6b27ad364f45a9472aaafee9506386c886f1f0d62697078e501ec465151d4d10a1
24 DIST pari-2.11.3.tar.gz 4441199 BLAKE2B 49b001f2dc27d1be7a742c165881f2b21d55cf387a91d880bd3a16cbc5d69172f931caa779c5ccbe79b6855175695b5e88ff99b420b4f2b7404dd5e4a53a135c SHA512 2624cdd0523ec02324f58af65703003c88ab596bcaa30c366a9ea01123b0ae657285b10016abaa06b6783ba34dd4980f560900b836b8df228b9dbe0ca36a5b11
25 +DIST pari-2.11.4.tar.gz 4445000 BLAKE2B e910783186eeb71e74a369681c113b77271abd7f87d7a9f366aea83f36ab984f02e312cd451fad7ee6efb2fa285780e8fa78540bb1fd4b135a62d265176c80e0 SHA512 1312f452244cd1d814a1e43e108378c956669b614845f21199b7039fe6462881168983d4badb8a80bb1bac202cd82d92788a2b4f3c23d16f993cae6e251c4fe1
26
27 diff --git a/sci-mathematics/pari/pari-2.11.4.ebuild b/sci-mathematics/pari/pari-2.11.4.ebuild
28 new file mode 100644
29 index 00000000000..564ed9639a7
30 --- /dev/null
31 +++ b/sci-mathematics/pari/pari-2.11.4.ebuild
32 @@ -0,0 +1,111 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +inherit flag-o-matic toolchain-funcs
39 +
40 +DESCRIPTION="Computer-aided number theory C library and tools"
41 +HOMEPAGE="https://pari.math.u-bordeaux.fr/"
42 +SRC_URI="https://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz"
43 +
44 +LICENSE="GPL-2"
45 +SLOT="0/6"
46 +KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
47 +IUSE="data doc fltk gmp test threads X"
48 +RESTRICT="!test? ( test )"
49 +
50 +BDEPEND="doc? ( virtual/latex-base )"
51 +DEPEND="
52 + sys-libs/readline:0=
53 + data? ( sci-mathematics/pari-data )
54 + doc? ( X? ( x11-misc/xdg-utils ) )
55 + fltk? ( x11-libs/fltk:1= )
56 + gmp? ( dev-libs/gmp:0= )
57 + X? ( x11-libs/libX11:0= )"
58 +RDEPEND="${DEPEND}"
59 +
60 +PATCHES=(
61 + "${FILESDIR}/${PN}"-2.9.4-strip.patch
62 + "${FILESDIR}/${PN}"-2.9.4-ppc.patch
63 + "${FILESDIR}/${PN}"-2.11.2-no-automagic.patch
64 + "${FILESDIR}/${PN}"-2.9.4-fltk-detection.patch
65 + "${FILESDIR}/${PN}"-2.11.2-Makefile-LDFLAGS.patch
66 + "${FILESDIR}/${PN}"-2.11.2-Makefile-docinstall.patch
67 +)
68 +
69 +src_prepare() {
70 + default
71 +
72 + # move doc dir to a gentoo doc dir and replace acroread by xdg-open
73 + sed -i \
74 + -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \
75 + -e 's:"acroread":"xdg-open":' \
76 + doc/gphelp.in || die "Failed to fix doc dir"
77 +}
78 +
79 +src_configure() {
80 + tc-export CC CXX
81 +
82 + # Workaraound to "asm operand has impossible constraints" as
83 + # suggested in bug #499996.
84 + use x86 && append-cflags $(test-flags-CC -fno-stack-check)
85 +
86 + # need to force optimization here, as it breaks without
87 + if is-flag -O0; then
88 + replace-flags -O0 -O2
89 + elif ! is-flag -O?; then
90 + append-flags -O2
91 + fi
92 +
93 + # sysdatadir installs a pari.cfg stuff which is informative only.
94 + # It is supposed to be for "architecture-dependent" data.
95 + # It needs to be easily discoverable for downstream packages such as gp2c.
96 + ./Configure \
97 + --prefix="${EPREFIX}"/usr \
98 + --datadir="${EPREFIX}/usr/share/${PN}" \
99 + --libdir="${EPREFIX}/usr/$(get_libdir)" \
100 + --sysdatadir="${EPREFIX}"/usr/share/pari \
101 + --mandir="${EPREFIX}"/usr/share/man/man1 \
102 + --with-readline="${EPREFIX}"/usr \
103 + --with-readline-lib="${EPREFIX}/usr/$(get_libdir)" \
104 + --with-ncurses-lib="${EPREFIX}/usr/$(get_libdir)" \
105 + $(use_with fltk) \
106 + $(use_with gmp) \
107 + --without-qt \
108 + $(usex threads "--mt=pthread" "" "" "") \
109 + || die "./Configure failed"
110 +}
111 +
112 +src_compile() {
113 + local mymake=""
114 + use hppa && \
115 + mymake=DLLD\="${EPREFIX}"/usr/bin/gcc\ DLLDFLAGS\=-shared\ -Wl,-soname=\$\(LIBPARI_SONAME\)\ -lm
116 +
117 + emake ${mymake} gp
118 +
119 + if use doc; then
120 + # To prevent sandbox violations by metafont
121 + VARTEXFONTS="${T}/fonts" emake docpdf
122 + fi
123 +}
124 +
125 +src_test() {
126 + # Welcome to the jungle, where the tests fail if you make your
127 + # terminal bigger.
128 + emake COLUMNS=80 test-all
129 +}
130 +
131 +src_install() {
132 + DOCS=( AUTHORS CHANGES* COMPAT NEW README* )
133 + default
134 +
135 + if use doc; then
136 + docompress -x "/usr/share/doc/${PF}"
137 + emake \
138 + DESTDIR="${D}" \
139 + EXDIR="${ED}/usr/share/doc/${PF}/examples" \
140 + DOCDIR="${ED}/usr/share/doc/${PF}" \
141 + install-doc
142 + fi
143 +}