1 |
commit: e3fd7bb8cfe64cd5b92cbf5d758ffb8aeddf8f8e |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 28 13:22:33 2019 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 28 13:57:35 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3fd7bb8 |
7 |
|
8 |
sci-mathematics/pari: new version 2.11.2. |
9 |
|
10 |
This new version was imported from the sage-on-gentoo overlay where |
11 |
François Bissey has been maintaining it for use with SageMath. I've |
12 |
made a few changes: |
13 |
|
14 |
* Moved the virtual/latex-base dependency into BDEPEND, because |
15 |
those tools are run on the build host to create the documentation. |
16 |
|
17 |
* Used the existing patches (with different names) where possible. |
18 |
|
19 |
* Edited pari-2.10-no-automagic.patch to not mess with PLOTLIBS |
20 |
when USE=fltk is set. My build was failing because this patch |
21 |
resulted in -lstdc++ being stripped from the linker flags. |
22 |
|
23 |
* Dropped empty variable "${mymake}" in a few places. |
24 |
|
25 |
* Enabled the full test suite, which passes for me if I lie to pari |
26 |
about the number of columns my terminal has (???). |
27 |
|
28 |
* Installed some extra documentation by setting DOCS and calling |
29 |
the default implementation of src_install. |
30 |
|
31 |
* Used "usex" instead of an "if" statement for a ./Configure flag. |
32 |
|
33 |
* Changed "export CPLUSPLUS=$(tc-getCXX)" to "tc-export CXX". The |
34 |
CPLUSPLUS variable doesn't appear anywhere in the source, so I |
35 |
doubt this was doing anything. It may not even be necessary to |
36 |
export CC/CXX any longer. |
37 |
|
38 |
* Added RESTRICT="!test? ( test )" now that we run the test suite. |
39 |
|
40 |
* Added myself and François as maintainers. |
41 |
|
42 |
Closes: https://bugs.gentoo.org/703156 |
43 |
Package-Manager: Portage-2.3.79, Repoman-2.3.16 |
44 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
45 |
|
46 |
sci-mathematics/pari/Manifest | 1 + |
47 |
.../pari/files/pari-2.11.2-Makefile-LDFLAGS.patch | 13 +++ |
48 |
.../files/pari-2.11.2-Makefile-docinstall.patch | 25 +++++ |
49 |
.../pari/files/pari-2.11.2-no-automagic.patch | 74 ++++++++++++++ |
50 |
sci-mathematics/pari/metadata.xml | 16 +++ |
51 |
sci-mathematics/pari/pari-2.11.2.ebuild | 111 +++++++++++++++++++++ |
52 |
6 files changed, 240 insertions(+) |
53 |
|
54 |
diff --git a/sci-mathematics/pari/Manifest b/sci-mathematics/pari/Manifest |
55 |
index 01bd0f5957d..66779145ec1 100644 |
56 |
--- a/sci-mathematics/pari/Manifest |
57 |
+++ b/sci-mathematics/pari/Manifest |
58 |
@@ -1 +1,2 @@ |
59 |
+DIST pari-2.11.2.tar.gz 4433038 BLAKE2B 89fd8c14d6ee8c8640432bec75e10b79897f0180212dcb1b04b654478a3258fc13a7f982bcb400e28997934a21667c0c3cb08fdb2e843a80a24c6499feafb639 SHA512 22f5a6ecad6d9b8b337c2655f538a196a0460f6fe98256d0f49557ce7b843f6b27ad364f45a9472aaafee9506386c886f1f0d62697078e501ec465151d4d10a1 |
60 |
DIST pari-2.9.4.tar.gz 3851772 BLAKE2B 648e7fd14888bed2dfb7bbb9a25d097aa91899780da9734b444e29997916c27773109e735ecb2d3e9d164a596f3bb8da607d83f278e52d84c49a56df5c89b530 SHA512 539534496e9733bd905b6131374eef8019f93398423710d339bd3c01245e1af675a0a3f9489a05c3ceb2cf3b3426e6b1fb11ea4886b76a1b2e793b59f52e8787 |
61 |
|
62 |
diff --git a/sci-mathematics/pari/files/pari-2.11.2-Makefile-LDFLAGS.patch b/sci-mathematics/pari/files/pari-2.11.2-Makefile-LDFLAGS.patch |
63 |
new file mode 100644 |
64 |
index 00000000000..6d6e6726ddf |
65 |
--- /dev/null |
66 |
+++ b/sci-mathematics/pari/files/pari-2.11.2-Makefile-LDFLAGS.patch |
67 |
@@ -0,0 +1,13 @@ |
68 |
+diff --git a/config/Makefile.SH b/config/Makefile.SH |
69 |
+index 27c6d5b..43debb1 100644 |
70 |
+--- a/config/Makefile.SH |
71 |
++++ b/config/Makefile.SH |
72 |
+@@ -185,7 +185,7 @@ LD = $LD \$(LD_FLAVOR) |
73 |
+ LDFLAGS = $LDFLAGS |
74 |
+ DLLD_FLAVOR = \$(LD_FLAVOR) |
75 |
+ DLLD = $DLLD \$(DLLD_FLAVOR) |
76 |
+-DLLDFLAGS = $DLLDFLAGS |
77 |
++DLLDFLAGS = $DLLDFLAGS \$(LDFLAGS) |
78 |
+ EXTRADLLDFLAGS = $EXTRADLLDFLAGS |
79 |
+ RUNTEST = $RUNTEST |
80 |
+ |
81 |
|
82 |
diff --git a/sci-mathematics/pari/files/pari-2.11.2-Makefile-docinstall.patch b/sci-mathematics/pari/files/pari-2.11.2-Makefile-docinstall.patch |
83 |
new file mode 100644 |
84 |
index 00000000000..5f03d77d9e7 |
85 |
--- /dev/null |
86 |
+++ b/sci-mathematics/pari/files/pari-2.11.2-Makefile-docinstall.patch |
87 |
@@ -0,0 +1,25 @@ |
88 |
+diff --git a/config/Makefile.SH b/config/Makefile.SH |
89 |
+index 27c6d5b..43debb1 100644 |
90 |
+--- a/config/Makefile.SH |
91 |
++++ b/config/Makefile.SH |
92 |
+@@ -366,9 +366,9 @@ clean: cleanall |
93 |
+ .headers: $HEADERS |
94 |
+ @touch \$@ |
95 |
+ |
96 |
+-install-nodata: install-lib-$dft install-include install-bin install-man install-misc install-examples install-cfg |
97 |
++install-nodata: install-lib-$dft install-include install-bin install-man install-misc install-cfg |
98 |
+ |
99 |
+-install: install-doc install-nodata install-data |
100 |
++install: install-nodata install-data |
101 |
+ |
102 |
+ install-include: |
103 |
+ -mkdir -p \$(INCLUDEDIR)/pari |
104 |
+@@ -425,7 +425,7 @@ install-cfg:: |
105 |
+ \$(INSTALL_DATA) $desc/PARI/822.pm \$(DATADIR)/PARI;\ |
106 |
+ \$(INSTALL_DATA) $desc/\$(DESC) \$(DATADIR); fi |
107 |
+ |
108 |
+-install-doc: install-docdvi install-doctex |
109 |
++install-doc: install-docpdf install-doctex install-examples |
110 |
+ |
111 |
+ install-doctex: |
112 |
+ -mkdir -p \$(BINDIR) \$(DOCDIR) |
113 |
|
114 |
diff --git a/sci-mathematics/pari/files/pari-2.11.2-no-automagic.patch b/sci-mathematics/pari/files/pari-2.11.2-no-automagic.patch |
115 |
new file mode 100644 |
116 |
index 00000000000..d4044cc426d |
117 |
--- /dev/null |
118 |
+++ b/sci-mathematics/pari/files/pari-2.11.2-no-automagic.patch |
119 |
@@ -0,0 +1,74 @@ |
120 |
+diff --git a/config/Makefile.SH b/config/Makefile.SH |
121 |
+index 6cf5e59ee..7487941f9 100644 |
122 |
+--- a/config/Makefile.SH |
123 |
++++ b/config/Makefile.SH |
124 |
+@@ -74,12 +74,12 @@ case "$which_graphic_lib" in |
125 |
+ ps|svg|none) |
126 |
+ graph=plot$which_graphic_lib;; |
127 |
+ Qt4) |
128 |
+- PLOTCFLAGS="\$(QTINC)" |
129 |
+- PLOTLIBS="\$(QTLIB) $QTLIBS" |
130 |
++ PLOTCFLAGS="`pkg-config --cflags QtGui`" |
131 |
++ PLOTLIBS="`pkg-config --libs QtGui`" |
132 |
+ graph=plotQt4;; |
133 |
+ fltk) |
134 |
+- PLOTCFLAGS= |
135 |
++ PLOTCFLAGS="`fltk-config --cxxflags` $X11_INC" |
136 |
+ PLOTLIBS="$FLTK_LIBS" |
137 |
+ postconfig='fltk-config --post ' |
138 |
+ graph=plotfltk;; |
139 |
+ win32) |
140 |
+@@ -267,7 +267,7 @@ RLLIBS = $RLLIBS |
141 |
+ # GMP |
142 |
+ GMPINCLUDE = $GMPINCLUDE |
143 |
+ # Graphic library. |
144 |
+-QTMOC = $QTMOC |
145 |
++QTMOC = "`which moc`" |
146 |
+ QTINC = $QTINC |
147 |
+ QTLIB = $QTLIB |
148 |
+ PLOTCFLAGS = $PLOTCFLAGS |
149 |
+diff --git a/config/get_config_options b/config/get_config_options |
150 |
+index 4078d2720..5c12bd491 100644 |
151 |
+--- a/config/get_config_options |
152 |
++++ b/config/get_config_options |
153 |
+@@ -86,6 +86,7 @@ while test $# -gt 0; do |
154 |
+ --with-ncurses-lib=*|--with-ncurses=*) |
155 |
+ with_ncurses_lib=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; |
156 |
+ |
157 |
++ --without-qt|--with-qt=no) without_qt=yes ;; |
158 |
+ --with-qt) with_qt=yes ;; |
159 |
+ --with-qt=*) |
160 |
+ with_qt=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; |
161 |
+@@ -94,6 +95,7 @@ while test $# -gt 0; do |
162 |
+ --with-qt-include=*) |
163 |
+ with_qt_include=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; |
164 |
+ |
165 |
++ --without-fltk|--with-fltk=no) without_fltk=yes ;; |
166 |
+ --with-fltk) with_fltk=yes ;; |
167 |
+ --with-fltk=*) |
168 |
+ with_fltk=`echo "$1" | sed -e 's/[-a-z]*=//'` ;; |
169 |
+@@ -172,10 +174,12 @@ Optional libraries: |
170 |
+ --with-gmp-lib=DIR specify location of gmp libs |
171 |
+ |
172 |
+ --with-qt[=DIR] use the Qt graphical library [prefix for Qt dir.] |
173 |
++ --without-qt do not try to use the Qt lib |
174 |
+ --with-qt-include=DIR specify location of Qt headers |
175 |
+ --with-qt-lib=DIR specify location of Qt libs |
176 |
+ |
177 |
+ --with-fltk use the FLTK graphical library [need fltk-config] |
178 |
++ --without-fltk do not try to use the FLTK lib |
179 |
+ |
180 |
+ Miscellaneous |
181 |
+ --with-runtime-perl[=path-to-perl-binary] for gphelp / tex2mail |
182 |
+diff --git a/config/get_graphic_lib b/config/get_graphic_lib |
183 |
+index 4591f2aad..4808aab90 100644 |
184 |
+--- a/config/get_graphic_lib |
185 |
++++ b/config/get_graphic_lib |
186 |
+@@ -7,6 +7,7 @@ FLTK_LIBS QTDIR QTLIB" |
187 |
+ |
188 |
+ if test -n "$with_fltk"; then which_graphic_lib=fltk; fi |
189 |
+ if test -n "$with_qt"; then which_graphic_lib=Qt; fi |
190 |
++if test -n "$without_fltk" -a -n "$without_qt"; then which_graphic_lib=none; fi |
191 |
+ if test "$fastread" != yes; then |
192 |
+ cat << EOT |
193 |
+ ========================================================================== |
194 |
|
195 |
diff --git a/sci-mathematics/pari/metadata.xml b/sci-mathematics/pari/metadata.xml |
196 |
index f4c3bc4e338..d5bd7510bbd 100644 |
197 |
--- a/sci-mathematics/pari/metadata.xml |
198 |
+++ b/sci-mathematics/pari/metadata.xml |
199 |
@@ -1,6 +1,22 @@ |
200 |
<?xml version="1.0" encoding="UTF-8"?> |
201 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
202 |
<pkgmetadata> |
203 |
+ <maintainer type="person"> |
204 |
+ <email>mjo@g.o</email> |
205 |
+ </maintainer> |
206 |
+ <!-- |
207 |
+ mjo: François maintained this package in the sage-on-gentoo overlay |
208 |
+ long before I moved it into ::gentoo. You don't need an ACK from me |
209 |
+ to merge his changes. |
210 |
+ --> |
211 |
+ <maintainer type="person"> |
212 |
+ <email>frp.bissey@×××××.com</email> |
213 |
+ <name>François Bissey</name> |
214 |
+ </maintainer> |
215 |
+ <maintainer type="project"> |
216 |
+ <email>proxy-maint@g.o</email> |
217 |
+ <name>Proxy Maintainers</name> |
218 |
+ </maintainer> |
219 |
<maintainer type="project"> |
220 |
<email>sci-mathematics@g.o</email> |
221 |
<name>Gentoo Mathematics Project</name> |
222 |
|
223 |
diff --git a/sci-mathematics/pari/pari-2.11.2.ebuild b/sci-mathematics/pari/pari-2.11.2.ebuild |
224 |
new file mode 100644 |
225 |
index 00000000000..4d53f82467f |
226 |
--- /dev/null |
227 |
+++ b/sci-mathematics/pari/pari-2.11.2.ebuild |
228 |
@@ -0,0 +1,111 @@ |
229 |
+# Copyright 1999-2019 Gentoo Authors |
230 |
+# Distributed under the terms of the GNU General Public License v2 |
231 |
+ |
232 |
+EAPI=7 |
233 |
+ |
234 |
+inherit flag-o-matic toolchain-funcs |
235 |
+ |
236 |
+DESCRIPTION="Computer-aided number theory C library and tools" |
237 |
+HOMEPAGE="http://pari.math.u-bordeaux.fr/" |
238 |
+SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz" |
239 |
+ |
240 |
+LICENSE="GPL-2" |
241 |
+SLOT="0/6" |
242 |
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris" |
243 |
+IUSE="data doc fltk gmp test threads X" |
244 |
+RESTRICT="!test? ( test )" |
245 |
+ |
246 |
+BDEPEND="doc? ( virtual/latex-base )" |
247 |
+DEPEND=" |
248 |
+ sys-libs/readline:0= |
249 |
+ data? ( sci-mathematics/pari-data ) |
250 |
+ doc? ( X? ( x11-misc/xdg-utils ) ) |
251 |
+ fltk? ( x11-libs/fltk:1= ) |
252 |
+ gmp? ( dev-libs/gmp:0= ) |
253 |
+ X? ( x11-libs/libX11:0= )" |
254 |
+RDEPEND="${DEPEND}" |
255 |
+ |
256 |
+PATCHES=( |
257 |
+ "${FILESDIR}/${PN}"-2.9.4-strip.patch |
258 |
+ "${FILESDIR}/${PN}"-2.9.4-ppc.patch |
259 |
+ "${FILESDIR}/${PN}"-2.11.2-no-automagic.patch |
260 |
+ "${FILESDIR}/${PN}"-2.9.4-fltk-detection.patch |
261 |
+ "${FILESDIR}/${PN}"-2.11.2-Makefile-LDFLAGS.patch |
262 |
+ "${FILESDIR}/${PN}"-2.11.2-Makefile-docinstall.patch |
263 |
+ ) |
264 |
+ |
265 |
+src_prepare() { |
266 |
+ default |
267 |
+ |
268 |
+ # move doc dir to a gentoo doc dir and replace acroread by xdg-open |
269 |
+ sed -i \ |
270 |
+ -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \ |
271 |
+ -e 's:"acroread":"xdg-open":' \ |
272 |
+ doc/gphelp.in || die "Failed to fix doc dir" |
273 |
+} |
274 |
+ |
275 |
+src_configure() { |
276 |
+ tc-export CC CXX |
277 |
+ |
278 |
+ # Workaraound to "asm operand has impossible constraints" as |
279 |
+ # suggested in bug #499996. |
280 |
+ use x86 && append-cflags $(test-flags-CC -fno-stack-check) |
281 |
+ |
282 |
+ # need to force optimization here, as it breaks without |
283 |
+ if is-flag -O0; then |
284 |
+ replace-flags -O0 -O2 |
285 |
+ elif ! is-flag -O?; then |
286 |
+ append-flags -O2 |
287 |
+ fi |
288 |
+ |
289 |
+ # sysdatadir installs a pari.cfg stuff which is informative only. |
290 |
+ # It is supposed to be for "architecture-dependent" data. |
291 |
+ # It needs to be easily discoverable for downstream packages such as gp2c. |
292 |
+ ./Configure \ |
293 |
+ --prefix="${EPREFIX}"/usr \ |
294 |
+ --datadir="${EPREFIX}/usr/share/${PN}" \ |
295 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" \ |
296 |
+ --sysdatadir="${EPREFIX}"/usr/share/pari \ |
297 |
+ --mandir="${EPREFIX}"/usr/share/man/man1 \ |
298 |
+ --with-readline="${EPREFIX}"/usr \ |
299 |
+ --with-readline-lib="${EPREFIX}/usr/$(get_libdir)" \ |
300 |
+ --with-ncurses-lib="${EPREFIX}/usr/$(get_libdir)" \ |
301 |
+ $(use_with fltk) \ |
302 |
+ $(use_with gmp) \ |
303 |
+ --without-qt \ |
304 |
+ $(usex threads "--mt=pthread" "" "" "") \ |
305 |
+ || die "./Configure failed" |
306 |
+} |
307 |
+ |
308 |
+src_compile() { |
309 |
+ local mymake="" |
310 |
+ use hppa && \ |
311 |
+ mymake=DLLD\="${EPREFIX}"/usr/bin/gcc\ DLLDFLAGS\=-shared\ -Wl,-soname=\$\(LIBPARI_SONAME\)\ -lm |
312 |
+ |
313 |
+ emake ${mymake} gp |
314 |
+ |
315 |
+ if use doc; then |
316 |
+ # To prevent sandbox violations by metafont |
317 |
+ VARTEXFONTS="${T}/fonts" emake docpdf |
318 |
+ fi |
319 |
+} |
320 |
+ |
321 |
+src_test() { |
322 |
+ # Welcome to the jungle, where the tests fail if you make your |
323 |
+ # terminal bigger. |
324 |
+ emake COLUMNS=80 test-all |
325 |
+} |
326 |
+ |
327 |
+src_install() { |
328 |
+ DOCS=( AUTHORS CHANGES* COMPAT NEW README* ) |
329 |
+ default |
330 |
+ |
331 |
+ if use doc; then |
332 |
+ docompress -x "/usr/share/doc/${PF}" |
333 |
+ emake \ |
334 |
+ DESTDIR="${D}" \ |
335 |
+ EXDIR="${ED}/usr/share/doc/${PF}/examples" \ |
336 |
+ DOCDIR="${ED}/usr/share/doc/${PF}" \ |
337 |
+ install-doc |
338 |
+ fi |
339 |
+} |