1 |
commit: d84f2c0aacfea8661c098945dad39148aa553396 |
2 |
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 30 18:20:53 2020 +0000 |
4 |
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 30 18:21:14 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d84f2c0a |
7 |
|
8 |
sci-visualization/gnuplot: Support slotted lua in live ebuild. |
9 |
|
10 |
Bug: https://bugs.gentoo.org/752855 |
11 |
Package-Manager: Portage-3.0.11, Repoman-3.0.2 |
12 |
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> |
13 |
|
14 |
.../gnuplot/gnuplot-5.5.9999-r1.ebuild | 210 +++++++++++++++++++++ |
15 |
1 file changed, 210 insertions(+) |
16 |
|
17 |
diff --git a/sci-visualization/gnuplot/gnuplot-5.5.9999-r1.ebuild b/sci-visualization/gnuplot/gnuplot-5.5.9999-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..9865835c205 |
20 |
--- /dev/null |
21 |
+++ b/sci-visualization/gnuplot/gnuplot-5.5.9999-r1.ebuild |
22 |
@@ -0,0 +1,210 @@ |
23 |
+# Copyright 1999-2020 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+ |
28 |
+LUA_COMPAT=( lua5-{1,2,3} ) |
29 |
+ |
30 |
+inherit autotools flag-o-matic lua-single readme.gentoo-r1 toolchain-funcs wxwidgets |
31 |
+ |
32 |
+DESCRIPTION="Command-line driven interactive plotting program" |
33 |
+HOMEPAGE="http://www.gnuplot.info/" |
34 |
+ |
35 |
+if [[ -z ${PV%%*9999} ]]; then |
36 |
+ inherit git-r3 |
37 |
+ EGIT_REPO_URI="https://git.code.sf.net/p/gnuplot/gnuplot-main" |
38 |
+ EGIT_BRANCH="master" |
39 |
+ MY_P="${PN}" |
40 |
+ EGIT_CHECKOUT_DIR="${WORKDIR}/${MY_P}" |
41 |
+else |
42 |
+ MY_P="${P/_/.}" |
43 |
+ SRC_URI="mirror://sourceforge/gnuplot/${MY_P}.tar.gz" |
44 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" |
45 |
+fi |
46 |
+ |
47 |
+S="${WORKDIR}/${MY_P}" |
48 |
+ |
49 |
+LICENSE="gnuplot" |
50 |
+SLOT="0" |
51 |
+IUSE="aqua bitmap cairo doc examples +gd ggi latex libcaca libcerf lua qt5 readline regis wxwidgets X" |
52 |
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )" |
53 |
+ |
54 |
+RDEPEND=" |
55 |
+ cairo? ( |
56 |
+ x11-libs/cairo |
57 |
+ x11-libs/pango ) |
58 |
+ gd? ( >=media-libs/gd-2.0.35-r3:2=[png] ) |
59 |
+ ggi? ( media-libs/libggi ) |
60 |
+ latex? ( |
61 |
+ virtual/latex-base |
62 |
+ lua? ( |
63 |
+ dev-tex/pgf |
64 |
+ >=dev-texlive/texlive-latexrecommended-2008-r2 ) ) |
65 |
+ libcaca? ( media-libs/libcaca ) |
66 |
+ lua? ( ${LUA_DEPS} ) |
67 |
+ qt5? ( |
68 |
+ dev-qt/qtcore:5= |
69 |
+ dev-qt/qtgui:5= |
70 |
+ dev-qt/qtnetwork:5= |
71 |
+ dev-qt/qtprintsupport:5= |
72 |
+ dev-qt/qtsvg:5= |
73 |
+ dev-qt/qtwidgets:5= ) |
74 |
+ readline? ( sys-libs/readline:0= ) |
75 |
+ libcerf? ( sci-libs/libcerf ) |
76 |
+ wxwidgets? ( |
77 |
+ x11-libs/wxGTK:3.0-gtk3[X] |
78 |
+ x11-libs/cairo |
79 |
+ x11-libs/pango |
80 |
+ x11-libs/gtk+:3 ) |
81 |
+ X? ( x11-libs/libXaw )" |
82 |
+ |
83 |
+DEPEND="${RDEPEND}" |
84 |
+ |
85 |
+BDEPEND=" |
86 |
+ virtual/pkgconfig |
87 |
+ doc? ( |
88 |
+ virtual/latex-base |
89 |
+ dev-texlive/texlive-latexextra |
90 |
+ dev-texlive/texlive-langgreek |
91 |
+ app-text/ghostscript-gpl ) |
92 |
+ qt5? ( dev-qt/linguist-tools:5 )" |
93 |
+ |
94 |
+GP_VERSION="${PV%.*}" |
95 |
+E_SITEFILE="lisp/50${PN}-gentoo.el" |
96 |
+TEXMF="${EPREFIX}/usr/share/texmf-site" |
97 |
+ |
98 |
+PATCHES=( |
99 |
+ "${FILESDIR}"/${PN}-5.0.1-fix-underlinking.patch |
100 |
+ "${FILESDIR}"/${PN}-5.0.6-no-picins.patch |
101 |
+) |
102 |
+ |
103 |
+pkg_setup() { |
104 |
+ use lua && lua-single_pkg_setup |
105 |
+} |
106 |
+ |
107 |
+src_prepare() { |
108 |
+ default |
109 |
+ |
110 |
+ if [[ ${PV##*.} = 9999 ]]; then |
111 |
+ local dir |
112 |
+ for dir in config demo m4 term tutorial; do |
113 |
+ emake -C "$dir" -f Makefile.am.in Makefile.am |
114 |
+ done |
115 |
+ fi |
116 |
+ |
117 |
+ # Add special version identification as required by provision 2 |
118 |
+ # of the gnuplot license |
119 |
+ sed -i -e "1s/.*/& (Gentoo revision ${PR})/" PATCHLEVEL || die |
120 |
+ |
121 |
+ eautoreconf |
122 |
+ |
123 |
+ # Make sure we don't mix build & host flags. |
124 |
+ sed -i \ |
125 |
+ -e 's:@CPPFLAGS@:$(BUILD_CPPFLAGS):' \ |
126 |
+ -e 's:@CFLAGS@:$(BUILD_CFLAGS):' \ |
127 |
+ -e 's:@LDFLAGS@:$(BUILD_LDFLAGS):' \ |
128 |
+ -e 's:@CC@:$(CC_FOR_BUILD):' \ |
129 |
+ docs/Makefile.in || die |
130 |
+} |
131 |
+ |
132 |
+src_configure() { |
133 |
+ if ! use latex; then |
134 |
+ sed -i -e '/SUBDIRS/s/LaTeX//' share/Makefile.in || die |
135 |
+ fi |
136 |
+ |
137 |
+ if use wxwidgets; then |
138 |
+ WX_GTK_VER="3.0-gtk3" |
139 |
+ setup-wxwidgets |
140 |
+ fi |
141 |
+ |
142 |
+ tc-export CC CXX #453174 |
143 |
+ tc-export_build_env BUILD_CC |
144 |
+ export CC_FOR_BUILD=${BUILD_CC} |
145 |
+ |
146 |
+ use qt5 && append-cxxflags -std=c++11 |
147 |
+ |
148 |
+ econf \ |
149 |
+ --with-texdir="${TEXMF}/tex/latex/${PN}" \ |
150 |
+ --with-readline=$(usex readline gnu builtin) \ |
151 |
+ $(use_with bitmap bitmap-terminals) \ |
152 |
+ $(use_with cairo) \ |
153 |
+ $(use_with gd) \ |
154 |
+ "$(use_with ggi ggi "${EPREFIX}/usr/$(get_libdir)")" \ |
155 |
+ "$(use_with libcaca caca "${EPREFIX}/usr/$(get_libdir)")" \ |
156 |
+ $(use_with libcerf) \ |
157 |
+ $(use_with lua) \ |
158 |
+ $(use_with regis) \ |
159 |
+ $(use_with X x) \ |
160 |
+ --enable-stats \ |
161 |
+ $(use_with qt5 qt qt5) \ |
162 |
+ $(use_enable wxwidgets) \ |
163 |
+ DIST_CONTACT="https://bugs.gentoo.org/" \ |
164 |
+ EMACS=no |
165 |
+} |
166 |
+ |
167 |
+src_compile() { |
168 |
+ # Prevent access violations, see bug 201871 |
169 |
+ export VARTEXFONTS="${T}/fonts" |
170 |
+ |
171 |
+ emake all |
172 |
+ |
173 |
+ if use doc; then |
174 |
+ # Avoid sandbox violation in epstopdf/ghostscript |
175 |
+ addpredict /var/cache/fontconfig |
176 |
+ if use cairo; then |
177 |
+ emake -C docs pdf |
178 |
+ else |
179 |
+ ewarn "Cannot build figures unless cairo is enabled." |
180 |
+ ewarn "Building documentation without figures." |
181 |
+ emake -C docs pdf_nofig |
182 |
+ mv docs/nofigures.pdf docs/gnuplot.pdf || die |
183 |
+ fi |
184 |
+ fi |
185 |
+} |
186 |
+ |
187 |
+src_install() { |
188 |
+ emake DESTDIR="${D}" install |
189 |
+ |
190 |
+ dodoc BUGS NEWS PGPKEYS README* RELEASE_NOTES |
191 |
+ newdoc term/PostScript/README README-ps |
192 |
+ newdoc term/js/README README-js |
193 |
+ use lua && newdoc term/lua/README README-lua |
194 |
+ |
195 |
+ local DOC_CONTENTS='Gnuplot no longer links against pdflib. You can |
196 |
+ use the "pdfcairo" terminal for PDF output.' |
197 |
+ use cairo || DOC_CONTENTS+=' It is available with USE="cairo".' |
198 |
+ use gd && DOC_CONTENTS+="\n\nFor font support in png/jpeg/gif output, |
199 |
+ you may have to set the GDFONTPATH and GNUPLOT_DEFAULT_GDFONT |
200 |
+ environment variables. See the FAQ file in /usr/share/doc/${PF}/ |
201 |
+ for more information." |
202 |
+ readme.gentoo_create_doc |
203 |
+ |
204 |
+ if use examples; then |
205 |
+ # Demo files |
206 |
+ insinto /usr/share/${PN}/${GP_VERSION} |
207 |
+ doins -r demo |
208 |
+ rm -f "${ED}"/usr/share/${PN}/${GP_VERSION}/demo/Makefile* |
209 |
+ rm -f "${ED}"/usr/share/${PN}/${GP_VERSION}/demo/binary* |
210 |
+ fi |
211 |
+ |
212 |
+ if use doc; then |
213 |
+ # Manual, FAQ |
214 |
+ dodoc docs/gnuplot.pdf #FAQ.pdf |
215 |
+ # Documentation for making PostScript files |
216 |
+ docinto psdoc |
217 |
+ dodoc docs/psdoc/{*.doc,*.tex,*.ps,*.gpi,README} |
218 |
+ fi |
219 |
+} |
220 |
+ |
221 |
+src_test() { |
222 |
+ emake check GNUTERM="dumb" |
223 |
+} |
224 |
+ |
225 |
+pkg_postinst() { |
226 |
+ use latex && texmf-update |
227 |
+ readme.gentoo_print_elog |
228 |
+} |
229 |
+ |
230 |
+pkg_postrm() { |
231 |
+ use latex && texmf-update |
232 |
+} |