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: Tue, 01 Dec 2020 09:11:50
Message-Id: 1606813889.caf094ccec3d16674d3f5694af5f3c1cc23e2d88.grozin@gentoo
1 commit: caf094ccec3d16674d3f5694af5f3c1cc23e2d88
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 1 09:11:29 2020 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 1 09:11:29 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=caf094cc
7
8 media-gfx/asymptote: bump to 2.68
9
10 Package-Manager: Portage-3.0.10, Repoman-3.0.2
11 Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org>
12
13 media-gfx/asymptote/Manifest | 1 +
14 media-gfx/asymptote/asymptote-2.68.ebuild | 217 +++++++++++++++++++++
15 .../asymptote/files/asymptote-2.68-info.patch | 13 ++
16 .../asymptote/files/asymptote-2.68-xdg-utils.patch | 23 +++
17 4 files changed, 254 insertions(+)
18
19 diff --git a/media-gfx/asymptote/Manifest b/media-gfx/asymptote/Manifest
20 index e9051c787ba..1d483a1867c 100644
21 --- a/media-gfx/asymptote/Manifest
22 +++ b/media-gfx/asymptote/Manifest
23 @@ -1,2 +1,3 @@
24 DIST asymptote-2.65.src.tgz 4640419 BLAKE2B a508532b9697a0744d48f8109d5b04ca71eb1ee7a08f15eccd2b95d63c16c980621ef03d01a03917a767c774f14a239a13f8fe50ad98b154b092f710917af1ad SHA512 c6879689192c1646a318b389de222accc55c8d5e9df17fab3c88c37f627d2cff8133cdefe9e6dec2784cf72edf261e557ad83f7fac6e67fd49c483e9d8971026
25 DIST asymptote-2.67.src.tgz 4668696 BLAKE2B 30be754a0e5869caad4d605f162dffe688d2dc09a0163a8c37d15fd9d6dd05652b7b0b2710ab31edaa8f4b36484df256d032f8826f3547e755eb90e5dbb179ec SHA512 5854ce51bc7a3d330eeb0887376645c3d292a368b06d01ec84c15ee5beee90ae429abfee1bff5025bdfb51edfa7f66e535c1187f66440df0c6626c79e3de6210
26 +DIST asymptote-2.68.src.tgz 4672007 BLAKE2B 96c1a99815cf04180ea2fe01528615390faf8d1e5853d4e2e5f4fcdf48f0ec7e774ab0facdb86ad427e6ac11f5ce684902997f7d1e4855460ad450f6d6c64cfd SHA512 20aa3ae5116b93f266020a1d45178d7120cf39980634108b86a0bc8a4202e28b2cf0a1ac6fa5e921506db150e9077a1e3d7b8ad04869bc9bd22bae447f45fd46
27
28 diff --git a/media-gfx/asymptote/asymptote-2.68.ebuild b/media-gfx/asymptote/asymptote-2.68.ebuild
29 new file mode 100644
30 index 00000000000..1e7593538a8
31 --- /dev/null
32 +++ b/media-gfx/asymptote/asymptote-2.68.ebuild
33 @@ -0,0 +1,217 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +PYTHON_COMPAT=( python3_{6,7,8} )
40 +
41 +inherit autotools elisp-common latex-package python-r1
42 +
43 +DESCRIPTION="A vector graphics language that provides a framework for technical drawing"
44 +HOMEPAGE="https://asymptote.sourceforge.io/"
45 +SRC_URI="mirror://sourceforge/asymptote/${P}.src.tgz"
46 +
47 +LICENSE="GPL-3"
48 +SLOT="0"
49 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
50 +IUSE="+boehm-gc doc emacs examples fftw gsl +imagemagick latex offscreen +opengl python sigsegv svg test vim-syntax X"
51 +RESTRICT="!test? ( test )"
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[X(+)] media-libs/freeglut media-libs/glew:0 media-libs/glm )
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? ( >=app-editors/emacs-23.1:* )
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 + # Changing pdf, ps, image viewers to xdg-open
96 + "${FILESDIR}/${P}-xdg-utils.patch"
97 +
98 + # Bug #322473
99 + "${FILESDIR}/${P}-info.patch"
100 +)
101 +
102 +src_prepare() {
103 + sed -e "s:Datadir/doc/asymptote:Datadir/doc/${PF}:" \
104 + -i configure.ac \
105 + || die "sed configure.ac failed"
106 +
107 + default
108 + eautoreconf
109 +}
110 +
111 +src_configure() {
112 + # for the CPPFLAGS see
113 + # https://sourceforge.net/forum/forum.php?thread_id=1683277&forum_id=409349
114 + econf \
115 + CPPFLAGS=-DHAVE_SYS_TYPES_H \
116 + CFLAGS="${CXXFLAGS}" \
117 + --disable-gc-debug \
118 + $(use_enable boehm-gc gc system) \
119 + $(use_enable fftw) \
120 + $(use_enable gsl) \
121 + $(use_enable opengl gl) \
122 + $(use_enable offscreen) \
123 + $(use_enable sigsegv)
124 +}
125 +
126 +src_compile() {
127 + default
128 +
129 + cd doc || die
130 + emake asy.1
131 + if use doc; then
132 + # info
133 + einfo "Making info"
134 + emake ${PN}.info
135 + cd FAQ || die
136 + emake
137 + cd .. || die
138 + # pdf
139 + einfo "Making pdf docs"
140 + export VARTEXFONTS="${T}"/fonts
141 + # see bug #260606
142 + emake -j1 asymptote.pdf
143 + emake CAD.pdf
144 + fi
145 + cd .. || die
146 +
147 + if use emacs; then
148 + einfo "Compiling emacs lisp files"
149 + elisp-compile base/*.el
150 + fi
151 +}
152 +
153 +src_install() {
154 + # the program
155 + dobin asy
156 +
157 + # .asy files
158 + insinto /usr/share/${PN}
159 + doins -r base/*.asy base/shaders base/webgl
160 +
161 + # documentation
162 + dodoc BUGS ChangeLog README ReleaseNotes TODO
163 + doman doc/asy.1
164 +
165 + # X GUI
166 + if use X; then
167 + insinto /usr/share/${PN}
168 + doins -r GUI
169 + chmod +x "${D}"/usr/share/${PN}/GUI/xasy.py
170 + dosym ../share/${PN}/GUI/xasy.py /usr/bin/xasy
171 + doman doc/xasy.1x
172 + fi
173 +
174 + # examples
175 + if use examples; then
176 + insinto /usr/share/${PN}/examples
177 + doins \
178 + examples/*.asy \
179 + examples/*.views \
180 + examples/*.dat \
181 + examples/*.bib \
182 + examples/piicon.png \
183 + examples/100d.pdb1 \
184 + doc/*.asy \
185 + doc/*.csv \
186 + doc/*.dat \
187 + doc/pixel.pdf \
188 + doc/extra/*.asy
189 + insinto /usr/share/${PN}/examples/animations
190 + doins examples/animations/*.asy
191 + fi
192 +
193 + # LaTeX style
194 + if use latex; then
195 + cd doc || die
196 + insinto "${TEXMF}"/tex/latex/${PN}
197 + doins ${PN}.sty asycolors.sty
198 + if use examples; then
199 + insinto /usr/share/${PN}/examples
200 + doins latexusage.tex externalprc.tex
201 + insinto /usr/share/${PN}/examples/animations
202 + doins ../examples/animations/*.tex
203 + fi
204 + cd .. || die
205 + fi
206 +
207 + # asymptote.py
208 + if use python; then
209 + python_foreach_impl python_domodule base/${PN}.py
210 + fi
211 +
212 + # emacs mode
213 + if use emacs; then
214 + elisp-install ${PN} base/*.el base/*.elc asy-keywords.el
215 + elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
216 + fi
217 +
218 + # vim syntax
219 + if use vim-syntax; then
220 + insinto /usr/share/vim/vimfiles/syntax
221 + doins base/asy.vim
222 + insinto /usr/share/vim/vimfiles/ftdetect
223 + doins base/asy_filetype.vim
224 + fi
225 +
226 + # extra documentation
227 + if use doc; then
228 + cd doc || die
229 + doinfo ${PN}.info*
230 + dodoc ${PN}.pdf CAD.pdf
231 + cd FAQ || die
232 + dodoc asy-faq.ascii
233 + doinfo asy-faq.info
234 + docinto html/FAQ
235 + dodoc asy-faq.html/*
236 + fi
237 +}
238 +
239 +pkg_postinst() {
240 + use latex && latex-package_rehash
241 + use emacs && elisp-site-regen
242 +
243 + elog 'Use the variable ASYMPTOTE_PSVIEWER to set the postscript viewer'
244 + elog 'Use the variable ASYMPTOTE_PDFVIEWER to set the PDF viewer'
245 +}
246 +
247 +pkg_postrm() {
248 + use latex && latex-package_rehash
249 + use emacs && elisp-site-regen
250 +}
251
252 diff --git a/media-gfx/asymptote/files/asymptote-2.68-info.patch b/media-gfx/asymptote/files/asymptote-2.68-info.patch
253 new file mode 100644
254 index 00000000000..c0812477115
255 --- /dev/null
256 +++ b/media-gfx/asymptote/files/asymptote-2.68-info.patch
257 @@ -0,0 +1,13 @@
258 +Index: asymptote-2.67/doc/asymptote.texi
259 +===================================================================
260 +--- asymptote-2.67.orig/doc/asymptote.texi
261 ++++ asymptote-2.67/doc/asymptote.texi
262 +@@ -23,7 +23,7 @@ file LICENSE in the top-level source dir
263 +
264 + @dircategory Languages
265 + @direntry
266 +-* asymptote: (asymptote/asymptote). Vector graphics language.
267 ++* asymptote: (asymptote). Vector graphics language.
268 + @end direntry
269 +
270 + @titlepage
271
272 diff --git a/media-gfx/asymptote/files/asymptote-2.68-xdg-utils.patch b/media-gfx/asymptote/files/asymptote-2.68-xdg-utils.patch
273 new file mode 100644
274 index 00000000000..a6a2c7daba0
275 --- /dev/null
276 +++ b/media-gfx/asymptote/files/asymptote-2.68-xdg-utils.patch
277 @@ -0,0 +1,23 @@
278 +Только в asymptote-2.67.orig: .pc
279 +Index: asymptote-2.67/settings.cc
280 +===================================================================
281 +--- asymptote-2.67.orig/settings.cc
282 ++++ asymptote-2.67/settings.cc
283 +@@ -100,13 +100,13 @@ string defaultPSViewer="open";
284 + string defaultPDFViewer="open";
285 + string defaultHTMLViewer="open";
286 + #else
287 +-string defaultPSViewer="gv";
288 +-string defaultPDFViewer="acroread";
289 +-string defaultHTMLViewer="google-chrome";
290 ++string defaultPSViewer="xdg-open";
291 ++string defaultPDFViewer="xdg-open";
292 ++string defaultHTMLViewer="xdg-open";
293 + #endif
294 + string defaultGhostscript="gs";
295 + string defaultGhostscriptLibrary="";
296 +-string defaultDisplay="display";
297 ++string defaultDisplay="xdg-open";
298 + string defaultAnimate="animate";
299 + void queryRegistry() {}
300 + const string dirsep="/";