Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-visualization/gnuplot/, sci-visualization/gnuplot/files/
Date: Sat, 24 Oct 2015 10:40:10
Message-Id: 1445683189.3dd650209ec5171800181837c16cd4ec884968f8.pacho@gentoo
1 commit: 3dd650209ec5171800181837c16cd4ec884968f8
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 24 10:39:49 2015 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 24 10:39:49 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dd65020
7
8 sci-visualization/gnuplot: Support wxGTK:3.0 (#562486)
9
10 Package-Manager: portage-2.2.23
11
12 .../files/gnuplot-5.0.1-fix-underlinking.patch | 17 ++
13 sci-visualization/gnuplot/gnuplot-5.0.1-r1.ebuild | 199 +++++++++++++++++++++
14 2 files changed, 216 insertions(+)
15
16 diff --git a/sci-visualization/gnuplot/files/gnuplot-5.0.1-fix-underlinking.patch b/sci-visualization/gnuplot/files/gnuplot-5.0.1-fix-underlinking.patch
17 new file mode 100644
18 index 0000000..c39bc828
19 --- /dev/null
20 +++ b/sci-visualization/gnuplot/files/gnuplot-5.0.1-fix-underlinking.patch
21 @@ -0,0 +1,17 @@
22 +Description: Add missing linkage against X11 libs.
23 +Author: Anton Gladky <gladk@××××××.org>
24 +Last-Update: 2015-06-16
25 +
26 +Index: gnuplot-5.0.1/src/Makefile.am
27 +===================================================================
28 +--- gnuplot-5.0.1.orig/src/Makefile.am
29 ++++ gnuplot-5.0.1/src/Makefile.am
30 +@@ -89,6 +89,8 @@ $(EXTRA_gnuplot_SOURCES)
31 +
32 + if BUILD_WXWIDGETS
33 + gnuplot_SOURCES += wxterminal/wxt_gui.cpp
34 ++XLIBS = @LIBRARIES_FOR_X@
35 ++gnuplot_LDADD += $(XLIBS)
36 + endif
37 +
38 + if BUILD_GPCAIRO
39
40 diff --git a/sci-visualization/gnuplot/gnuplot-5.0.1-r1.ebuild b/sci-visualization/gnuplot/gnuplot-5.0.1-r1.ebuild
41 new file mode 100644
42 index 0000000..f49a707
43 --- /dev/null
44 +++ b/sci-visualization/gnuplot/gnuplot-5.0.1-r1.ebuild
45 @@ -0,0 +1,199 @@
46 +# Copyright 1999-2015 Gentoo Foundation
47 +# Distributed under the terms of the GNU General Public License v2
48 +# $Id$
49 +
50 +EAPI=5
51 +
52 +inherit autotools eutils flag-o-matic multilib readme.gentoo toolchain-funcs wxwidgets
53 +
54 +DESCRIPTION="Command-line driven interactive plotting program"
55 +HOMEPAGE="http://www.gnuplot.info/"
56 +
57 +if [[ -z ${PV%%*9999} ]]; then
58 + inherit autotools cvs
59 + ECVS_SERVER="gnuplot.cvs.sourceforge.net:/cvsroot/gnuplot"
60 + ECVS_MODULE="gnuplot"
61 + ECVS_BRANCH="branch-5-0-stable"
62 + ECVS_USER="anonymous"
63 + ECVS_CVS_OPTIONS="-dP"
64 + MY_P="${PN}"
65 + SRC_URI=""
66 + KEYWORDS=""
67 +else
68 + MY_P="${P/_/.}"
69 + SRC_URI="mirror://sourceforge/gnuplot/${MY_P}.tar.gz"
70 + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
71 + inherit autotools
72 +fi
73 +
74 +LICENSE="gnuplot bitmap? ( free-noncomm )"
75 +SLOT="0"
76 +IUSE="aqua bitmap cairo compat doc examples +gd ggi latex libcaca libcerf lua qt4 readline svga wxwidgets X"
77 +
78 +RDEPEND="
79 + cairo? (
80 + x11-libs/cairo
81 + x11-libs/pango )
82 + gd? ( >=media-libs/gd-2.0.35-r3[png] )
83 + ggi? ( media-libs/libggi )
84 + latex? (
85 + virtual/latex-base
86 + lua? (
87 + dev-tex/pgf
88 + >=dev-texlive/texlive-latexrecommended-2008-r2 ) )
89 + libcaca? ( media-libs/libcaca )
90 + lua? ( dev-lang/lua:0 )
91 + qt4? ( >=dev-qt/qtcore-4.5:4
92 + >=dev-qt/qtgui-4.5:4
93 + >=dev-qt/qtsvg-4.5:4 )
94 + readline? ( sys-libs/readline:0 )
95 + libcerf? ( sci-libs/libcerf )
96 + svga? ( media-libs/svgalib )
97 + wxwidgets? (
98 + x11-libs/wxGTK:3.0[X]
99 + x11-libs/cairo
100 + x11-libs/pango
101 + x11-libs/gtk+:2 )
102 + X? ( x11-libs/libXaw )"
103 +DEPEND="${RDEPEND}
104 + virtual/pkgconfig
105 + doc? (
106 + virtual/latex-base
107 + dev-texlive/texlive-latexextra
108 + app-text/ghostscript-gpl )"
109 +
110 +S="${WORKDIR}/${MY_P}"
111 +
112 +GP_VERSION="${PV%.*}"
113 +E_SITEFILE="lisp/50${PN}-gentoo.el"
114 +TEXMF="${EPREFIX}/usr/share/texmf-site"
115 +
116 +src_prepare() {
117 + # Fix underlinking
118 + epatch "${FILESDIR}"/${P}-fix-underlinking.patch
119 +
120 + if [[ -z ${PV%%*9999} ]]; then
121 + local dir
122 + for dir in config demo m4 term tutorial; do
123 + emake -C "$dir" -f Makefile.am.in Makefile.am
124 + done
125 + #eautoreconf
126 + fi
127 +
128 + # Add special version identification as required by provision 2
129 + # of the gnuplot license
130 + sed -i -e "1s/.*/& (Gentoo revision ${PR})/" PATCHLEVEL || die
131 +
132 + # hacky workaround
133 + # Please hack the buildsystem if you like
134 + if use prefix && use qt4; then
135 + append-ldflags -Wl,-rpath,"${EPREFIX}"/usr/$(get_libdir)/qt4
136 + fi
137 +
138 + DOC_CONTENTS='Gnuplot no longer links against pdflib, see the ChangeLog
139 + for details. You can use the "pdfcairo" terminal for PDF output.'
140 + use cairo || DOC_CONTENTS+=' It is available with USE="cairo".'
141 + use svga && DOC_CONTENTS+='\n\nIn order to enable ordinary users to use
142 + SVGA console graphics, gnuplot needs to be set up as setuid root.
143 + Please note that this is usually considered to be a security hazard.
144 + As root, manually "chmod u+s /usr/bin/gnuplot".'
145 + use gd && DOC_CONTENTS+='\n\nFor font support in png/jpeg/gif output,
146 + you may have to set the GDFONTPATH and GNUPLOT_DEFAULT_GDFONT
147 + environment variables. See the FAQ file in /usr/share/doc/${PF}/
148 + for more information.'
149 +
150 + mv configure.in configure.ac || die
151 + eautoreconf
152 +}
153 +
154 +src_configure() {
155 + if ! use latex; then
156 + sed -i -e '/SUBDIRS/s/LaTeX//' share/Makefile.in || die
157 + fi
158 +
159 + if use wxwidgets; then
160 + WX_GTK_VER="3.0"
161 + need-wxwidgets unicode
162 + fi
163 +
164 + tc-export CC CXX #453174
165 +
166 + econf \
167 + --without-pdf \
168 + --with-texdir="${TEXMF}/tex/latex/${PN}" \
169 + --with-readline=$(usex readline gnu builtin) \
170 + $(use_with bitmap bitmap-terminals) \
171 + $(use_with cairo) \
172 + $(use_enable compat backwards-compatibility) \
173 + $(use_with doc tutorial) \
174 + $(use_with gd) \
175 + "$(use_with ggi ggi "${EPREFIX}/usr/$(get_libdir)")" \
176 + "$(use_with ggi xmi "${EPREFIX}/usr/$(get_libdir)")" \
177 + "$(use_with libcaca caca "${EPREFIX}/usr/$(get_libdir)")" \
178 + $(use_with libcerf) \
179 + $(use_with lua) \
180 + $(use_with svga linux-vga) \
181 + $(use_with X x) \
182 + --enable-stats \
183 + $(use_with qt4 qt qt4) \
184 + $(use_enable wxwidgets) \
185 + DIST_CONTACT="https://bugs.gentoo.org/" \
186 + EMACS=no
187 +}
188 +
189 +src_compile() {
190 + # Prevent access violations, see bug 201871
191 + VARTEXFONTS="${T}/fonts"
192 +
193 + # We believe that the following line is no longer needed.
194 + # In case of problems file a bug report at bugs.gentoo.org.
195 + #addwrite /dev/svga:/dev/mouse:/dev/tts/0
196 +
197 + emake all
198 +
199 + if use doc; then
200 + # Avoid sandbox violation in epstopdf/ghostscript
201 + addpredict /var/cache/fontconfig
202 + emake -C docs gnuplot.pdf
203 + emake -C tutorial pdf
204 + fi
205 +}
206 +
207 +src_install () {
208 + emake DESTDIR="${D}" install
209 +
210 + dodoc BUGS ChangeLog NEWS PGPKEYS PORTING README*
211 + newdoc term/PostScript/README README-ps
212 + newdoc term/js/README README-js
213 + use lua && newdoc term/lua/README README-lua
214 + readme.gentoo_create_doc
215 +
216 + if use examples; then
217 + # Demo files
218 + insinto /usr/share/${PN}/${GP_VERSION}
219 + doins -r demo
220 + rm -f "${ED}"/usr/share/${PN}/${GP_VERSION}/demo/Makefile*
221 + rm -f "${ED}"/usr/share/${PN}/${GP_VERSION}/demo/binary*
222 + fi
223 +
224 + if use doc; then
225 + # Manual, tutorial, FAQ
226 + dodoc docs/gnuplot.pdf tutorial/{tutorial.dvi,tutorial.pdf} FAQ.pdf
227 + # Documentation for making PostScript files
228 + docinto psdoc
229 + dodoc docs/psdoc/{*.doc,*.tex,*.ps,*.gpi,README}
230 + fi
231 +}
232 +
233 +src_test() {
234 + GNUTERM="unknown" default_src_test
235 +}
236 +
237 +pkg_postinst() {
238 + use latex && texmf-update
239 + readme.gentoo_print_elog
240 +}
241 +
242 +pkg_postrm() {
243 + use latex && texmf-update
244 +}