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/, media-gfx/asymptote/files/
Date: Wed, 29 Apr 2020 13:55:20
Message-Id: 1588168478.292fb8972973b470847dcbf5b5d685ae4cee0cd5.grozin@gentoo
1 commit: 292fb8972973b470847dcbf5b5d685ae4cee0cd5
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Wed Apr 29 13:54:38 2020 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 29 13:54:38 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=292fb897
7
8 media-gfx/asymptote: bump to 2.65
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org>
12
13 media-gfx/asymptote/Manifest | 1 +
14 media-gfx/asymptote/asymptote-2.65.ebuild | 211 +++++++++++++++++++++
15 .../asymptote/files/asymptote-2.65-info.patch | 13 ++
16 .../asymptote/files/asymptote-2.65-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 2d2db83edac..59b62e428be 100644
21 --- a/media-gfx/asymptote/Manifest
22 +++ b/media-gfx/asymptote/Manifest
23 @@ -1,2 +1,3 @@
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 +DIST asymptote-2.65.src.tgz 4640419 BLAKE2B a508532b9697a0744d48f8109d5b04ca71eb1ee7a08f15eccd2b95d63c16c980621ef03d01a03917a767c774f14a239a13f8fe50ad98b154b092f710917af1ad SHA512 c6879689192c1646a318b389de222accc55c8d5e9df17fab3c88c37f627d2cff8133cdefe9e6dec2784cf72edf261e557ad83f7fac6e67fd49c483e9d8971026
27
28 diff --git a/media-gfx/asymptote/asymptote-2.65.ebuild b/media-gfx/asymptote/asymptote-2.65.ebuild
29 new file mode 100644
30 index 00000000000..4c2242fc198
31 --- /dev/null
32 +++ b/media-gfx/asymptote/asymptote-2.65.ebuild
33 @@ -0,0 +1,211 @@
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="http://asymptote.sourceforge.net/"
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 base/*.asy
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 + doc/*.asy \
180 + doc/*.csv \
181 + doc/*.dat \
182 + doc/extra/*.asy
183 + insinto /usr/share/${PN}/examples/animations
184 + doins examples/animations/*.asy
185 + fi
186 +
187 + # LaTeX style
188 + if use latex; then
189 + cd doc || die
190 + insinto "${TEXMF}"/tex/latex/${PN}
191 + doins ${PN}.sty asycolors.sty
192 + if use examples; then
193 + insinto /usr/share/${PN}/examples
194 + doins latexusage.tex
195 + insinto /usr/share/${PN}/examples/animations
196 + doins ../examples/animations/*.tex
197 + fi
198 + cd .. || die
199 + fi
200 +
201 + # asymptote.py
202 + if use python; then
203 + python_foreach_impl python_domodule base/${PN}.py
204 + fi
205 +
206 + # emacs mode
207 + if use emacs; then
208 + elisp-install ${PN} base/*.el base/*.elc
209 + elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
210 + fi
211 +
212 + # vim syntax
213 + if use vim-syntax; then
214 + insinto /usr/share/vim/vimfiles/syntax
215 + doins base/asy.vim
216 + insinto /usr/share/vim/vimfiles/ftdetect
217 + doins "${FILESDIR}"/asy-ftd.vim
218 + fi
219 +
220 + # extra documentation
221 + if use doc; then
222 + cd doc || die
223 + doinfo ${PN}.info*
224 + dodoc ${PN}.pdf CAD.pdf
225 + cd FAQ || die
226 + dodoc asy-faq.ascii
227 + doinfo asy-faq.info
228 + docinto html/FAQ
229 + dodoc asy-faq.html/*
230 + fi
231 +}
232 +
233 +pkg_postinst() {
234 + use latex && latex-package_rehash
235 + use emacs && elisp-site-regen
236 +
237 + elog 'Use the variable ASYMPTOTE_PSVIEWER to set the postscript viewer'
238 + elog 'Use the variable ASYMPTOTE_PDFVIEWER to set the PDF viewer'
239 +}
240 +
241 +pkg_postrm() {
242 + use latex && latex-package_rehash
243 + use emacs && elisp-site-regen
244 +}
245
246 diff --git a/media-gfx/asymptote/files/asymptote-2.65-info.patch b/media-gfx/asymptote/files/asymptote-2.65-info.patch
247 new file mode 100644
248 index 00000000000..27d0e5ce868
249 --- /dev/null
250 +++ b/media-gfx/asymptote/files/asymptote-2.65-info.patch
251 @@ -0,0 +1,13 @@
252 +Index: asymptote-2.65/doc/asymptote.texi
253 +===================================================================
254 +--- asymptote-2.65.orig/doc/asymptote.texi
255 ++++ asymptote-2.65/doc/asymptote.texi
256 +@@ -23,7 +23,7 @@ file LICENSE in the top-level source dir
257 +
258 + @dircategory Languages
259 + @direntry
260 +-* asymptote: (asymptote/asymptote). Vector graphics language.
261 ++* asymptote: (asymptote). Vector graphics language.
262 + @end direntry
263 +
264 + @titlepage
265
266 diff --git a/media-gfx/asymptote/files/asymptote-2.65-xdg-utils.patch b/media-gfx/asymptote/files/asymptote-2.65-xdg-utils.patch
267 new file mode 100644
268 index 00000000000..6f4fb6cbcf4
269 --- /dev/null
270 +++ b/media-gfx/asymptote/files/asymptote-2.65-xdg-utils.patch
271 @@ -0,0 +1,22 @@
272 +Index: asymptote-2.65/settings.cc
273 +===================================================================
274 +--- asymptote-2.65.orig/settings.cc
275 ++++ asymptote-2.65/settings.cc
276 +@@ -100,13 +100,13 @@ string defaultPSViewer="open";
277 + string defaultPDFViewer="open";
278 + string defaultHTMLViewer="open";
279 + #else
280 +-string defaultPSViewer="gv";
281 +-string defaultPDFViewer="acroread";
282 +-string defaultHTMLViewer="google-chrome";
283 ++string defaultPSViewer="xdg-open";
284 ++string defaultPDFViewer="xdg-open";
285 ++string defaultHTMLViewer="xdg-open";
286 + #endif
287 + string defaultGhostscript="gs";
288 + string defaultGhostscriptLibrary="";
289 +-string defaultDisplay="display";
290 ++string defaultDisplay="xdg-open";
291 + string defaultAnimate="animate";
292 + void queryRegistry() {}
293 + const string dirsep="/";