1 |
commit: 24683424729435ce57c3292f69688e1f578e6350 |
2 |
Author: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 4 12:37:17 2019 +0000 |
4 |
Commit: Andrey Grozin <grozin <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 4 12:37:17 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24683424 |
7 |
|
8 |
media-gfx/asymptote: add missing dependences |
9 |
|
10 |
Closes: https://bugs.gentoo.org/show_bug.cgi?id=682434 |
11 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
12 |
Signed-off-by: Andrey Grozin <grozin <AT> gentoo.org> |
13 |
|
14 |
media-gfx/asymptote/asymptote-2.48-r1.ebuild | 214 +++++++++++++++++++++++++++ |
15 |
1 file changed, 214 insertions(+) |
16 |
|
17 |
diff --git a/media-gfx/asymptote/asymptote-2.48-r1.ebuild b/media-gfx/asymptote/asymptote-2.48-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..6a39f53426e |
20 |
--- /dev/null |
21 |
+++ b/media-gfx/asymptote/asymptote-2.48-r1.ebuild |
22 |
@@ -0,0 +1,214 @@ |
23 |
+# Copyright 1999-2019 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=6 |
27 |
+ |
28 |
+PYTHON_COMPAT=( python3_{5,6,7} ) |
29 |
+ |
30 |
+inherit autotools elisp-common latex-package multilib python-r1 |
31 |
+ |
32 |
+DESCRIPTION="A vector graphics language that provides a framework for technical drawing" |
33 |
+HOMEPAGE="http://asymptote.sourceforge.net/" |
34 |
+SRC_URI="mirror://sourceforge/asymptote/${P}.src.tgz" |
35 |
+ |
36 |
+LICENSE="GPL-3" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
39 |
+IUSE="+boehm-gc doc emacs examples fftw gsl +imagemagick latex offscreen +opengl python sigsegv svg test vim-syntax X" |
40 |
+ |
41 |
+REQUIRED_USE=" |
42 |
+ ${PYTHON_REQUIRED_USE} |
43 |
+ offscreen? ( opengl ) |
44 |
+ doc? ( boehm-gc )" |
45 |
+ |
46 |
+RDEPEND=" |
47 |
+ >=sys-libs/ncurses-5.4-r5:0= |
48 |
+ >=sys-libs/readline-4.3-r5:0= |
49 |
+ imagemagick? ( media-gfx/imagemagick[png] ) |
50 |
+ opengl? ( media-libs/mesa media-libs/freeglut media-libs/glew:0 media-libs/glm ) |
51 |
+ offscreen? ( media-libs/mesa[osmesa] ) |
52 |
+ svg? ( app-text/dvisvgm ) |
53 |
+ sigsegv? ( dev-libs/libsigsegv ) |
54 |
+ boehm-gc? ( >=dev-libs/boehm-gc-7.0[cxx,threads] ) |
55 |
+ fftw? ( >=sci-libs/fftw-3.0.1 ) |
56 |
+ gsl? ( sci-libs/gsl ) |
57 |
+ python? ( ${PYTHON_DEPS} ) |
58 |
+ X? ( |
59 |
+ ${PYTHON_DEPS} |
60 |
+ dev-python/PyQt5[${PYTHON_USEDEP},gui,widgets,svg] |
61 |
+ dev-python/numpy |
62 |
+ dev-python/pycson |
63 |
+ >=gnome-base/librsvg-2.40 |
64 |
+ ) |
65 |
+ latex? ( |
66 |
+ virtual/latex-base |
67 |
+ >=dev-texlive/texlive-latexextra-2013 |
68 |
+ ) |
69 |
+ emacs? ( virtual/emacs ) |
70 |
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )" |
71 |
+DEPEND="${RDEPEND} |
72 |
+ doc? ( |
73 |
+ dev-lang/perl |
74 |
+ media-gfx/imagemagick[png] |
75 |
+ virtual/texi2dvi |
76 |
+ virtual/latex-base |
77 |
+ app-text/ghostscript-gpl ) |
78 |
+ test? ( app-text/ghostscript-gpl )" |
79 |
+ |
80 |
+TEXMF=/usr/share/texmf-site |
81 |
+ |
82 |
+PATCHES=( |
83 |
+ # gc.h -> gc/gc.h |
84 |
+ "${FILESDIR}/${P}-configure-ac.patch" |
85 |
+ |
86 |
+ # Changing pdf, ps, image viewers to xdg-open |
87 |
+ "${FILESDIR}/${P}-xdg-utils.patch" |
88 |
+ |
89 |
+ # Bug #322473 |
90 |
+ "${FILESDIR}/${P}-info.patch" |
91 |
+) |
92 |
+ |
93 |
+src_prepare() { |
94 |
+ sed -e "s:Datadir/doc/asymptote:Datadir/doc/${PF}:" \ |
95 |
+ -i configure.ac \ |
96 |
+ || die "sed configure.ac failed" |
97 |
+ |
98 |
+ default |
99 |
+ eautoreconf |
100 |
+} |
101 |
+ |
102 |
+src_configure() { |
103 |
+ # for the CPPFLAGS see |
104 |
+ # https://sourceforge.net/forum/forum.php?thread_id=1683277&forum_id=409349 |
105 |
+ econf \ |
106 |
+ CPPFLAGS=-DHAVE_SYS_TYPES_H \ |
107 |
+ CFLAGS="${CXXFLAGS}" \ |
108 |
+ --disable-gc-debug \ |
109 |
+ $(use_enable boehm-gc gc system) \ |
110 |
+ $(use_enable fftw) \ |
111 |
+ $(use_enable gsl) \ |
112 |
+ $(use_enable opengl gl) \ |
113 |
+ $(use_enable offscreen) \ |
114 |
+ $(use_enable sigsegv) |
115 |
+} |
116 |
+ |
117 |
+src_compile() { |
118 |
+ default |
119 |
+ |
120 |
+ cd doc || die |
121 |
+ emake asy.1 |
122 |
+ if use doc; then |
123 |
+ # info |
124 |
+ einfo "Making info" |
125 |
+ emake ${PN}.info |
126 |
+ cd FAQ || die |
127 |
+ emake |
128 |
+ cd .. || die |
129 |
+ # pdf |
130 |
+ einfo "Making pdf docs" |
131 |
+ export VARTEXFONTS="${T}"/fonts |
132 |
+ # see bug #260606 |
133 |
+ emake -j1 asymptote.pdf |
134 |
+ emake CAD.pdf |
135 |
+ fi |
136 |
+ cd .. || die |
137 |
+ |
138 |
+ if use emacs; then |
139 |
+ einfo "Compiling emacs lisp files" |
140 |
+ elisp-compile base/*.el |
141 |
+ fi |
142 |
+} |
143 |
+ |
144 |
+src_install() { |
145 |
+ # the program |
146 |
+ dobin asy |
147 |
+ |
148 |
+ # .asy files |
149 |
+ insinto /usr/share/${PN} |
150 |
+ doins base/*.asy |
151 |
+ |
152 |
+ # documentation |
153 |
+ dodoc BUGS ChangeLog README ReleaseNotes TODO |
154 |
+ doman doc/asy.1 |
155 |
+ |
156 |
+ # X GUI |
157 |
+ if use X; then |
158 |
+ insinto /usr/share/${PN} |
159 |
+ doins -r GUI |
160 |
+ chmod +x "${D}"usr/share/${PN}/GUI/xasy.py |
161 |
+ dosym /usr/share/${PN}/GUI/xasy.py /usr/bin/xasy |
162 |
+ doman doc/xasy.1x |
163 |
+ fi |
164 |
+ |
165 |
+ # examples |
166 |
+ if use examples; then |
167 |
+ insinto /usr/share/${PN}/examples |
168 |
+ doins \ |
169 |
+ examples/*.asy \ |
170 |
+ examples/*.eps \ |
171 |
+ doc/*.asy \ |
172 |
+ doc/*.csv \ |
173 |
+ doc/*.dat \ |
174 |
+ doc/extra/*.asy |
175 |
+ insinto /usr/share/${PN}/examples/animations |
176 |
+ doins examples/animations/*.asy |
177 |
+ fi |
178 |
+ |
179 |
+ # LaTeX style |
180 |
+ if use latex; then |
181 |
+ cd doc || die |
182 |
+ insinto "${TEXMF}"/tex/latex/${PN} |
183 |
+ doins ${PN}.sty asycolors.sty |
184 |
+ if use examples; then |
185 |
+ insinto /usr/share/${PN}/examples |
186 |
+ doins latexusage.tex |
187 |
+ fi |
188 |
+ cd .. || die |
189 |
+ fi |
190 |
+ |
191 |
+ # asymptote.py |
192 |
+ if use python; then |
193 |
+ python_foreach_impl python_domodule base/${PN}.py |
194 |
+ fi |
195 |
+ |
196 |
+ # emacs mode |
197 |
+ if use emacs; then |
198 |
+ elisp-install ${PN} base/*.el base/*.elc |
199 |
+ elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el |
200 |
+ fi |
201 |
+ |
202 |
+ # vim syntax |
203 |
+ if use vim-syntax; then |
204 |
+ insinto /usr/share/vim/vimfiles/syntax |
205 |
+ doins base/asy.vim |
206 |
+ insinto /usr/share/vim/vimfiles/ftdetect |
207 |
+ doins "${FILESDIR}"/asy-ftd.vim |
208 |
+ fi |
209 |
+ |
210 |
+ # extra documentation |
211 |
+ if use doc; then |
212 |
+ cd doc || die |
213 |
+ doinfo ${PN}.info* |
214 |
+ cd FAQ || die |
215 |
+ dodoc asy-faq.ascii |
216 |
+ doinfo asy-faq.info |
217 |
+ insinto /usr/share/doc/${PF}/html/FAQ |
218 |
+ doins asy-faq.html/* |
219 |
+ cd .. || die |
220 |
+ insinto /usr/share/doc/${PF} |
221 |
+ doins ${PN}.pdf CAD.pdf |
222 |
+ fi |
223 |
+} |
224 |
+ |
225 |
+pkg_postinst() { |
226 |
+ use latex && latex-package_rehash |
227 |
+ use emacs && elisp-site-regen |
228 |
+ |
229 |
+ elog 'Use the variable ASYMPTOTE_PSVIEWER to set the postscript viewer' |
230 |
+ elog 'Use the variable ASYMPTOTE_PDFVIEWER to set the PDF viewer' |
231 |
+} |
232 |
+ |
233 |
+pkg_postrm() { |
234 |
+ use latex && latex-package_rehash |
235 |
+ use emacs && elisp-site-regen |
236 |
+} |