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