Gentoo Archives: gentoo-commits

From: "Andrey Grozin (grozin)" <grozin@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-gfx/asymptote: ChangeLog metadata.xml asymptote-1.43-r1.ebuild
Date: Tue, 07 Oct 2008 06:14:56
Message-Id: E1Kn5qQ-0005wr-GV@stork.gentoo.org
1 grozin 08/10/07 06:14:54
2
3 Modified: ChangeLog metadata.xml
4 Added: asymptote-1.43-r1.ebuild
5 Log:
6 Dependencies corrected, less documentation is produced with USE=-doc. Closing bugs #238108, #238121, #239063.
7 (Portage version: 2.2_rc11/cvs/Linux 2.6.25-tuxonice-r1 i686)
8
9 Revision Changes Path
10 1.21 media-gfx/asymptote/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-gfx/asymptote/ChangeLog?rev=1.21&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-gfx/asymptote/ChangeLog?rev=1.21&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-gfx/asymptote/ChangeLog?r1=1.20&r2=1.21
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/media-gfx/asymptote/ChangeLog,v
19 retrieving revision 1.20
20 retrieving revision 1.21
21 diff -u -r1.20 -r1.21
22 --- ChangeLog 4 Sep 2008 07:52:46 -0000 1.20
23 +++ ChangeLog 7 Oct 2008 06:14:53 -0000 1.21
24 @@ -1,6 +1,13 @@
25 # ChangeLog for media-gfx/asymptote
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/asymptote/ChangeLog,v 1.20 2008/09/04 07:52:46 opfer Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/asymptote/ChangeLog,v 1.21 2008/10/07 06:14:53 grozin Exp $
29 +
30 +*asymptote-1.43-r1 (07 Oct 2008)
31 +
32 + 07 Oct 2008; Andrey Grozin <grozin@g.o>
33 + +files/asymptote-1.43-r1-configure-ac.patch, +asymptote-1.43-r1.ebuild:
34 + Dependencies corrected, less documentation is produced with USE=-doc.
35 + Closing bugs #238108, #238121, #239063.
36
37 04 Sep 2008; Christian Faulhammer <opfer@g.o>
38 asymptote-1.29.ebuild, asymptote-1.41.ebuild:
39
40
41
42 1.5 media-gfx/asymptote/metadata.xml
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-gfx/asymptote/metadata.xml?rev=1.5&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-gfx/asymptote/metadata.xml?rev=1.5&content-type=text/plain
46 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-gfx/asymptote/metadata.xml?r1=1.4&r2=1.5
47
48 Index: metadata.xml
49 ===================================================================
50 RCS file: /var/cvsroot/gentoo-x86/media-gfx/asymptote/metadata.xml,v
51 retrieving revision 1.4
52 retrieving revision 1.5
53 diff -u -r1.4 -r1.5
54 --- metadata.xml 22 Aug 2008 21:13:27 -0000 1.4
55 +++ metadata.xml 7 Oct 2008 06:14:53 -0000 1.5
56 @@ -19,5 +19,8 @@
57 <flag name='boehm-gc'>
58 Enables using the Boehm-Demers-Weiser conservative garbage collector
59 </flag>
60 + <flag name='sigsegv'>
61 + Enables using <pkg>dev-libs/libsigsegv</pkg>
62 + </flag>
63 </use>
64 </pkgmetadata>
65
66
67
68 1.1 media-gfx/asymptote/asymptote-1.43-r1.ebuild
69
70 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-gfx/asymptote/asymptote-1.43-r1.ebuild?rev=1.1&view=markup
71 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-gfx/asymptote/asymptote-1.43-r1.ebuild?rev=1.1&content-type=text/plain
72
73 Index: asymptote-1.43-r1.ebuild
74 ===================================================================
75 # Copyright 1999-2008 Gentoo Foundation
76 # Distributed under the terms of the GNU General Public License v2
77 # $Header: /var/cvsroot/gentoo-x86/media-gfx/asymptote/asymptote-1.43-r1.ebuild,v 1.1 2008/10/07 06:14:53 grozin Exp $
78 EAPI=2
79 inherit eutils autotools elisp-common latex-package multilib python
80
81 DESCRIPTION="A vector graphics language that provides a framework for technical drawing"
82 HOMEPAGE="http://asymptote.sourceforge.net/"
83 SRC_URI="mirror://sourceforge/asymptote/${P}.src.tgz"
84 LICENSE="GPL-2"
85
86 SLOT="0"
87 KEYWORDS="~amd64 ~x86"
88
89 IUSE="+boehm-gc doc emacs examples fftw gsl +imagemagick latex python sigsegv vim-syntax X"
90
91 RDEPEND=">=sys-libs/readline-4.3-r5
92 >=sys-libs/ncurses-5.4-r5
93 imagemagick? ( media-gfx/imagemagick[png] )
94 sigsegv? ( dev-libs/libsigsegv )
95 boehm-gc? ( >=dev-libs/boehm-gc-7.0[-nocxx] )
96 fftw? ( >=sci-libs/fftw-3.0.1 )
97 gsl? ( sci-libs/gsl )
98 X? ( x11-misc/xdg-utils dev-lang/python dev-python/imaging[tk] )
99 python? ( dev-lang/python )
100 latex? ( virtual/latex-base )
101 emacs? ( virtual/emacs )
102 vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
103 DEPEND="${RDEPEND}
104 doc? ( dev-lang/perl virtual/texi2dvi virtual/latex-base media-gfx/imagemagick[png] )"
105
106 pkg_setup() {
107 if use latex; then
108 # Calculating ASY_TEXMFDIR
109 local TEXMFPATH="$(kpsewhich -var-value=TEXMFSITE)"
110 local TEXMFCONFIGFILE="$(kpsewhich texmf.cnf)"
111
112 if [ -z "${TEXMFPATH}" ]; then
113 eerror "You haven't defined the TEXMFSITE variable in your TeX config."
114 eerror "Please do so in the file ${TEXMFCONFIGFILE:-/var/lib/texmf/web2c/texmf.cnf}"
115 die "Define TEXMFSITE in TeX configuration!"
116 else
117 # go through the colon separated list of directories
118 # (maybe only one) provided in the variable
119 # TEXMFPATH (generated from TEXMFSITE from TeX's config)
120 # and choose only the first entry.
121 # All entries are separated by colons, even when defined
122 # with semi-colons, kpsewhich changes
123 # the output to a generic format, so IFS has to be redefined.
124 local IFS="${IFS}:"
125
126 for strippedpath in ${TEXMFPATH}; do
127 if [ -d ${strippedpath} ]; then
128 ASY_TEXMFDIR="${strippedpath}"
129 break
130 fi
131 done
132
133 # verify if an existing path was chosen to prevent from
134 # installing into the wrong directory
135 if [ -z ${ASY_TEXMFDIR} ]; then
136 eerror "TEXMFSITE does not contain any existing directory."
137 eerror "Please define an existing directory in your TeX config file"
138 eerror "${TEXMFCONFIGFILE:-/var/lib/texmf/web2c/texmf.cnf} or create at least one of the there specified directories"
139 die "TEXMFSITE variable did not contain an existing directory"
140 fi
141 fi
142 fi
143 }
144
145 src_prepare() {
146 # Fixing fftwl, gsl, sigsegv enabling
147 epatch "${FILESDIR}/${PF}-configure-ac.patch"
148 einfo "Patching configure.ac"
149 sed -e "s:Datadir/doc/asymptote:Datadir/doc/${PF}:" \
150 -i configure.ac \
151 || die "sed configure.ac failed"
152
153 # Changing pdf, ps, image viewers to xdg-open
154 epatch "${FILESDIR}/${P}-xdg-utils.patch"
155
156 eautoreconf
157 }
158
159 src_configure() {
160 # for the CPPFLAGS see
161 # http://sourceforge.net/forum/forum.php?thread_id=1683277&forum_id=409349
162 econf CPPFLAGS=-DHAVE_SYS_TYPES_H \
163 --disable-gc-debug \
164 $(use_enable boehm-gc gc system) \
165 $(use_with fftw) \
166 $(use_with gsl) \
167 $(use_with sigsegv)
168 }
169
170 src_compile() {
171 emake || die "emake failed"
172
173 cd doc
174 emake asy.1 || die "emake asy.1 failed"
175 if use doc; then
176 # info
177 einfo "Making info"
178 emake ${PN}.info || die "emake ${PN}.info failed"
179 # html
180 einfo "Making html docs"
181 emake ${PN}/index.html
182 einfo "Making FAQ"
183 cd FAQ
184 emake
185 cd ..
186 # pdf
187 einfo "Making pdf docs"
188 export VARTEXFONTS="${T}"/fonts
189 emake asymptote.pdf
190 emake CAD.pdf
191 fi
192 cd ..
193
194 if use emacs; then
195 einfo "Compiling emacs lisp files"
196 elisp-compile base/*.el || die "elisp-compile failed"
197 fi
198 }
199
200 src_install() {
201 # the program
202 exeinto /usr/bin
203 doexe asy
204
205 # .asy files
206 insinto /usr/share/${PN}
207 doins base/*.asy
208
209 # documentation
210 dodoc BUGS ChangeLog README ReleaseNotes TODO
211 doman doc/asy.1
212
213 # X GUI
214 if use X; then
215 insinto /usr/share/${PN}/GUI
216 doins GUI/*.py
217 dosym /usr/share/${PN}/GUI/xasy.py /usr/bin/xasy
218 doman doc/xasy.1x
219 fi
220
221 # examples
222 if use examples; then
223 insinto /usr/share/${PN}/examples
224 doins examples/*.asy \
225 examples/*.eps \
226 doc/*.asy \
227 doc/*.csv \
228 doc/*.dat \
229 doc/extra/*.asy
230 insinto /usr/share/${PN}/examples/animations
231 doins examples/animations/*.asy
232 fi
233
234 # LaTeX style
235 if use latex; then
236 cd doc
237 insinto "${ASY_TEXMFDIR}"/tex/latex
238 doins ${PN}.sty asycolors.sty
239 if use examples; then
240 insinto /usr/share/${PN}/examples
241 doins latexusage.tex
242 fi
243 cd ..
244 fi
245
246 # asymptote.py
247 if use python; then
248 python_version
249 insinto /usr/$(get_libdir)/python${PYVER}/site-packages
250 doins base/${PN}.py
251 fi
252
253 # emacs mode
254 if use emacs; then
255 elisp-install ${PN} base/*.el base/*.elc
256 elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
257 fi
258
259 # vim syntax
260 if use vim-syntax; then
261 insinto /usr/share/vim/vimfiles/syntax
262 doins base/asy.vim
263 insinto /usr/share/vim/vimfiles/ftdetect
264 doins "${FILESDIR}"/asy-ftd.vim
265 fi
266
267 # extra documentation
268 if use doc; then
269 cd doc
270 doinfo ${PN}.info*
271 dohtml ${PN}/*
272 cd FAQ
273 dodoc asy-faq.ascii
274 doinfo asy-faq.info
275 insinto /usr/share/doc/${PF}/html/FAQ
276 doins asy-faq.html/*
277 cd ..
278 insinto /usr/share/doc/${PF}
279 doins ${PN}.pdf CAD.pdf
280 fi
281 }
282
283 pkg_postinst() {
284 if use python; then
285 python_version
286 python_mod_compile \
287 /usr/$(get_libdir)/python${PYVER}/site-packages/${PN}.py
288 fi
289
290 use latex && latex-package_rehash
291
292 use emacs && elisp-site-regen
293
294 elog 'Use the variable ASYMPTOTE_PSVIEWER to set the postscript viewer'
295 elog 'Use the variable ASYMPTOTE_PDFVIEWER to set the PDF viewer'
296 }
297
298 pkg_postrm() {
299 use latex && latex-package_rehash
300 use emacs && elisp-site-regen
301 use python && python_mod_cleanup
302 }