/[gentoo-x86]/media-gfx/asymptote/asymptote-2.21.ebuild
Gentoo

Contents of /media-gfx/asymptote/asymptote-2.21.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Oct 11 14:25:36 2012 UTC (22 months, 3 weeks ago) by grozin
Branch: MAIN
Version bump

(Portage version: 2.2.0_alpha136/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/asymptote/asymptote-2.19.ebuild,v 1.1 2012/09/26 13:20:17 grozin Exp $
4
5 EAPI=4
6 SUPPORT_PYTHON_ABIS=1
7 PYTHON_DEPEND="python? 2"
8 RESTRICT_PYTHON_ABIS="3.*"
9 inherit eutils autotools elisp-common latex-package multilib python
10
11 DESCRIPTION="A vector graphics language that provides a framework for technical drawing"
12 HOMEPAGE="http://asymptote.sourceforge.net/"
13 SRC_URI="mirror://sourceforge/asymptote/${P}.src.tgz"
14 LICENSE="GPL-3"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
17 IUSE="+boehm-gc doc emacs examples fftw gsl +imagemagick latex offscreen +opengl python sigsegv svg vim-syntax X"
18 REQUIRED_USE="offscreen? ( opengl )"
19
20 RDEPEND=">=sys-libs/readline-4.3-r5
21 >=sys-libs/ncurses-5.4-r5
22 imagemagick? ( media-gfx/imagemagick[png] )
23 opengl? ( >=media-libs/mesa-8 )
24 offscreen? ( media-libs/mesa[osmesa] )
25 svg? ( app-text/dvisvgm )
26 sigsegv? ( dev-libs/libsigsegv )
27 boehm-gc? ( >=dev-libs/boehm-gc-7.0[cxx,threads] )
28 fftw? ( >=sci-libs/fftw-3.0.1 )
29 gsl? ( sci-libs/gsl )
30 X? ( x11-misc/xdg-utils dev-lang/python dev-python/imaging[tk] )
31 latex? ( virtual/latex-base dev-texlive/texlive-latexextra )
32 emacs? ( virtual/emacs )
33 vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
34 DEPEND="${RDEPEND}
35 doc? ( dev-lang/perl virtual/texi2dvi virtual/latex-base media-gfx/imagemagick[png] )"
36
37 TEXMF=/usr/share/texmf-site
38
39 src_prepare() {
40 # Fixing sigsegv enabling
41 epatch "${FILESDIR}/${P}-configure-ac.patch"
42 einfo "Patching configure.ac"
43 sed -e "s:Datadir/doc/asymptote:Datadir/doc/${PF}:" \
44 -i configure.ac \
45 || die "sed configure.ac failed"
46
47 # Changing pdf, ps, image viewers to xdg-open
48 epatch "${FILESDIR}/${P}-xdg-utils.patch"
49
50 # Bug #322473
51 epatch "${FILESDIR}/${P}-info.patch"
52
53 eautoreconf
54 }
55
56 src_configure() {
57 # for the CPPFLAGS see
58 # http://sourceforge.net/forum/forum.php?thread_id=1683277&forum_id=409349
59 econf CPPFLAGS=-DHAVE_SYS_TYPES_H \
60 CFLAGS="${CXXFLAGS}" \
61 --disable-gc-debug \
62 $(use_enable boehm-gc gc system) \
63 $(use_enable fftw) \
64 $(use_enable gsl) \
65 $(use_enable opengl gl) \
66 $(use_enable offscreen) \
67 $(use_with sigsegv)
68 }
69
70 src_compile() {
71 emake
72
73 cd doc
74 emake asy.1
75 if use doc; then
76 # info
77 einfo "Making info"
78 emake ${PN}.info
79 cd FAQ
80 emake
81 cd ..
82 # pdf
83 einfo "Making pdf docs"
84 export VARTEXFONTS="${T}"/fonts
85 # see bug #260606
86 emake -j1 asymptote.pdf
87 emake CAD.pdf
88 fi
89 cd ..
90
91 if use emacs; then
92 einfo "Compiling emacs lisp files"
93 elisp-compile base/*.el
94 fi
95 }
96
97 src_install() {
98 # the program
99 exeinto /usr/bin
100 doexe asy
101
102 # .asy files
103 insinto /usr/share/${PN}
104 doins base/*.asy
105
106 # documentation
107 dodoc BUGS ChangeLog README ReleaseNotes TODO
108 doman doc/asy.1
109
110 # X GUI
111 if use X; then
112 exeinto /usr/share/${PN}/GUI
113 doexe GUI/xasy.py
114 rm GUI/xasy.py
115 insinto /usr/share/${PN}/GUI
116 doins GUI/*.py
117 dosym /usr/share/${PN}/GUI/xasy.py /usr/bin/xasy
118 doman doc/xasy.1x
119 fi
120
121 # examples
122 if use examples; then
123 insinto /usr/share/${PN}/examples
124 doins examples/*.asy \
125 examples/*.eps \
126 doc/*.asy \
127 doc/*.csv \
128 doc/*.dat \
129 doc/extra/*.asy
130 if use X; then
131 doins GUI/*.asy
132 fi
133 insinto /usr/share/${PN}/examples/animations
134 doins examples/animations/*.asy
135 fi
136
137 # LaTeX style
138 if use latex; then
139 cd doc
140 insinto "${TEXMF}"/tex/latex/${PN}
141 doins ${PN}.sty asycolors.sty
142 if use examples; then
143 insinto /usr/share/${PN}/examples
144 doins latexusage.tex
145 fi
146 cd ..
147 fi
148
149 # asymptote.py
150 if use python; then
151 python_install() {
152 insinto "$(python_get_sitedir)"
153 doins base/${PN}.py
154 }
155 python_execute_function python_install
156 fi
157
158 # emacs mode
159 if use emacs; then
160 elisp-install ${PN} base/*.el base/*.elc
161 elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
162 fi
163
164 # vim syntax
165 if use vim-syntax; then
166 insinto /usr/share/vim/vimfiles/syntax
167 doins base/asy.vim
168 insinto /usr/share/vim/vimfiles/ftdetect
169 doins "${FILESDIR}"/asy-ftd.vim
170 fi
171
172 # extra documentation
173 if use doc; then
174 cd doc
175 doinfo ${PN}.info*
176 cd FAQ
177 dodoc asy-faq.ascii
178 doinfo asy-faq.info
179 insinto /usr/share/doc/${PF}/html/FAQ
180 doins asy-faq.html/*
181 cd ..
182 insinto /usr/share/doc/${PF}
183 doins ${PN}.pdf CAD.pdf
184 fi
185 }
186
187 pkg_postinst() {
188 use python && python_mod_optimize ${PN}.py
189 use latex && latex-package_rehash
190 use emacs && elisp-site-regen
191
192 elog 'Use the variable ASYMPTOTE_PSVIEWER to set the postscript viewer'
193 elog 'Use the variable ASYMPTOTE_PDFVIEWER to set the PDF viewer'
194 }
195
196 pkg_postrm() {
197 use python && python_mod_cleanup ${PN}.py
198 use latex && latex-package_rehash
199 use emacs && elisp-site-regen
200 }

  ViewVC Help
Powered by ViewVC 1.1.20