/[gentoo-x86]/sci-visualization/gnuplot/gnuplot-4.4.4-r1.ebuild
Gentoo

Contents of /sci-visualization/gnuplot/gnuplot-4.4.4-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Dec 28 10:34:38 2011 UTC (2 years, 10 months ago) by ulm
Branch: MAIN
Fix tikz support, bug 396251, patch from upstream bug tracker.
Update ebuild to EAPI 4. Remove old.

(Portage version: 2.1.10.43/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-visualization/gnuplot/gnuplot-4.4.4.ebuild,v 1.1 2011/11/28 05:22:38 ottxor Exp $
4
5 EAPI=4
6
7 inherit elisp-common multilib wxwidgets
8
9 DESCRIPTION="Command-line driven interactive plotting program"
10 HOMEPAGE="http://www.gnuplot.info/"
11
12 if [[ -z ${PV%%*9999} ]]; then
13 inherit autotools cvs
14 ECVS_SERVER="gnuplot.cvs.sourceforge.net:/cvsroot/gnuplot"
15 ECVS_MODULE="gnuplot"
16 ECVS_BRANCH="branch-4-4-stable"
17 ECVS_USER="anonymous"
18 ECVS_CVS_OPTIONS="-dP"
19 MY_P="${PN}"
20 SRC_URI=""
21 else
22 MY_P="${P/_/-}"
23 SRC_URI="mirror://sourceforge/gnuplot/${MY_P}.tar.gz"
24 fi
25
26 LICENSE="gnuplot GPL-2"
27 SLOT="0"
28 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
29 IUSE="cairo doc emacs examples +gd ggi latex lua plotutils readline svga thin-splines wxwidgets X xemacs"
30
31 RDEPEND="
32 cairo? (
33 x11-libs/cairo
34 x11-libs/pango )
35 emacs? ( virtual/emacs )
36 gd? ( media-libs/gd[png] )
37 ggi? ( media-libs/libggi )
38 latex? (
39 virtual/latex-base
40 lua? (
41 dev-tex/pgf
42 >=dev-texlive/texlive-latexrecommended-2008-r2 ) )
43 lua? ( dev-lang/lua )
44 plotutils? ( media-libs/plotutils )
45 readline? ( sys-libs/readline )
46 svga? ( media-libs/svgalib )
47 wxwidgets? (
48 x11-libs/wxGTK:2.8[X]
49 x11-libs/cairo
50 x11-libs/pango
51 x11-libs/gtk+:2 )
52 X? ( x11-libs/libXaw )
53 xemacs? (
54 app-editors/xemacs
55 app-xemacs/xemacs-base )"
56 DEPEND="${RDEPEND}
57 dev-util/pkgconfig
58 doc? (
59 virtual/latex-base
60 dev-texlive/texlive-latexextra
61 app-text/ghostscript-gpl )
62 !emacs? ( xemacs? ( app-xemacs/texinfo ) )"
63
64 RESTRICT="wxwidgets? ( test )"
65
66 S="${WORKDIR}/${MY_P}"
67
68 GP_VERSION="${PV%.*}"
69 E_SITEFILE="50${PN}-gentoo.el"
70 TEXMF="${EPREFIX}/usr/share/texmf-site"
71
72 src_prepare() {
73 epatch "${FILESDIR}/${P}-tikz.patch"
74
75 if [[ -z ${PV%%*9999} ]]; then
76 local dir
77 for dir in config demo m4 term tutorial; do
78 emake -C "$dir" -f Makefile.am.in Makefile.am
79 done
80 eautoreconf
81 fi
82
83 # Add special version identification as required by provision 2
84 # of the gnuplot license
85 sed -i -e "1s/.*/& (Gentoo revision ${PR})/" PATCHLEVEL || die
86 }
87
88 src_configure() {
89 if ! use latex; then
90 sed -i -e '/SUBDIRS/s/LaTeX//' share/Makefile.in || die
91 fi
92
93 if use wxwidgets; then
94 WX_GTK_VER="2.8"
95 need-wxwidgets unicode
96 fi
97
98 local myconf
99 myconf="${myconf} --without-lisp-files"
100 myconf="${myconf} --without-pdf"
101 myconf="${myconf} --with-texdir=${TEXMF}/tex/latex/${PN}"
102 myconf="${myconf} $(use_with cairo)"
103 myconf="${myconf} $(use_with doc tutorial)"
104 myconf="${myconf} $(use_with gd)"
105 myconf="${myconf} $(use_with ggi ggi ${EPREFIX}/usr/$(get_libdir))"
106 myconf="${myconf} $(use_with ggi xmi ${EPREFIX}/usr/$(get_libdir))"
107 myconf="${myconf} $(use_with lua)"
108 myconf="${myconf} $(use_with plotutils plot "${EPREFIX}"/usr/$(get_libdir))"
109 myconf="${myconf} $(use_with svga linux-vga)"
110 myconf="${myconf} $(use_enable thin-splines)"
111 myconf="${myconf} $(use_enable wxwidgets)"
112 myconf="${myconf} $(use_with X x)"
113 use readline \
114 && myconf="${myconf} --with-readline=gnu" \
115 || myconf="${myconf} --with-readline=builtin"
116
117 econf ${myconf} \
118 DIST_CONTACT="http://bugs.gentoo.org/" \
119 EMACS=$(usev emacs || usev xemacs || echo no)
120
121 if use xemacs; then
122 einfo "Configuring gnuplot-mode for XEmacs ..."
123 use emacs && cp -Rp lisp lisp-xemacs || ln -s lisp lisp-xemacs
124 cd "${S}/lisp-xemacs"
125 econf --with-lispdir="${EPREFIX}/usr/lib/xemacs/site-packages/${PN}" EMACS=xemacs
126 fi
127
128 if use emacs; then
129 einfo "Configuring gnuplot-mode for GNU Emacs ..."
130 cd "${S}/lisp"
131 econf --with-lispdir="${EPREFIX}${SITELISP}/${PN}" EMACS=emacs
132 fi
133 }
134
135 src_compile() {
136 # Prevent access violations, see bug 201871
137 VARTEXFONTS="${T}/fonts"
138
139 # This is a hack to avoid sandbox violations when using the Linux console.
140 # Creating the DVI and PDF tutorials require /dev/svga to build the
141 # example plots.
142 addwrite /dev/svga:/dev/mouse:/dev/tts/0
143
144 emake all info
145
146 if use xemacs; then
147 cd "${S}/lisp-xemacs"
148 emake
149 fi
150
151 if use emacs; then
152 cd "${S}/lisp"
153 emake
154 fi
155
156 if use doc; then
157 # Avoid sandbox violation in epstopdf/ghostscript
158 addpredict /var/cache/fontconfig
159 cd "${S}/docs"
160 emake pdf
161 cd "${S}/tutorial"
162 emake pdf
163
164 if use emacs || use xemacs; then
165 cd "${S}/lisp"
166 emake pdf
167 fi
168 fi
169 }
170
171 src_install () {
172 emake DESTDIR="${D}" install
173
174 if use xemacs; then
175 cd "${S}/lisp-xemacs"
176 emake DESTDIR="${D}" install
177 fi
178
179 if use emacs; then
180 cd "${S}/lisp"
181 emake DESTDIR="${D}" install
182 # info-look* is included with >=emacs-21
183 rm -f "${ED}${SITELISP}/${PN}"/info-look*
184
185 # Gentoo emacs site-lisp configuration
186 echo "(add-to-list 'load-path \"@SITELISP@\")" > ${E_SITEFILE}
187 sed '/^;; move/,+3 d' dotemacs >> ${E_SITEFILE} || die
188 elisp-site-file-install ${E_SITEFILE} || die
189 fi
190
191 cd "${S}"
192 dodoc BUGS ChangeLog NEWS PGPKEYS PORTING README* TODO
193 newdoc term/PostScript/README README-ps
194 newdoc term/js/README README-js
195 use lua && newdoc term/lua/README README-lua
196
197 if use examples; then
198 # Demo files
199 insinto /usr/share/${PN}/${GP_VERSION}
200 doins -r demo
201 rm -f "${ED}"/usr/share/${PN}/${GP_VERSION}/demo/Makefile*
202 rm -f "${ED}"/usr/share/${PN}/${GP_VERSION}/demo/binary*
203 fi
204 if use doc; then
205 # Manual
206 dodoc docs/gnuplot.pdf
207 # Tutorial
208 dodoc tutorial/{tutorial.dvi,tutorial.pdf}
209 # FAQ
210 dodoc FAQ.pdf
211 # Documentation for making PostScript files
212 docinto psdoc
213 dodoc docs/psdoc/{*.doc,*.tex,*.ps,*.gpi,README}
214 fi
215
216 if use emacs || use xemacs; then
217 docinto emacs
218 dodoc lisp/ChangeLog lisp/README
219 use doc && dodoc lisp/gpelcard.pdf
220 fi
221 }
222
223 pkg_postinst() {
224 use emacs && elisp-site-regen
225 use latex && texmf-update
226
227 elog "Gnuplot no longer links against pdflib, see the ChangeLog for"
228 elog "details. You can use the \"pdfcairo\" terminal for PDF output."
229 use cairo || elog "It is available with USE=\"cairo\"."
230
231 if use svga; then
232 echo
233 elog "In order to enable ordinary users to use SVGA console graphics"
234 elog "gnuplot needs to be set up as setuid root. Please note that"
235 elog "this is usually considered to be a security hazard."
236 elog "As root, manually \"chmod u+s /usr/bin/gnuplot\"."
237 fi
238 if use gd; then
239 echo
240 elog "For font support in png/jpeg/gif output, you may have to"
241 elog "set the GDFONTPATH and GNUPLOT_DEFAULT_GDFONT environment"
242 elog "variables. See the FAQ file in /usr/share/doc/${PF}/"
243 elog "for more information."
244 fi
245 }
246
247 pkg_postrm() {
248 use emacs && elisp-site-regen
249 use latex && texmf-update
250 }

  ViewVC Help
Powered by ViewVC 1.1.20