Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-mathematics/axiom/files/, sci-mathematics/axiom/
Date: Mon, 21 Sep 2015 14:05:29
Message-Id: 1442844281.504356161b1a444c8dae450cad83ba2253a3262d.jlec@gentoo
1 commit: 504356161b1a444c8dae450cad83ba2253a3262d
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 21 14:04:41 2015 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 21 14:04:41 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=50435616
7
8 sci-mathematics/axiom: Version Bump
9
10 Package-Manager: portage-2.2.20.1
11 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
12
13 sci-mathematics/axiom/axiom-201009.ebuild | 112 --------------
14 sci-mathematics/axiom/axiom-201408.ebuild | 68 +++++++++
15 .../noweb-2.9-insecure-tmp-file.Makefile.patch | 10 --
16 .../files/noweb-2.9-insecure-tmp-file.patch.input | 168 ---------------------
17 4 files changed, 68 insertions(+), 290 deletions(-)
18
19 diff --git a/sci-mathematics/axiom/axiom-201009.ebuild b/sci-mathematics/axiom/axiom-201009.ebuild
20 deleted file mode 100644
21 index 3cb0804..0000000
22 --- a/sci-mathematics/axiom/axiom-201009.ebuild
23 +++ /dev/null
24 @@ -1,112 +0,0 @@
25 -# Copyright 1999-2014 Gentoo Foundation
26 -# Distributed under the terms of the GNU General Public License v2
27 -# $Id$
28 -
29 -EAPI=5
30 -
31 -inherit eutils flag-o-matic multilib
32 -
33 -DESCRIPTION="Axiom is a general purpose Computer Algebra system"
34 -HOMEPAGE="http://axiom.axiom-developer.org/"
35 -SRC_URI="http://www.axiom-developer.org/axiom-website/downloads/${PN}-sept2010-src.tgz"
36 -
37 -LICENSE="BSD-2"
38 -SLOT="0"
39 -KEYWORDS=""
40 -IUSE=""
41 -
42 -# NOTE: Do not strip since this seems to remove some crucial
43 -# runtime paths as well, thereby, breaking axiom
44 -RESTRICT="strip"
45 -
46 -# Seems to need a working version of pstricks package these days Bummer: <gmp-5 is needed for the
47 -# interal gcl, otherwise axiom will try to build an internal copy of gmp-4 which fails.
48 -RDEPEND="
49 - dev-libs/gmp
50 - x11-libs/libXaw"
51 -DEPEND="${RDEPEND}
52 - app-text/dvipdfm
53 - dev-texlive/texlive-pstricks
54 - sys-apps/debianutils
55 - sys-process/procps
56 - virtual/latex-base"
57 -
58 -S="${WORKDIR}"/${PN}
59 -
60 -## The following stuff seems to be fixed?
61 -
62 -# pkg_setup() {
63 -# # for 2.6.25 kernels and higher we need to have
64 -# # /proc/sys/kernel/randomize_va_space set to somthing other
65 -# # than 2, otherwise gcl fails to compile (see bug #186926).
66 -# local current_setting=$(/sbin/sysctl kernel.randomize_va_space 2>/dev/null | cut -d' ' -f3)
67 -# if [[ ${current_setting} == 2 ]]; then
68 -# echo
69 -# eerror "Your kernel has brk randomization enabled. This will"
70 -# eerror "cause axiom to fail to compile *and* run (see bug #186926)."
71 -# eerror "You can issue:"
72 -# eerror
73 -# eerror " /sbin/sysctl -w kernel.randomize_va_space=1"
74 -# eerror
75 -# eerror "as root to turn brk randomization off temporarily."
76 -# eerror "However, when not using axiom you may want to turn"
77 -# eerror "brk randomization back on via"
78 -# eerror
79 -# eerror " /sbin/sysctl -w kernel.randomize_va_space=2"
80 -# eerror
81 -# eerror "since it results in a less secure kernel."
82 -# die "Kernel brk randomization detected"
83 -# fi
84 -# }
85 -
86 -src_prepare() {
87 - ## How weird, axiom ships these patches, but does not apply them.
88 - ## So, we keep our gentoo patches around.
89 - cp "${FILESDIR}"/noweb-2.9-insecure-tmp-file.patch.input \
90 - "${S}"/zips/noweb-2.9-insecure-tmp-file.patch \
91 - || die "Failed to fix noweb"
92 -# cp "${FILESDIR}"/${PN}-200711-gcl-configure.patch \
93 -# "${S}"/zips/gcl-2.6.7.configure.in.patch \
94 -# || die "Failed to fix gcl-2.6.7 configure"
95 - epatch "${FILESDIR}"/noweb-2.9-insecure-tmp-file.Makefile.patch
96 -
97 - # lots of strict-aliasing badness
98 - append-flags -fno-strict-aliasing
99 -}
100 -
101 -src_compile() {
102 -## I believe 2.6.8_pre4 can be used now.
103 - # use gcl 2.6.7
104 -# sed -e "s:GCLVERSION=gcl-2.6.8pre$:GCLVERSION=gcl-2.6.7:" \
105 -# -i Makefile.pamphlet Makefile \
106 -# || die "Failed to select proper gcl"
107 -#
108 - # fix libXpm.a location
109 - sed -e "s:X11R6/lib:$(get_libdir):g" -i Makefile.pamphlet \
110 - || die "Failed to fix libXpm lib paths"
111 -
112 - # This will fix the internal gmp. This package will stay unkeyworded until this is resolved
113 - # upstream.
114 - unset ABI
115 -
116 - # Let the fun begin...
117 - AXIOM="${S}"/mnt/linux emake -j1
118 -}
119 -
120 -src_install() {
121 - emake DESTDIR="${ED}"/opt/axiom COMMAND="${ED}"/opt/axiom/mnt/linux/bin/axiom install
122 -
123 - mv "${ED}"/opt/axiom/mnt/linux/* "${ED}"/opt/axiom \
124 - || die "Failed to mv axiom into its final destination path."
125 - rm -fr "${ED}"/opt/axiom/mnt \
126 - || die "Failed to remove old directory."
127 -
128 - dosym ../../axiom/bin/axiom /usr/bin/axiom
129 -
130 - sed \
131 - -e "2d;3i AXIOM=/opt/axiom" \
132 - -i "${D}"/opt/axiom/bin/axiom \
133 - || die "Failed to patch axiom runscript!"
134 -
135 - dodoc changelog readme faq
136 -}
137
138 diff --git a/sci-mathematics/axiom/axiom-201408.ebuild b/sci-mathematics/axiom/axiom-201408.ebuild
139 new file mode 100644
140 index 0000000..ee58136
141 --- /dev/null
142 +++ b/sci-mathematics/axiom/axiom-201408.ebuild
143 @@ -0,0 +1,68 @@
144 +# Copyright 1999-2015 Gentoo Foundation
145 +# Distributed under the terms of the GNU General Public License v2
146 +# $Id$
147 +
148 +EAPI=5
149 +
150 +inherit eutils flag-o-matic multilib
151 +
152 +DESCRIPTION="Axiom is a general purpose Computer Algebra system"
153 +HOMEPAGE="http://axiom.axiom-developer.org/"
154 +SRC_URI="http://axiom.axiom-developer.org/axiom-website/downloads/axiom-aug2014-src.tgz"
155 +
156 +LICENSE="BSD-2"
157 +SLOT="0"
158 +KEYWORDS=""
159 +IUSE=""
160 +
161 +# NOTE: Do not strip since this seems to remove some crucial
162 +# runtime paths as well, thereby, breaking axiom
163 +RESTRICT="strip"
164 +
165 +# Seems to need a working version of pstricks package these days Bummer: <gmp-5 is needed for the
166 +# interal gcl, otherwise axiom will try to build an internal copy of gmp-4 which fails.
167 +RDEPEND="
168 + dev-libs/gmp:0=
169 + x11-libs/libXaw"
170 +DEPEND="${RDEPEND}
171 + app-text/dvipdfm
172 + dev-texlive/texlive-pstricks
173 + sys-apps/debianutils
174 + sys-process/procps
175 + virtual/latex-base"
176 +
177 +S="${WORKDIR}"/${PN}
178 +
179 +src_prepare() {
180 + append-flags -fno-strict-aliasing
181 +}
182 +
183 +src_compile() {
184 + sed -e "s:X11R6/lib:$(get_libdir):g" -i Makefile.pamphlet \
185 + || die "Failed to fix libXpm lib paths"
186 +
187 + # This will fix the internal gmp. This package will stay unkeyworded until this is resolved
188 + # upstream.
189 + unset ABI
190 +
191 + # Let the fun begin...
192 + AXIOM="${S}"/mnt/linux emake -j1
193 +}
194 +
195 +src_install() {
196 + emake DESTDIR="${ED}"/opt/axiom COMMAND="${ED}"/opt/axiom/mnt/linux/bin/axiom install
197 +
198 + mv "${ED}"/opt/axiom/mnt/linux/* "${ED}"/opt/axiom \
199 + || die "Failed to mv axiom into its final destination path."
200 + rm -fr "${ED}"/opt/axiom/mnt \
201 + || die "Failed to remove old directory."
202 +
203 + dosym ../../axiom/bin/axiom /usr/bin/axiom
204 +
205 + sed \
206 + -e "2d;3i AXIOM=/opt/axiom" \
207 + -i "${D}"/opt/axiom/bin/axiom \
208 + || die "Failed to patch axiom runscript!"
209 +
210 + dodoc changelog readme faq
211 +}
212
213 diff --git a/sci-mathematics/axiom/files/noweb-2.9-insecure-tmp-file.Makefile.patch b/sci-mathematics/axiom/files/noweb-2.9-insecure-tmp-file.Makefile.patch
214 deleted file mode 100644
215 index b8cd40e..0000000
216 --- a/sci-mathematics/axiom/files/noweb-2.9-insecure-tmp-file.Makefile.patch
217 +++ /dev/null
218 @@ -1,10 +0,0 @@
219 ---- Makefile~ 2005-09-05 19:50:31.000000000 +0100
220 -+++ Makefile 2006-02-17 17:08:31.000000000 +0000
221 -@@ -85,6 +85,7 @@
222 - ${PATCH} <${ZIPS}/noweb.modules.c.patch ; \
223 - cd ${OBJ}/noweb/src ; \
224 - ${PATCH} <${ZIPS}/noweb.src.Makefile.patch ; \
225 -+ ${PATCH} -p0 <${ZIPS}/noweb-2.9-insecure-tmp-file.patch ; \
226 - ./awkname ${AWK} ; \
227 - ${ENV} ${MAKE} BIN=${MNT}/${SYS}/bin/lib LIB=${MNT}/${SYS}/bin/lib \
228 - MAN=${MNT}/${SYS}/bin/man \
229
230 diff --git a/sci-mathematics/axiom/files/noweb-2.9-insecure-tmp-file.patch.input b/sci-mathematics/axiom/files/noweb-2.9-insecure-tmp-file.patch.input
231 deleted file mode 100644
232 index 00288a8..0000000
233 --- a/sci-mathematics/axiom/files/noweb-2.9-insecure-tmp-file.patch.input
234 +++ /dev/null
235 @@ -1,168 +0,0 @@
236 ---- awkname
237 -+++ awkname
238 -@@ -5,7 +5,7 @@
239 - esac
240 -
241 - rc=0
242 --new=/tmp/$$.new; old=/tmp/$$.old
243 -+new=$(tempfile -p new); old=$(tempfile -p old)
244 -
245 - for file in lib/emptydefn lib/unmarkup lib/toascii \
246 - awk/noidx awk/totex awk/tohtml awk/noindex \
247 ---- awk/totex.nw
248 -+++ awk/totex.nw
249 -@@ -24,7 +24,7 @@
250 - @
251 - On an ugly system, we have to put it in a file.
252 - <<invoke awk program using file>>=
253 --awkfile=/tmp/totex$$.awk
254 -+awkfile=$(tempfile -p totex)
255 - trap 'rm -f $awkfile; exit 1' 0 1 2 15 # clean up files
256 - cat > $awkfile << 'EOF'
257 - <<awk program for conversion to {\TeX}>>
258 ---- lib/toascii
259 -+++ lib/toascii
260 -@@ -7,9 +7,9 @@
261 - *) echo "This can't happen -- $i passed to toascii" 1>&2 ; exit 1 ;;
262 - esac
263 - done
264 --awkfile="tmp/awk$$.tmp"
265 --textfile="/tmp/text$$.tmp"
266 --tagsfile="/tmp/tags$$.tmp"
267 -+awkfile=$(tempfile -p awk -s .tmp)
268 -+textfile=$(tempfile -p text -s .tmp)
269 -+tagsfile=$(tempfile -p tags -s .tmp)
270 - export awkfile textfile tagsfile
271 - trap 'rm -f $awkfile $textfile $tagsfile' 0 1 2 10 14 15
272 - nawk 'BEGIN { textfile=ENVIRON["textfile"]
273 ---- shell/cpif
274 -+++ shell/cpif
275 -@@ -17,7 +17,7 @@
276 - 0) echo 'Usage: '`basename $0`' [ -eq -ne ] file...' 1>&2; exit 2
277 - esac
278 -
279 --new=/tmp/$$
280 -+new=$(tempfile)
281 - trap 'rm -f $new; exit 1' 1 2 15 # clean up files
282 -
283 - cat >$new
284 ---- shell/nonu
285 -+++ shell/nonu
286 -@@ -2,7 +2,7 @@
287 - LIB=/usr/public/pkg/noweb/lib
288 - # attempt to convert nuweb to noweb using sam
289 -
290 --tmp=/tmp/nonu$$
291 -+tmp=$(tempfile -p nonu)
292 - trap '/bin/rm -f $tmp; exit 1' 1 2 15 # clean up files
293 - cp $1 $tmp || exit 1
294 -
295 ---- shell/roff.nw
296 -+++ shell/roff.nw
297 -@@ -80,7 +80,7 @@
298 - other, and quoting each quote is ugly. The pragmatic solution is to
299 - copy the awk program into a temporary file, using a shell here-document.
300 - <<invoke awk program>>=
301 --awkfile="/tmp/noweb$$.awk"
302 -+awkfile=$(tempfile -p noweb -s .awk)
303 - trap 'rm -f $awkfile' 0 1 2 10 14 15
304 - cat > $awkfile << 'EOF'
305 - <<awk program>>
306 -@@ -662,12 +662,13 @@
307 -
308 - base="`basename $1 | sed '/\./s/\.[^.]*$//'`"
309 - tagsfile="$base.nwt"
310 -+tmpfile=$(tempfile -p tags)
311 - (echo ".so $macrodir/tmac.w"
312 - if [ -r "$tagsfile" ]; then
313 -- cp $tagsfile /tmp/tags.$$
314 -+ cp $tagsfile $tmpfile
315 - $AWK '<<action for [[tags]] line>>
316 -- <<functions>>' /tmp/tags.$$
317 -- rm -f /tmp/tags.$$
318 -+ <<functions>>' $tmpfile
319 -+ rm -f $tmpfile
320 - fi
321 - cat "$@") |
322 - ($ROFF $opts 2>$tagsfile)
323 ---- shell/noroff
324 -+++ shell/noroff
325 -@@ -35,9 +35,10 @@
326 -
327 - base="`basename $1 | sed '/\./s/\.[^.]*$//'`"
328 - tagsfile="$base.nwt"
329 -+tmpfile=$(tempfile -p tags)
330 - (echo ".so $macrodir/tmac.w"
331 - if [ -r "$tagsfile" ]; then
332 -- cp $tagsfile /tmp/tags.$$
333 -+ cp $tagsfile $tmpfile
334 - $AWK '{
335 - if (sub(/^###TAG### / , "")) tags[$1] = $2
336 - else if (sub(/^###BEGINCHUNKS###/, "")) printf ".de CLIST\n.CLISTBEGIN\n"
337 -@@ -88,8 +89,8 @@
338 - # print str3
339 - # print convquote(str3)
340 - # }
341 -- function tag(s) { if (s in tags) return tags[s]; else return "???" }' /tmp/tags.$$
342 -- rm -f /tmp/tags.$$
343 -+ function tag(s) { if (s in tags) return tags[s]; else return "???" }' $tmpfile
344 -+ rm -f $tmpfile
345 - fi
346 - cat "$@") |
347 - ($ROFF $opts 2>$tagsfile)
348 ---- shell/toroff
349 -+++ shell/toroff
350 -@@ -9,7 +9,7 @@
351 - exit 1;;
352 - esac
353 - done
354 --awkfile="/tmp/noweb$$.awk"
355 -+awkfile=$(tempfile -p noweb -s .awk)
356 - trap 'rm -f $awkfile' 0 1 2 10 14 15
357 - cat > $awkfile << 'EOF'
358 - /^@begin docs 0$/ { if (delay) next }
359 ---- lib/toascii.nw
360 -+++ lib/toascii.nw
361 -@@ -28,9 +28,9 @@
362 - Also arranged here is a temporary file for storage of the awk program on an
363 - ugly system, as discussed below.
364 - <<arrange temporary files>>=
365 --awkfile="tmp/awk$$.tmp"
366 --textfile="/tmp/text$$.tmp"
367 --tagsfile="/tmp/tags$$.tmp"
368 -+awkfile=$(tempfile -p awk -s .tmp) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
369 -+textfile=$(tempfile -p text -s .tmp) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
370 -+tagsfile=$(tempfile -p tags -s .tmp) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
371 - export awkfile textfile tagsfile
372 - trap 'rm -f $awkfile $textfile $tagsfile' 0 1 2 10 14 15
373 - @ %def textfile tagsfile awkfile
374 ---- shell/roff.mm
375 -+++ shell/roff.mm
376 -@@ -214,7 +214,7 @@
377 - .ADDLIST 1a
378 - .PRINTLIST
379 -
380 --awkfile="/tmp/noweb$$.awk"
381 -+awkfile=$(tempfile -p noweb -s .awk) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
382 - trap 'rm -f $awkfile' 0 1 2 10 14 15
383 - cat > $awkfile \&<< 'EOF'
384 - \c
385 -@@ -1628,14 +1628,15 @@
386 - tagsfile="$base.nwt"
387 - (echo ".so $macrodir/tmac.w"
388 - if [ -r "$tagsfile" ]; then
389 -- cp $tagsfile /tmp/tags.$$
390 -+ tagstemp=$(tempfile -p tags) || { echo "$0: Cannot create temporary file" >&2; exit 1; }
391 -+ cp $tagsfile $tagstemp
392 - $AWK '\c
393 - .USE "action for \*[BEGINCONVQUOTE]tags\*[ENDCONVQUOTE] line" 11c
394 - \&
395 - \c
396 - .USE "functions" 8a
397 --\&' /tmp/tags.$$
398 -- rm -f /tmp/tags.$$
399 -+\&' $tagstemp
400 -+ rm -f $tagstemp
401 - fi
402 - cat "$@") |
403 - ($ROFF $opts 2>$tagsfile)