1 |
commit: 307430d180981c639f96c958dadc3716ffdbe623 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 7 01:26:37 2022 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 7 02:26:50 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=307430d1 |
7 |
|
8 |
sci-mathematics/pari: new upstream version 2.13.4. |
9 |
|
10 |
Closes: https://bugs.gentoo.org/836869 |
11 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
12 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
13 |
|
14 |
sci-mathematics/pari/Manifest | 1 + |
15 |
sci-mathematics/pari/pari-2.13.4.ebuild | 121 ++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 122 insertions(+) |
17 |
|
18 |
diff --git a/sci-mathematics/pari/Manifest b/sci-mathematics/pari/Manifest |
19 |
index 7e505cd0d8de..78bf342e60f0 100644 |
20 |
--- a/sci-mathematics/pari/Manifest |
21 |
+++ b/sci-mathematics/pari/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST pari-2.13.3.tar.gz 4768312 BLAKE2B e6df23d3929ef1549009eb82c628cc2b9f1f3a446b2c2b246e157b93859006c3f4526c6fef4b975be87b9c6c011e179c169b4f237981c2ca1e02df0adbc4c00a SHA512 16cc20e44bc9b408798a86ffc31f8096e5adc01e0b8f7620e3d03201d71ddbe1d1bfecb22ab69c5b03270e9e97657042de29bb2055173b0d4cf169ec4373972b |
24 |
+DIST pari-2.13.4.tar.gz 4772735 BLAKE2B 5a3eebd380f1e47f38746b03ddde9a715ed74e7e8e4ed30ef8f2d62cf7289694b800fc8396557150ce9d79245c244fb56cecddac867c6057b438da4df68505e6 SHA512 0eb8c0100d76fb8f29fd29e6a49e9534b9a4d90e1869820dbfddd57fe444f0e83909947331823157a67be31f71a5d26fa1224f72ce3f9e5197db0194c417b9b9 |
25 |
|
26 |
diff --git a/sci-mathematics/pari/pari-2.13.4.ebuild b/sci-mathematics/pari/pari-2.13.4.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..59258dadea5d |
29 |
--- /dev/null |
30 |
+++ b/sci-mathematics/pari/pari-2.13.4.ebuild |
31 |
@@ -0,0 +1,121 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+inherit flag-o-matic toolchain-funcs |
38 |
+ |
39 |
+DESCRIPTION="Computer-aided number theory C library and tools" |
40 |
+HOMEPAGE="https://pari.math.u-bordeaux.fr/" |
41 |
+SRC_URI="https://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz" |
42 |
+ |
43 |
+LICENSE="GPL-2" |
44 |
+ |
45 |
+# The subslot is the value of $soname_num obtained from |
46 |
+# upstream's config/version script. |
47 |
+SLOT="0/7" |
48 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" |
49 |
+IUSE="data doc fltk gmp test threads X" |
50 |
+RESTRICT="!test? ( test )" |
51 |
+ |
52 |
+BDEPEND=" |
53 |
+ virtual/pkgconfig |
54 |
+ doc? ( virtual/latex-base ) |
55 |
+" |
56 |
+DEPEND=" |
57 |
+ sys-libs/readline:0= |
58 |
+ data? ( sci-mathematics/pari-data ) |
59 |
+ doc? ( X? ( x11-misc/xdg-utils ) ) |
60 |
+ fltk? ( x11-libs/fltk:1= ) |
61 |
+ gmp? ( dev-libs/gmp:0= ) |
62 |
+ X? ( x11-libs/libX11:0= )" |
63 |
+RDEPEND="${DEPEND}" |
64 |
+ |
65 |
+PATCHES=( |
66 |
+ "${FILESDIR}/${PN}"-2.9.4-strip.patch |
67 |
+ "${FILESDIR}/${PN}"-2.9.4-ppc.patch |
68 |
+ "${FILESDIR}/${PN}"-2.11.2-no-automagic.patch |
69 |
+ "${FILESDIR}/${PN}"-2.9.4-fltk-detection.patch |
70 |
+ "${FILESDIR}/${PN}"-2.11.2-Makefile-LDFLAGS.patch |
71 |
+ "${FILESDIR}/${PN}"-2.11.2-Makefile-docinstall.patch |
72 |
+) |
73 |
+ |
74 |
+src_prepare() { |
75 |
+ default |
76 |
+ |
77 |
+ # move doc dir to a gentoo doc dir and replace acroread by xdg-open |
78 |
+ sed -i \ |
79 |
+ -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \ |
80 |
+ -e 's:"acroread":"xdg-open":' \ |
81 |
+ doc/gphelp.in || die "Failed to fix doc dir" |
82 |
+} |
83 |
+ |
84 |
+src_configure() { |
85 |
+ tc-export CC CXX PKG_CONFIG |
86 |
+ |
87 |
+ # Workaraound to "asm operand has impossible constraints" as |
88 |
+ # suggested in bug #499996. |
89 |
+ use x86 && append-cflags $(test-flags-CC -fno-stack-check) |
90 |
+ |
91 |
+ # need to force optimization here, as it breaks without |
92 |
+ if is-flag -O0; then |
93 |
+ replace-flags -O0 -O2 |
94 |
+ elif ! is-flag -O?; then |
95 |
+ append-flags -O2 |
96 |
+ fi |
97 |
+ |
98 |
+ # sysdatadir installs a pari.cfg stuff which is informative only. |
99 |
+ # It is supposed to be for "architecture-dependent" data. |
100 |
+ # It needs to be easily discoverable for downstream packages such as gp2c. |
101 |
+ # We set LD to "" so that it is set to the value of the compiler used |
102 |
+ # which is how a normal end user is expected to configure it. pari's build |
103 |
+ # system do not cope very well with a naked linker, it is expecting a |
104 |
+ # compiler driver. See https://bugs.gentoo.org/722090 |
105 |
+ LD="" ./Configure \ |
106 |
+ --prefix="${EPREFIX}"/usr \ |
107 |
+ --datadir="${EPREFIX}/usr/share/${PN}" \ |
108 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \ |
109 |
+ --sysdatadir="${EPREFIX}"/usr/share/pari \ |
110 |
+ --mandir="${EPREFIX}"/usr/share/man/man1 \ |
111 |
+ --with-readline="${EPREFIX}"/usr \ |
112 |
+ --with-readline-lib="${EPREFIX}/usr/$(get_libdir)" \ |
113 |
+ --with-ncurses-lib="${EPREFIX}/usr/$(get_libdir)" \ |
114 |
+ $(use_with fltk) \ |
115 |
+ $(use_with gmp) \ |
116 |
+ --without-qt \ |
117 |
+ $(usex threads "--mt=pthread" "" "" "") \ |
118 |
+ || die "./Configure failed" |
119 |
+} |
120 |
+ |
121 |
+src_compile() { |
122 |
+ local mymake="" |
123 |
+ use hppa && \ |
124 |
+ mymake=DLLD\="${EPREFIX}"/usr/bin/gcc\ DLLDFLAGS\=-shared\ -Wl,-soname=\$\(LIBPARI_SONAME\)\ -lm |
125 |
+ |
126 |
+ emake ${mymake} gp |
127 |
+ |
128 |
+ if use doc; then |
129 |
+ # To prevent sandbox violations by metafont |
130 |
+ VARTEXFONTS="${T}/fonts" emake docpdf |
131 |
+ fi |
132 |
+} |
133 |
+ |
134 |
+src_test() { |
135 |
+ # Welcome to the jungle, where the tests fail if you make your |
136 |
+ # terminal bigger. |
137 |
+ emake COLUMNS=80 test-all |
138 |
+} |
139 |
+ |
140 |
+src_install() { |
141 |
+ DOCS=( AUTHORS CHANGES* COMPAT NEW README* ) |
142 |
+ default |
143 |
+ |
144 |
+ if use doc; then |
145 |
+ docompress -x "/usr/share/doc/${PF}" |
146 |
+ emake \ |
147 |
+ DESTDIR="${D}" \ |
148 |
+ EXDIR="${ED}/usr/share/doc/${PF}/examples" \ |
149 |
+ DOCDIR="${ED}/usr/share/doc/${PF}" \ |
150 |
+ install-doc |
151 |
+ fi |
152 |
+} |