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, 28 Jun 2017 08:46:56
Message-Id: 1498639564.59ccf69f735ee24b8f705d70c727fdb2ad08f50f.grozin@gentoo
1 commit: 59ccf69f735ee24b8f705d70c727fdb2ad08f50f
2 Author: Andrey Grozin <grozin <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 28 08:46:04 2017 +0000
4 Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 28 08:46:04 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59ccf69f
7
8 media-gfx/asymptote: bump to 2.41
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 media-gfx/asymptote/Manifest | 1 +
13 media-gfx/asymptote/asymptote-2.41.ebuild | 210 +++++++++++++++++++++
14 .../files/asymptote-2.41-configure-ac.patch | 13 ++
15 .../asymptote/files/asymptote-2.41-info.patch | 13 ++
16 .../asymptote/files/asymptote-2.41-xdg-utils.patch | 23 +++
17 5 files changed, 260 insertions(+)
18
19 diff --git a/media-gfx/asymptote/Manifest b/media-gfx/asymptote/Manifest
20 index 89b035d8ea8..c87ab5087f6 100644
21 --- a/media-gfx/asymptote/Manifest
22 +++ b/media-gfx/asymptote/Manifest
23 @@ -1,3 +1,4 @@
24 DIST asymptote-2.32.src.tgz 1794495 SHA256 2035035e02774598312d5588da2685d20fb85a378ea2bbe48b825c5442b18fa5 SHA512 a0663f1768cb4340bb6e9224d4fbc6e2f8b41501b1f59793d84db2e0f99b9ff071d3dd8fa5c4715c1874f8ef1af713a54b27de37ff40d8ca042f0f48579a57f9 WHIRLPOOL 38a8aaa581acb07bcc7ac0c802222501acf77abaf609d5ae758d9b5668ac6b8b1343640259cc3948e62a39862404709ddb64b4bbd11bcf20dbb7ce29d4fc25d1
25 DIST asymptote-2.36.src.tgz 3449528 SHA256 cd3276cba498965f8c9e6c56b157d2f22304b0453d175bd9017b4c62b3fd1750 SHA512 18b079829f90561f88ebde0391f5d842d89ea28bf7b00306b908faeeca21b421127423af3a335bab9afa22036b3d93611702a579513d8a458be2f8cdd542222f WHIRLPOOL 532b221d619c8af077e0ef4cda960e6bc1b2c2eab263cfa1eb729df5928f7ae1d9e05459efee18a5a4fa4464b0b3aacd7f5ab42076e8af4e1fc3745f75dd9b6c
26 DIST asymptote-2.38.src.tgz 3460789 SHA256 e9c6dbb3fed27cbaf9ba01fd2264f0cff51781466acb29e76418bed801debcb7 SHA512 c54974a0476a33112c7913cfd8962e80a5ff10bc11f65b59a2bc0641f3c2fcfe69ba4592d84b33078d85c43fab7261670195766eca6419f6fd4923fd1ace6904 WHIRLPOOL f1d0a31fe25046c072a4963f64c92f718d980712f46637db65a5664c0a94c1eba162902c9ec4e787685f2250158ecffa9e834564ecbd69c6e3b948c5ad7d7a24
27 +DIST asymptote-2.41.src.tgz 3516426 SHA256 1d6e7e89fb5293fad7d836fb0477f785a113f689bd71f37a05af18ff0c5eeef0 SHA512 93f737a44b085c2290c4553c765cf49679820e6623bc5b6d0229818409868876275d6f0571abeb76033955fa95ee594e37d10c9901c54755b085e36760fd96cb WHIRLPOOL e75a6a2b4e29c3388f221b86958b6564edb14a46dad014acdc81554e1f0ac6b889c757f5a0626af6fb46783bf02393f73e92d2209080a31d665bc23550714a39
28
29 diff --git a/media-gfx/asymptote/asymptote-2.41.ebuild b/media-gfx/asymptote/asymptote-2.41.ebuild
30 new file mode 100644
31 index 00000000000..f48cbea6178
32 --- /dev/null
33 +++ b/media-gfx/asymptote/asymptote-2.41.ebuild
34 @@ -0,0 +1,210 @@
35 +# Copyright 1999-2017 Gentoo Foundation
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=5
39 +
40 +PYTHON_COMPAT=( python2_7 )
41 +
42 +inherit autotools elisp-common eutils latex-package multilib python-single-r1
43 +
44 +DESCRIPTION="A vector graphics language that provides a framework for technical drawing"
45 +HOMEPAGE="http://asymptote.sourceforge.net/"
46 +SRC_URI="mirror://sourceforge/asymptote/${P}.src.tgz"
47 +
48 +LICENSE="GPL-3"
49 +SLOT="0"
50 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
51 +IUSE="+boehm-gc doc emacs examples fftw gsl +imagemagick latex offscreen +opengl python sigsegv svg vim-syntax X"
52 +
53 +REQUIRED_USE="
54 + ${PYTHON_REQUIRED_USE}
55 + offscreen? ( opengl )"
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-8 )
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 + x11-misc/xdg-utils
72 + dev-python/pillow[tk,${PYTHON_USEDEP}]
73 + )
74 + latex? (
75 + virtual/latex-base
76 + >=dev-texlive/texlive-latexextra-2013
77 + )
78 + emacs? ( virtual/emacs )
79 + vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
80 +DEPEND="${RDEPEND}
81 + doc? (
82 + dev-lang/perl
83 + media-gfx/imagemagick[png]
84 + virtual/texi2dvi
85 + virtual/latex-base
86 + )"
87 +
88 +TEXMF=/usr/share/texmf-site
89 +
90 +pkg_setup() {
91 + (use python || use X) && python-single-r1_pkg_setup
92 +}
93 +
94 +src_prepare() {
95 + # gc.h -> gc/gc.h
96 + epatch "${FILESDIR}/${P}-configure-ac.patch"
97 +
98 + sed -e "s:Datadir/doc/asymptote:Datadir/doc/${PF}:" \
99 + -i configure.ac \
100 + || die "sed configure.ac failed"
101 +
102 + # Changing pdf, ps, image viewers to xdg-open
103 + epatch "${FILESDIR}/${P}-xdg-utils.patch"
104 +
105 + # Bug #322473
106 + epatch "${FILESDIR}/${P}-info.patch"
107 +
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 + python_scriptinto /usr/share/${PN}/GUI
168 + python_doscript GUI/*.py
169 + dosym /usr/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 + examples/*.eps \
179 + doc/*.asy \
180 + doc/*.csv \
181 + doc/*.dat \
182 + doc/extra/*.asy
183 + use X && doins GUI/*.asy
184 +
185 + insinto /usr/share/${PN}/examples/animations
186 + doins examples/animations/*.asy
187 + fi
188 +
189 + # LaTeX style
190 + if use latex; then
191 + cd doc || die
192 + insinto "${TEXMF}"/tex/latex/${PN}
193 + doins ${PN}.sty asycolors.sty
194 + if use examples; then
195 + insinto /usr/share/${PN}/examples
196 + doins latexusage.tex
197 + fi
198 + cd .. || die
199 + fi
200 +
201 + # asymptote.py
202 + use python && python_domodule base/${PN}.py
203 +
204 + # emacs mode
205 + if use emacs; then
206 + elisp-install ${PN} base/*.el base/*.elc
207 + elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
208 + fi
209 +
210 + # vim syntax
211 + if use vim-syntax; then
212 + insinto /usr/share/vim/vimfiles/syntax
213 + doins base/asy.vim
214 + insinto /usr/share/vim/vimfiles/ftdetect
215 + doins "${FILESDIR}"/asy-ftd.vim
216 + fi
217 +
218 + # extra documentation
219 + if use doc; then
220 + cd doc || die
221 + doinfo ${PN}.info*
222 + cd FAQ || die
223 + dodoc asy-faq.ascii
224 + doinfo asy-faq.info
225 + insinto /usr/share/doc/${PF}/html/FAQ
226 + doins asy-faq.html/*
227 + cd .. || die
228 + insinto /usr/share/doc/${PF}
229 + doins ${PN}.pdf CAD.pdf
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.41-configure-ac.patch b/media-gfx/asymptote/files/asymptote-2.41-configure-ac.patch
247 new file mode 100644
248 index 00000000000..984ec7c2e95
249 --- /dev/null
250 +++ b/media-gfx/asymptote/files/asymptote-2.41-configure-ac.patch
251 @@ -0,0 +1,13 @@
252 +Index: asymptote-2.41/configure.ac
253 +===================================================================
254 +--- asymptote-2.41.orig/configure.ac
255 ++++ asymptote-2.41/configure.ac
256 +@@ -159,7 +159,7 @@ if test "x$ac_cv_use_gc" != "xno" ; then
257 + fi
258 + CPPFLAGS_SAVE=$CPPFLAGS
259 + CPPFLAGS=$CPPFLAGS" $INCL"
260 +- AC_CHECK_HEADER(gc.h,
261 ++ AC_CHECK_HEADER([gc/gc.h],
262 + AC_CHECK_LIB([gc],[GC_malloc],[
263 + LIBS=$LIBS"-lgc "
264 + AC_MSG_NOTICE([enabling system $GCNAME])],[
265
266 diff --git a/media-gfx/asymptote/files/asymptote-2.41-info.patch b/media-gfx/asymptote/files/asymptote-2.41-info.patch
267 new file mode 100644
268 index 00000000000..f1dc4309aa8
269 --- /dev/null
270 +++ b/media-gfx/asymptote/files/asymptote-2.41-info.patch
271 @@ -0,0 +1,13 @@
272 +Index: asymptote-2.41/doc/asymptote.texi
273 +===================================================================
274 +--- asymptote-2.41.orig/doc/asymptote.texi
275 ++++ asymptote-2.41/doc/asymptote.texi
276 +@@ -21,7 +21,7 @@ file LICENSE in the top-level source dir
277 +
278 + @dircategory Languages
279 + @direntry
280 +-* asymptote: (asymptote/asymptote). Vector graphics language.
281 ++* asymptote: (asymptote). Vector graphics language.
282 + @end direntry
283 +
284 + @titlepage
285
286 diff --git a/media-gfx/asymptote/files/asymptote-2.41-xdg-utils.patch b/media-gfx/asymptote/files/asymptote-2.41-xdg-utils.patch
287 new file mode 100644
288 index 00000000000..7f9b3344035
289 --- /dev/null
290 +++ b/media-gfx/asymptote/files/asymptote-2.41-xdg-utils.patch
291 @@ -0,0 +1,23 @@
292 +Index: asymptote-2.41/settings.cc
293 +===================================================================
294 +--- asymptote-2.41.orig/settings.cc
295 ++++ asymptote-2.41/settings.cc
296 +@@ -91,15 +91,15 @@ bool msdos=false;
297 + string HOME="HOME";
298 + string docdir=ASYMPTOTE_DOCDIR;
299 + const char pathSeparator=':';
300 +-string defaultPSViewer="gv";
301 ++string defaultPSViewer="xdg-open";
302 + #ifdef __APPLE__
303 + string defaultPDFViewer="open";
304 + #else
305 +-string defaultPDFViewer="acroread";
306 ++string defaultPDFViewer="xdg-open";
307 + #endif
308 + string defaultGhostscript="gs";
309 + string defaultGhostscriptLibrary="/usr/lib/libgs.so";
310 +-string defaultDisplay="display";
311 ++string defaultDisplay="xdg-open";
312 + string defaultAnimate="animate";
313 + void queryRegistry() {}
314 + const string dirsep="/";