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/
Date: Mon, 03 Jan 2022 05:18:52
Message-Id: 1641187102.13016242e070982c828fd29d4255664a485b6940.grozin@gentoo
1 commit: 13016242e070982c828fd29d4255664a485b6940
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 3 05:18:22 2022 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 3 05:18:22 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13016242
7
8 media-gfx/asymptote: bump to 2.74
9
10 Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org>
11
12 media-gfx/asymptote/Manifest | 1 +
13 media-gfx/asymptote/asymptote-2.74.ebuild | 242 ++++++++++++++++++++++++++++++
14 media-gfx/asymptote/metadata.xml | 1 +
15 3 files changed, 244 insertions(+)
16
17 diff --git a/media-gfx/asymptote/Manifest b/media-gfx/asymptote/Manifest
18 index 36369ef5915d..015b9466d61b 100644
19 --- a/media-gfx/asymptote/Manifest
20 +++ b/media-gfx/asymptote/Manifest
21 @@ -1 +1,2 @@
22 DIST asymptote-2.70.src.tgz 4674495 BLAKE2B 126b2e99222e6ae438aaef89df00b8eae19118c3ef42d2fab0b0117f343911939e680d22e903b784213186a5d2eeeecb112afba1467562e7127c34de4bc66773 SHA512 24d60af361e3f0309a896ce8163da6fc0a9d6587efe726c5acf874dcb74f4d51b4bad8146a615ff54173ef06dac53117fd1cc09c77940271adc9f64cac6bcfe6
23 +DIST asymptote-2.74.src.tgz 12510904 BLAKE2B 8c899f44c8572594fc1526204cfb8f4c3d503dcbd32ebf713eb507ab03966eb335fff8d1b071b568d226588e8b99a6c494b14602d30d1f654cb68b52874ff12e SHA512 cc9a4e6f4ceca5ed356b8ec0dd2d21c23fe19d28492e42cb9cc020759886aedcac1f909c35f6759a1cc6b2f8a2fe6569cc9f5e4686da139188354551e21c183b
24
25 diff --git a/media-gfx/asymptote/asymptote-2.74.ebuild b/media-gfx/asymptote/asymptote-2.74.ebuild
26 new file mode 100644
27 index 000000000000..78ed3422c1b1
28 --- /dev/null
29 +++ b/media-gfx/asymptote/asymptote-2.74.ebuild
30 @@ -0,0 +1,242 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=7
35 +
36 +PYTHON_COMPAT=( python3_{7..9} )
37 +
38 +inherit autotools elisp-common latex-package python-r1
39 +
40 +DESCRIPTION="A vector graphics language that provides a framework for technical drawing"
41 +HOMEPAGE="https://asymptote.sourceforge.io/"
42 +SRC_URI="mirror://sourceforge/asymptote/${P}.src.tgz"
43 +
44 +LICENSE="GPL-3"
45 +SLOT="0"
46 +KEYWORDS="~amd64 ~ppc ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
47 +IUSE="+boehm-gc context curl doc emacs examples fftw gsl +imagemagick latex lsp offscreen +opengl python sigsegv svg test vim-syntax X"
48 +RESTRICT="!test? ( test )"
49 +
50 +REQUIRED_USE="
51 + ${PYTHON_REQUIRED_USE}
52 + offscreen? ( opengl )
53 + doc? ( boehm-gc )"
54 +
55 +RDEPEND="
56 + >=sys-libs/ncurses-5.4-r5:0=
57 + >=sys-libs/readline-4.3-r5:0=
58 + net-libs/libtirpc:=
59 + imagemagick? ( media-gfx/imagemagick[png] )
60 + opengl? ( media-libs/mesa[X(+)] media-libs/freeglut media-libs/glew:0 media-libs/glm )
61 + offscreen? ( media-libs/mesa[osmesa] )
62 + svg? ( app-text/dvisvgm )
63 + sigsegv? ( dev-libs/libsigsegv )
64 + boehm-gc? ( >=dev-libs/boehm-gc-7.0[cxx,threads] )
65 + fftw? ( >=sci-libs/fftw-3.0.1:= )
66 + gsl? ( sci-libs/gsl:= )
67 + python? ( ${PYTHON_DEPS} )
68 + curl? ( net-misc/curl )
69 + lsp? (
70 + dev-libs/boost
71 + dev-libs/rapidjson
72 + dev-libs/utfcpp
73 + )
74 + X? (
75 + ${PYTHON_DEPS}
76 + dev-python/PyQt5[${PYTHON_USEDEP},gui,widgets,svg]
77 + dev-python/numpy
78 + dev-python/pycson
79 + >=gnome-base/librsvg-2.40
80 + )
81 + latex? (
82 + virtual/latex-base
83 + >=dev-texlive/texlive-latexextra-2013
84 + )
85 + context? ( dev-texlive/texlive-context )
86 + emacs? ( >=app-editors/emacs-23.1:* )
87 + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
88 +DEPEND="${RDEPEND}
89 + dev-lang/perl
90 + doc? (
91 + media-gfx/imagemagick[png]
92 + virtual/texi2dvi
93 + virtual/latex-base
94 + app-text/ghostscript-gpl )
95 + test? ( app-text/ghostscript-gpl )"
96 +
97 +TEXMF=/usr/share/texmf-site
98 +
99 +PATCHES=(
100 + # Changing pdf, ps, image viewers to xdg-open
101 + "${FILESDIR}/${PN}-2.70-xdg-utils.patch"
102 +
103 + # Bug #322473
104 + "${FILESDIR}/${PN}-2.70-info.patch"
105 +)
106 +
107 +src_prepare() {
108 + sed -e "s:Datadir/doc/asymptote:Datadir/doc/${PF}:" \
109 + -i configure.ac \
110 + || die "sed configure.ac failed"
111 +
112 + default
113 + eautoreconf
114 +}
115 +
116 +src_configure() {
117 + # for the CPPFLAGS see
118 + # https://sourceforge.net/forum/forum.php?thread_id=1683277&forum_id=409349
119 + econf \
120 + CPPFLAGS=-DHAVE_SYS_TYPES_H \
121 + CFLAGS="${CXXFLAGS}" \
122 + --disable-gc-debug \
123 + --disable-gc-full-debug \
124 + --with-latex=/usr/share/texmf-site/tex/latex \
125 + --with-context=/usr/share/texmf-site/tex/context \
126 + $(use_enable boehm-gc gc system) \
127 + $(use_enable curl) \
128 + $(use_enable lsp) \
129 + $(use_enable fftw) \
130 + $(use_enable gsl) \
131 + $(use_enable opengl gl) \
132 + $(use_enable offscreen) \
133 + $(use_enable sigsegv)
134 +}
135 +
136 +src_compile() {
137 + default
138 +
139 + cd doc || die
140 + emake asy.1
141 + einfo "Making info"
142 + cd png || die
143 + emake ${PN}.info
144 + cd .. || die
145 + if use doc; then
146 + cd FAQ || die
147 + emake
148 + cd .. || die
149 + # pdf
150 + einfo "Making pdf docs"
151 + export VARTEXFONTS="${T}"/fonts
152 + # see bug #260606
153 + emake -j1 asymptote.pdf
154 + emake CAD.pdf asy-latex.pdf asyRefCard.pdf
155 + fi
156 + cd .. || die
157 +
158 + if use emacs; then
159 + einfo "Compiling emacs lisp files"
160 + elisp-compile base/*.el
161 + fi
162 +}
163 +
164 +src_install() {
165 + # the program
166 + dobin asy
167 +
168 + # .asy files
169 + insinto /usr/share/${PN}
170 + doins -r base/*.asy base/*.js base/*.sh base/*.ps base/shaders base/webgl
171 + chmod 755 "${D}"/usr/share/${PN}/shaders/*
172 +
173 + # documentation
174 + dodoc README ReleaseNotes ChangeLog
175 + cd doc || die
176 + doman asy.1
177 + doinfo png/${PN}.info
178 + if use doc; then
179 + dodoc FAQ/asy-faq.ascii
180 + dodoc CAD.pdf asy-latex.pdf asyRefCard.pdf asymptote.pdf
181 + fi
182 + cd .. || die
183 +
184 + # asymptote.py
185 + if use python; then
186 + python_moduleinto ${PN}
187 + python_foreach_impl python_domodule aspy.py
188 + python_foreach_impl python_domodule base/${PN}.py
189 + fi
190 +
191 + # X GUI
192 + if use X; then
193 + cd GUI || die
194 + python_setup
195 + sed -e 1d -i xasy.py
196 + echo "#!/usr/bin/env ${EPYTHON}" > xasy1
197 + cat xasy1 xasy.py > xasy
198 + rm xasy1 xasy.py
199 + mv xasy xasy.py
200 + cd .. || die
201 + python_domodule GUI
202 + chmod 755 "${D}/$(python_get_sitedir)/${PN}/GUI/xasy.py"
203 + dosym "$(python_get_sitedir)/${PN}/GUI/xasy.py" /usr/bin/xasy
204 + doman doc/xasy.1x
205 + fi
206 +
207 + # examples
208 + if use examples; then
209 + docinto examples
210 + dodoc \
211 + examples/*.asy \
212 + examples/*.views \
213 + examples/*.dat \
214 + examples/*.bib \
215 + examples/*.png \
216 + examples/*.pdb1 \
217 + doc/*.asy \
218 + doc/*.csv \
219 + doc/*.dat \
220 + doc/pixel.pdf \
221 + doc/extra/*.asy
222 + docinto examples/animations
223 + dodoc examples/animations/*.asy
224 + fi
225 +
226 + # LaTeX style
227 + if use latex; then
228 + cd doc || die
229 + insinto "${TEXMF}"/tex/latex/${PN}
230 + doins *.sty latexmkrc
231 + if use examples; then
232 + docinto examples
233 + dodoc latexusage.tex externalprc.tex
234 + docinto examples/animations
235 + dodoc ../examples/animations/*.tex
236 + fi
237 + cd .. || die
238 + fi
239 +
240 + # ConTeXt
241 + if use context; then
242 + insinto /usr/share/texmf-site/tex/context
243 + doins doc/colo-asy.tex
244 + fi
245 +
246 + # emacs mode
247 + if use emacs; then
248 + elisp-install ${PN} base/*.el base/*.elc asy-keywords.el
249 + elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
250 + fi
251 +
252 + # vim syntax
253 + if use vim-syntax; then
254 + insinto /usr/share/vim/vimfiles/syntax
255 + doins base/asy.vim
256 + insinto /usr/share/vim/vimfiles/ftdetect
257 + doins base/asy_filetype.vim
258 + fi
259 +}
260 +
261 +pkg_postinst() {
262 + use latex && latex-package_rehash
263 + use emacs && elisp-site-regen
264 +
265 + elog 'Use the variable ASYMPTOTE_PSVIEWER to set the postscript viewer'
266 + elog 'Use the variable ASYMPTOTE_PDFVIEWER to set the PDF viewer'
267 +}
268 +
269 +pkg_postrm() {
270 + use latex && latex-package_rehash
271 + use emacs && elisp-site-regen
272 +}
273
274 diff --git a/media-gfx/asymptote/metadata.xml b/media-gfx/asymptote/metadata.xml
275 index e9eec6f0fe79..ae70c43a3e24 100644
276 --- a/media-gfx/asymptote/metadata.xml
277 +++ b/media-gfx/asymptote/metadata.xml
278 @@ -22,6 +22,7 @@
279 <flag name="boehm-gc">Enables using the Boehm-Demers-Weiser conservative garbage collector</flag>
280 <flag name="context">Enables support for ConTeXt format (<pkg>dev-texlive/texlive-context</pkg>)</flag>
281 <flag name="curl">Enables running remote programs via <pkg>net-misc/curl</pkg></flag>
282 + <flag name="lsp">Enables Language Server Protocol</flag>
283 <flag name="sigsegv">Enables using <pkg>dev-libs/libsigsegv</pkg></flag>
284 <flag name="offscreen">Enables off-screen rendering</flag>
285 </use>