Gentoo Archives: gentoo-commits

From: Andrey Grozin <grozin@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/asymptote/files/, media-gfx/asymptote/
Date: Mon, 01 Apr 2019 09:04:08
Message-Id: 1554109270.4894aadd4841c8795cd879c67197ff1ecb496e5e.grozin@gentoo
1 commit: 4894aadd4841c8795cd879c67197ff1ecb496e5e
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 1 09:01:10 2019 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 1 09:01:10 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4894aadd
7
8 media-gfx/asymptote: bump to 2.48
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.12
11 Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org>
12
13 media-gfx/asymptote/Manifest | 1 +
14 media-gfx/asymptote/asymptote-2.48.ebuild | 214 +++++++++++++++++++++
15 .../files/asymptote-2.48-configure-ac.patch | 13 ++
16 .../asymptote/files/asymptote-2.48-info.patch | 13 ++
17 .../asymptote/files/asymptote-2.48-xdg-utils.patch | 23 +++
18 5 files changed, 264 insertions(+)
19
20 diff --git a/media-gfx/asymptote/Manifest b/media-gfx/asymptote/Manifest
21 index cabb1f45a17..4049d54d84a 100644
22 --- a/media-gfx/asymptote/Manifest
23 +++ b/media-gfx/asymptote/Manifest
24 @@ -1,2 +1,3 @@
25 DIST asymptote-2.41.src.tgz 3516426 BLAKE2B d4623609be58566e32de82c5c47f635ed737459fa27cd2da0622d639cd8207fc69988a7ecbf82993b051435fbf223c1f1178d213aea258a2b57fd3a698eee9cb SHA512 93f737a44b085c2290c4553c765cf49679820e6623bc5b6d0229818409868876275d6f0571abeb76033955fa95ee594e37d10c9901c54755b085e36760fd96cb
26 DIST asymptote-2.47.src.tgz 3621676 BLAKE2B 575032093276b9df6b8d74897a4721dd0d5419b3380bce7962afc9dcdd20ec3bd47b5c4b882f2276a2ac4c0d99e657d7385122d7dc400efbfb52ceec753ee8f4 SHA512 9efc4a70e8d29d6d50ba49c54c48da38beb00f64e5b39f23dbaec5cb12b714e427473fdffbf71f2d636a007cbfc993fa3237a8beab01e3419c1da1287823c159
27 +DIST asymptote-2.48.src.tgz 3729763 BLAKE2B 5820ddbbd27f6e7296501f50f25051d8417a0ab24d7c4c777013bf23601b5cbe34a69ba781e16e05141fda4e2e7a8bc527a41829f8d9e983aadc19bd05743122 SHA512 cd8b756185ae6627ea66bcaea224152f6644df633fe7ed40c1738f3b2ec31fbaa7ba97f2b1e290b073995779768ee3a264dd942f609b768cab7624d12807583d
28
29 diff --git a/media-gfx/asymptote/asymptote-2.48.ebuild b/media-gfx/asymptote/asymptote-2.48.ebuild
30 new file mode 100644
31 index 00000000000..3941b97d615
32 --- /dev/null
33 +++ b/media-gfx/asymptote/asymptote-2.48.ebuild
34 @@ -0,0 +1,214 @@
35 +# Copyright 1999-2019 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=6
39 +
40 +PYTHON_COMPAT=( python3_{5,6,7} )
41 +
42 +inherit autotools elisp-common latex-package multilib python-r1
43 +
44 +DESCRIPTION="A vector graphics language that provides a framework for technical drawing"
45 +HOMEPAGE="http://asymptote.sourceforge.net/"
46 +SRC_URI="mirror://sourceforge/asymptote/${P}.src.tgz"
47 +
48 +LICENSE="GPL-3"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
51 +IUSE="+boehm-gc doc emacs examples fftw gsl +imagemagick latex offscreen +opengl python sigsegv svg test vim-syntax X"
52 +
53 +REQUIRED_USE="
54 + ${PYTHON_REQUIRED_USE}
55 + offscreen? ( opengl )
56 + doc? ( boehm-gc )"
57 +
58 +RDEPEND="
59 + >=sys-libs/ncurses-5.4-r5:0=
60 + >=sys-libs/readline-4.3-r5:0=
61 + imagemagick? ( media-gfx/imagemagick[png] )
62 + opengl? ( >=media-libs/mesa-8 )
63 + offscreen? ( media-libs/mesa[osmesa] )
64 + svg? ( app-text/dvisvgm )
65 + sigsegv? ( dev-libs/libsigsegv )
66 + boehm-gc? ( >=dev-libs/boehm-gc-7.0[cxx,threads] )
67 + fftw? ( >=sci-libs/fftw-3.0.1 )
68 + gsl? ( sci-libs/gsl )
69 + python? ( ${PYTHON_DEPS} )
70 + X? (
71 + ${PYTHON_DEPS}
72 + dev-python/PyQt5[${PYTHON_USEDEP},gui,widgets,svg]
73 + dev-python/numpy
74 + dev-python/pycson
75 + >=gnome-base/librsvg-2.40
76 + )
77 + latex? (
78 + virtual/latex-base
79 + >=dev-texlive/texlive-latexextra-2013
80 + )
81 + emacs? ( virtual/emacs )
82 + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
83 +DEPEND="${RDEPEND}
84 + doc? (
85 + dev-lang/perl
86 + media-gfx/imagemagick[png]
87 + virtual/texi2dvi
88 + virtual/latex-base
89 + app-text/ghostscript-gpl )
90 + test? ( app-text/ghostscript-gpl )"
91 +
92 +TEXMF=/usr/share/texmf-site
93 +
94 +PATCHES=(
95 + # gc.h -> gc/gc.h
96 + "${FILESDIR}/${P}-configure-ac.patch"
97 +
98 + # Changing pdf, ps, image viewers to xdg-open
99 + "${FILESDIR}/${P}-xdg-utils.patch"
100 +
101 + # Bug #322473
102 + "${FILESDIR}/${P}-info.patch"
103 +)
104 +
105 +src_prepare() {
106 + sed -e "s:Datadir/doc/asymptote:Datadir/doc/${PF}:" \
107 + -i configure.ac \
108 + || die "sed configure.ac failed"
109 +
110 + default
111 + eautoreconf
112 +}
113 +
114 +src_configure() {
115 + # for the CPPFLAGS see
116 + # https://sourceforge.net/forum/forum.php?thread_id=1683277&forum_id=409349
117 + econf \
118 + CPPFLAGS=-DHAVE_SYS_TYPES_H \
119 + CFLAGS="${CXXFLAGS}" \
120 + --disable-gc-debug \
121 + $(use_enable boehm-gc gc system) \
122 + $(use_enable fftw) \
123 + $(use_enable gsl) \
124 + $(use_enable opengl gl) \
125 + $(use_enable offscreen) \
126 + $(use_enable sigsegv)
127 +}
128 +
129 +src_compile() {
130 + default
131 +
132 + cd doc || die
133 + emake asy.1
134 + if use doc; then
135 + # info
136 + einfo "Making info"
137 + emake ${PN}.info
138 + cd FAQ || die
139 + emake
140 + cd .. || die
141 + # pdf
142 + einfo "Making pdf docs"
143 + export VARTEXFONTS="${T}"/fonts
144 + # see bug #260606
145 + emake -j1 asymptote.pdf
146 + emake CAD.pdf
147 + fi
148 + cd .. || die
149 +
150 + if use emacs; then
151 + einfo "Compiling emacs lisp files"
152 + elisp-compile base/*.el
153 + fi
154 +}
155 +
156 +src_install() {
157 + # the program
158 + dobin asy
159 +
160 + # .asy files
161 + insinto /usr/share/${PN}
162 + doins base/*.asy
163 +
164 + # documentation
165 + dodoc BUGS ChangeLog README ReleaseNotes TODO
166 + doman doc/asy.1
167 +
168 + # X GUI
169 + if use X; then
170 + insinto /usr/share/${PN}
171 + doins -r GUI
172 + chmod +x "${D}"usr/share/${PN}/GUI/xasy.py
173 + dosym /usr/share/${PN}/GUI/xasy.py /usr/bin/xasy
174 + doman doc/xasy.1x
175 + fi
176 +
177 + # examples
178 + if use examples; then
179 + insinto /usr/share/${PN}/examples
180 + doins \
181 + examples/*.asy \
182 + examples/*.eps \
183 + doc/*.asy \
184 + doc/*.csv \
185 + doc/*.dat \
186 + doc/extra/*.asy
187 + insinto /usr/share/${PN}/examples/animations
188 + doins examples/animations/*.asy
189 + fi
190 +
191 + # LaTeX style
192 + if use latex; then
193 + cd doc || die
194 + insinto "${TEXMF}"/tex/latex/${PN}
195 + doins ${PN}.sty asycolors.sty
196 + if use examples; then
197 + insinto /usr/share/${PN}/examples
198 + doins latexusage.tex
199 + fi
200 + cd .. || die
201 + fi
202 +
203 + # asymptote.py
204 + if use python; then
205 + python_foreach_impl python_domodule base/${PN}.py
206 + fi
207 +
208 + # emacs mode
209 + if use emacs; then
210 + elisp-install ${PN} base/*.el base/*.elc
211 + elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
212 + fi
213 +
214 + # vim syntax
215 + if use vim-syntax; then
216 + insinto /usr/share/vim/vimfiles/syntax
217 + doins base/asy.vim
218 + insinto /usr/share/vim/vimfiles/ftdetect
219 + doins "${FILESDIR}"/asy-ftd.vim
220 + fi
221 +
222 + # extra documentation
223 + if use doc; then
224 + cd doc || die
225 + doinfo ${PN}.info*
226 + cd FAQ || die
227 + dodoc asy-faq.ascii
228 + doinfo asy-faq.info
229 + insinto /usr/share/doc/${PF}/html/FAQ
230 + doins asy-faq.html/*
231 + cd .. || die
232 + insinto /usr/share/doc/${PF}
233 + doins ${PN}.pdf CAD.pdf
234 + fi
235 +}
236 +
237 +pkg_postinst() {
238 + use latex && latex-package_rehash
239 + use emacs && elisp-site-regen
240 +
241 + elog 'Use the variable ASYMPTOTE_PSVIEWER to set the postscript viewer'
242 + elog 'Use the variable ASYMPTOTE_PDFVIEWER to set the PDF viewer'
243 +}
244 +
245 +pkg_postrm() {
246 + use latex && latex-package_rehash
247 + use emacs && elisp-site-regen
248 +}
249
250 diff --git a/media-gfx/asymptote/files/asymptote-2.48-configure-ac.patch b/media-gfx/asymptote/files/asymptote-2.48-configure-ac.patch
251 new file mode 100644
252 index 00000000000..ef6fc52c934
253 --- /dev/null
254 +++ b/media-gfx/asymptote/files/asymptote-2.48-configure-ac.patch
255 @@ -0,0 +1,13 @@
256 +Index: asymptote-2.48/configure.ac
257 +===================================================================
258 +--- asymptote-2.48.orig/configure.ac
259 ++++ asymptote-2.48/configure.ac
260 +@@ -162,7 +162,7 @@ if test "x$ac_cv_use_gc" != "xno" ; then
261 + fi
262 + CPPFLAGS_SAVE=$CPPFLAGS
263 + CPPFLAGS=$CPPFLAGS" $INCL"
264 +- AC_CHECK_HEADER(gc.h,
265 ++ AC_CHECK_HEADER([gc/gc.h],
266 + AC_CHECK_LIB([gc],[GC_malloc],[
267 + LIBS=$LIBS"-lgc "
268 + AC_MSG_NOTICE([enabling system $GCNAME])],[
269
270 diff --git a/media-gfx/asymptote/files/asymptote-2.48-info.patch b/media-gfx/asymptote/files/asymptote-2.48-info.patch
271 new file mode 100644
272 index 00000000000..cd1577037f1
273 --- /dev/null
274 +++ b/media-gfx/asymptote/files/asymptote-2.48-info.patch
275 @@ -0,0 +1,13 @@
276 +Index: asymptote-2.48/doc/asymptote.texi
277 +===================================================================
278 +--- asymptote-2.48.orig/doc/asymptote.texi
279 ++++ asymptote-2.48/doc/asymptote.texi
280 +@@ -23,7 +23,7 @@ file LICENSE in the top-level source dir
281 +
282 + @dircategory Languages
283 + @direntry
284 +-* asymptote: (asymptote/asymptote). Vector graphics language.
285 ++* asymptote: (asymptote). Vector graphics language.
286 + @end direntry
287 +
288 + @titlepage
289
290 diff --git a/media-gfx/asymptote/files/asymptote-2.48-xdg-utils.patch b/media-gfx/asymptote/files/asymptote-2.48-xdg-utils.patch
291 new file mode 100644
292 index 00000000000..fe4ca556a73
293 --- /dev/null
294 +++ b/media-gfx/asymptote/files/asymptote-2.48-xdg-utils.patch
295 @@ -0,0 +1,23 @@
296 +Index: asymptote-2.48/settings.cc
297 +===================================================================
298 +--- asymptote-2.48.orig/settings.cc
299 ++++ asymptote-2.48/settings.cc
300 +@@ -91,15 +91,15 @@ bool msdos=false;
301 + string HOME="HOME";
302 + string docdir=ASYMPTOTE_DOCDIR;
303 + const char pathSeparator=':';
304 +-string defaultPSViewer="gv";
305 ++string defaultPSViewer="xdg-open";
306 + #ifdef __APPLE__
307 + string defaultPDFViewer="open";
308 + #else
309 +-string defaultPDFViewer="acroread";
310 ++string defaultPDFViewer="xdg-open";
311 + #endif
312 + string defaultGhostscript="gs";
313 + string defaultGhostscriptLibrary="";
314 +-string defaultDisplay="display";
315 ++string defaultDisplay="xdg-open";
316 + string defaultAnimate="animate";
317 + void queryRegistry() {}
318 + const string dirsep="/";