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