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