1 |
commit: f430eaf4ff2738fae69c577f0e1eb40429b42d23 |
2 |
Author: Chris Mayo <aklhfex <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Aug 25 18:56:52 2019 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 14 14:52:24 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f430eaf4 |
7 |
|
8 |
media-gfx/graphviz: version bump to 2.42.1 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/682522 |
11 |
Package-Manager: Portage-2.3.69, Repoman-2.3.16 |
12 |
Signed-off-by: Chris Mayo <aklhfex <AT> gmail.com> |
13 |
Closes: https://github.com/gentoo/gentoo/pull/12790 |
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
media-gfx/graphviz/Manifest | 1 + |
17 |
.../files/graphviz-2.42.1-libgv_python.patch | 15 ++ |
18 |
.../graphviz/files/graphviz-2.42.1-math.patch | 38 +++ |
19 |
media-gfx/graphviz/graphviz-2.42.1.ebuild | 283 +++++++++++++++++++++ |
20 |
4 files changed, 337 insertions(+) |
21 |
|
22 |
diff --git a/media-gfx/graphviz/Manifest b/media-gfx/graphviz/Manifest |
23 |
index b2df6ab0c2f..5159a80cab1 100644 |
24 |
--- a/media-gfx/graphviz/Manifest |
25 |
+++ b/media-gfx/graphviz/Manifest |
26 |
@@ -1 +1,2 @@ |
27 |
DIST graphviz-2.40.1.tar.gz 25633455 BLAKE2B 96ba5a8cb94d93cf4ecd424bf29c1bf67099e39e582be97fca088de0aad6bbbb46b00af55c197894e0b63f1a96177894b6cd23498295bb524fe19a75661cbc59 SHA512 a3f358a7050523a39b91a259563a95925b37853ffec799e571211af5b686d3af42457c937882954482785745d90416b1abd945caf05f8abb52b3876e07aa70f5 |
28 |
+DIST graphviz-2.42.1.tar.gz 25543401 BLAKE2B e64044923a823f6fbe91b498b04fffe3e5b6803c55c5ce29a60b16a38d97260061b013e8bd13bc99f360d035c840f18a01301b29ca1cb73c4be87843f18c45fc SHA512 ac263df086eea6faf682f493756b79a0af8bae3f515cd8c09238e89f295226baf743a3fd22d977ef6f223388769ef11241dfb2fdb6087305ce4fdd3fa8ed2f78 |
29 |
|
30 |
diff --git a/media-gfx/graphviz/files/graphviz-2.42.1-libgv_python.patch b/media-gfx/graphviz/files/graphviz-2.42.1-libgv_python.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..426ebbe14a3 |
33 |
--- /dev/null |
34 |
+++ b/media-gfx/graphviz/files/graphviz-2.42.1-libgv_python.patch |
35 |
@@ -0,0 +1,15 @@ |
36 |
+--- a/tclpkg/gv/Makefile.am |
37 |
++++ b/tclpkg/gv/Makefile.am |
38 |
+@@ -430,10 +430,10 @@ |
39 |
+ (cd $(DESTDIR)$(pkgpythondir); rm -f _gv.so; $(LN_S) libgv_python.so _gv.so;) |
40 |
+ endif |
41 |
+ if WITH_PYTHON2 |
42 |
+- (cd $(DESTDIR)$(pkgpython2dir); rm -f _gv.so; $(LN_S) libgv_python.so _gv.so;) |
43 |
++ (cd $(DESTDIR)$(pkgpython2dir); rm -f _gv.so; $(LN_S) libgv_python2.so _gv.so;) |
44 |
+ endif |
45 |
+ if WITH_PYTHON3 |
46 |
+- (cd $(DESTDIR)$(pkgpython3dir); rm -f _gv.so; $(LN_S) libgv_python.so _gv.so;) |
47 |
++ (cd $(DESTDIR)$(pkgpython3dir); rm -f _gv.so; $(LN_S) libgv_python3.so _gv.so;) |
48 |
+ endif |
49 |
+ if WITH_R |
50 |
+ (cd $(DESTDIR)$(pkgRdir); rm -f gv.so; $(LN_S) libgv_R.so gv.so;) |
51 |
|
52 |
diff --git a/media-gfx/graphviz/files/graphviz-2.42.1-math.patch b/media-gfx/graphviz/files/graphviz-2.42.1-math.patch |
53 |
new file mode 100644 |
54 |
index 00000000000..59b84817a99 |
55 |
--- /dev/null |
56 |
+++ b/media-gfx/graphviz/files/graphviz-2.42.1-math.patch |
57 |
@@ -0,0 +1,38 @@ |
58 |
+diff --git a/lib/sfio/sfdlen.c b/lib/sfio/sfdlen.c |
59 |
+index 2b4f8b0a3..3b2c75066 100644 |
60 |
+--- a/lib/sfio/sfdlen.c |
61 |
++++ b/lib/sfio/sfdlen.c |
62 |
+@@ -13,6 +13,8 @@ |
63 |
+ |
64 |
+ #include "sfhdr.h" |
65 |
+ |
66 |
++#include <math.h> |
67 |
++ |
68 |
+ /* Return the length of a double value if coded in a portable format |
69 |
+ ** |
70 |
+ ** Written by Kiem-Phong Vo |
71 |
+diff --git a/lib/sfio/sfgetd.c b/lib/sfio/sfgetd.c |
72 |
+index 535b2cb9a..607681e60 100644 |
73 |
+--- a/lib/sfio/sfgetd.c |
74 |
++++ b/lib/sfio/sfgetd.c |
75 |
+@@ -13,6 +13,8 @@ |
76 |
+ |
77 |
+ #include "sfhdr.h" |
78 |
+ |
79 |
++#include <math.h> |
80 |
++ |
81 |
+ /* Read a portably coded double value |
82 |
+ ** |
83 |
+ ** Written by Kiem-Phong Vo |
84 |
+diff --git a/lib/sfio/sfputd.c b/lib/sfio/sfputd.c |
85 |
+index 64ab9eaf3..a2dbd225c 100644 |
86 |
+--- a/lib/sfio/sfputd.c |
87 |
++++ b/lib/sfio/sfputd.c |
88 |
+@@ -14,6 +14,7 @@ |
89 |
+ #include "sfhdr.h" |
90 |
+ |
91 |
+ #include <float.h> |
92 |
++#include <math.h> |
93 |
+ |
94 |
+ /* Write out a floating point value in a portable format |
95 |
+ ** |
96 |
|
97 |
diff --git a/media-gfx/graphviz/graphviz-2.42.1.ebuild b/media-gfx/graphviz/graphviz-2.42.1.ebuild |
98 |
new file mode 100644 |
99 |
index 00000000000..b901f7c2f90 |
100 |
--- /dev/null |
101 |
+++ b/media-gfx/graphviz/graphviz-2.42.1.ebuild |
102 |
@@ -0,0 +1,283 @@ |
103 |
+# Copyright 1999-2019 Gentoo Authors |
104 |
+# Distributed under the terms of the GNU General Public License v2 |
105 |
+ |
106 |
+EAPI=6 |
107 |
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) |
108 |
+ |
109 |
+inherit autotools flag-o-matic java-pkg-opt-2 python-single-r1 qmake-utils |
110 |
+ |
111 |
+DESCRIPTION="Open Source Graph Visualization Software" |
112 |
+HOMEPAGE="https://www.graphviz.org/ https://gitlab.com/graphviz/graphviz/" |
113 |
+SRC_URI="https://www2.graphviz.org/Packages/stable/portable_source/${P}.tar.gz" |
114 |
+ |
115 |
+LICENSE="CPL-1.0" |
116 |
+SLOT="0" |
117 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris" |
118 |
+IUSE="+cairo devil doc examples gdk-pixbuf gtk gts guile java lasi nls pdf perl postscript python qt5 ruby static-libs svg tcl X elibc_FreeBSD" |
119 |
+ |
120 |
+REQUIRED_USE=" |
121 |
+ !cairo? ( !X !gtk !postscript !lasi ) |
122 |
+ python? ( ${PYTHON_REQUIRED_USE} )" |
123 |
+ |
124 |
+# Requires ksh, tests against installed package, missing files and directory |
125 |
+RESTRICT="test" |
126 |
+ |
127 |
+COMMON_DEPEND=" |
128 |
+ >=dev-libs/expat-2 |
129 |
+ >=dev-libs/glib-2.11.1:2 |
130 |
+ dev-libs/libltdl:0 |
131 |
+ >=media-libs/fontconfig-2.3.95 |
132 |
+ >=media-libs/freetype-2.1.10 |
133 |
+ >=media-libs/gd-2.0.34:=[fontconfig,jpeg,png,truetype,zlib] |
134 |
+ >=media-libs/libpng-1.2:0 |
135 |
+ sys-libs/zlib |
136 |
+ virtual/jpeg:0 |
137 |
+ virtual/libiconv |
138 |
+ cairo? ( |
139 |
+ >=x11-libs/cairo-1.1.10[svg] |
140 |
+ >=x11-libs/pango-1.12 |
141 |
+ ) |
142 |
+ devil? ( media-libs/devil[png,jpeg] ) |
143 |
+ gtk? ( x11-libs/gtk+:2 ) |
144 |
+ gts? ( sci-libs/gts ) |
145 |
+ lasi? ( media-libs/lasi ) |
146 |
+ pdf? ( app-text/poppler ) |
147 |
+ perl? ( dev-lang/perl:= ) |
148 |
+ postscript? ( app-text/ghostscript-gpl ) |
149 |
+ python? ( ${PYTHON_DEPS} ) |
150 |
+ qt5? ( |
151 |
+ dev-qt/qtcore:5 |
152 |
+ dev-qt/qtgui:5 |
153 |
+ dev-qt/qtprintsupport:5 |
154 |
+ dev-qt/qtwidgets:5 |
155 |
+ ) |
156 |
+ ruby? ( dev-lang/ruby:* ) |
157 |
+ svg? ( gnome-base/librsvg ) |
158 |
+ tcl? ( >=dev-lang/tcl-8.3:0= ) |
159 |
+ X? ( |
160 |
+ x11-libs/libX11 |
161 |
+ x11-libs/libXaw |
162 |
+ x11-libs/libXmu |
163 |
+ x11-libs/libXpm |
164 |
+ x11-libs/libXt |
165 |
+ )" |
166 |
+DEPEND="${COMMON_DEPEND} |
167 |
+ sys-devel/flex |
168 |
+ sys-devel/libtool |
169 |
+ virtual/pkgconfig |
170 |
+ guile? ( dev-lang/swig dev-scheme/guile ) |
171 |
+ java? ( dev-lang/swig >=virtual/jdk-1.5 ) |
172 |
+ nls? ( >=sys-devel/gettext-0.14.5 ) |
173 |
+ perl? ( dev-lang/swig ) |
174 |
+ python? ( dev-lang/swig ) |
175 |
+ ruby? ( dev-lang/swig ) |
176 |
+ tcl? ( dev-lang/swig )" |
177 |
+RDEPEND="${COMMON_DEPEND} |
178 |
+ !<=sci-chemistry/cluster-1.3.081231" |
179 |
+ |
180 |
+# Dependency description / Maintainer-Info: |
181 |
+ |
182 |
+# Rendering is done via the following plugins (/plugins): |
183 |
+# - core, dot_layout, neato_layout, gd , dot |
184 |
+# the ones which are always compiled in, depend on zlib, gd |
185 |
+# - gtk |
186 |
+# Directly depends on gtk-2. |
187 |
+# needs 'pangocairo' enabled in graphviz configuration |
188 |
+# gtk-2 depends on pango, cairo and libX11 directly. |
189 |
+# - gdk-pixbuf |
190 |
+# Disabled, GTK-1 junk. |
191 |
+# - glitz |
192 |
+# Disabled, no particular reason |
193 |
+# needs 'pangocairo' enabled in graphviz configuration |
194 |
+# - ming |
195 |
+# flash plugin via -Tswf requires media-libs/ming-0.4. Disabled as it's |
196 |
+# incomplete. |
197 |
+# - cairo/pango: |
198 |
+# Needs pango for text layout, uses cairo methods to draw stuff |
199 |
+# - xlib: |
200 |
+# needs cairo+pango, |
201 |
+# can make use of gnomeui and inotify support (??? unsure), |
202 |
+# needs libXaw for UI |
203 |
+# UI also links directly against libX11, libXmu, and libXt |
204 |
+# and uses libXpm if available so we make sure it always is |
205 |
+ |
206 |
+# There can be swig-generated bindings for the following languages (/tclpkg/gv): |
207 |
+# - c-sharp (disabled) |
208 |
+# - scheme (enabled via guile) ... no longer broken on ~x86 |
209 |
+# - io (disabled) |
210 |
+# - java (enabled via java) *2 |
211 |
+# - lua (enabled via lua) |
212 |
+# - ocaml (enabled via ocaml) |
213 |
+# - perl (enabled via perl) *1 |
214 |
+# - php (enabled via php) *2 |
215 |
+# - python (enabled via python) *1 |
216 |
+# - ruby (enabled via ruby) *1 |
217 |
+# - tcl (enabled via tcl) |
218 |
+# *1 = The ${P}-bindings.patch takes care that those bindings are installed to the right location |
219 |
+# *2 = Those bindings don't build because the paths for the headers/libs aren't |
220 |
+# detected correctly and/or the options passed to swig are wrong (-php instead of -php4/5) |
221 |
+ |
222 |
+# There are several other tools in /tclpkg: |
223 |
+# gdtclft, tcldot, tclhandle, tclpathplan, tclstubs ; enabled with: --with-tcl |
224 |
+# tkspline, tkstubs ; enabled with: --with-tk |
225 |
+ |
226 |
+# And the commands (/cmd): |
227 |
+# - dot, dotty, gvedit, gvpr, lefty, lneato, smyrna, tools/* :) |
228 |
+# sci-libs/gts can be used for some of these |
229 |
+# - lefty: |
230 |
+# needs Xaw and X to build |
231 |
+# - gvedit (via 'qt5'): |
232 |
+# based on ./configure it needs qt-core and qt-gui only |
233 |
+# - smyrna : experimental opengl front-end (via 'smyrna') |
234 |
+# currently disabled -- it segfaults a lot |
235 |
+# needs x11-libs/gtkglext, gnome-base/libglade, media-libs/freeglut |
236 |
+# sci-libs/gts, x11-libs/gtk. Also needs 'gtk','glade','glut','gts' and 'png' |
237 |
+# with flags enabled at configure time |
238 |
+ |
239 |
+PATCHES=( |
240 |
+ "${FILESDIR}"/${PN}-2.34.0-Xaw-configure.patch |
241 |
+ "${FILESDIR}"/${P}-libgv_python.patch |
242 |
+ "${FILESDIR}"/${P}-math.patch |
243 |
+) |
244 |
+ |
245 |
+pkg_setup() { |
246 |
+ use python && python-single-r1_pkg_setup |
247 |
+ |
248 |
+ java-pkg-opt-2_pkg_setup |
249 |
+} |
250 |
+ |
251 |
+src_prepare() { |
252 |
+ default |
253 |
+ |
254 |
+ # ToDo: Do the same thing for examples and/or |
255 |
+ # write a patch for a configuration-option |
256 |
+ # and send it to upstream |
257 |
+ # note - the longer sed expression removes multi-line assignments that are extended via '\' |
258 |
+ if ! use doc ; then |
259 |
+ find . -iname Makefile.am \ |
260 |
+ | xargs sed -i -e '/^\(html\|pdf\)_DATA.*\\[[:space:]]*$/{:m;N;s/\\\n//;tm;d}' \ |
261 |
+ -e '/^\(html\|pdf\)_DATA/d' || die |
262 |
+ fi |
263 |
+ |
264 |
+ # This is an old version of libtool |
265 |
+ # use the ./configure option to exclude its use, and |
266 |
+ # delete the dir since we don't need to eautoreconf it |
267 |
+ rm -r libltdl || die |
268 |
+ |
269 |
+ # Nuke the dead symlinks for the bindings |
270 |
+ sed -i -e '/$(pkgluadir)/d' tclpkg/gv/Makefile.am || die |
271 |
+ |
272 |
+ # replace the whitespace with tabs |
273 |
+ sed -i -e 's: :\t:g' doc/info/Makefile.am || die |
274 |
+ |
275 |
+ # use correct version of qmake. bug #567236 |
276 |
+ sed -i -e "/AC_CHECK_PROGS(QMAKE/a AC_SUBST(QMAKE,$(qt5_get_bindir)/qmake)" configure.ac || die |
277 |
+ |
278 |
+ # workaround for http://www.graphviz.org/mantisbt/view.php?id=1895 |
279 |
+ use elibc_FreeBSD && append-flags $(test-flags -fno-builtin-sincos) |
280 |
+ |
281 |
+ use java && append-cppflags $(java-pkg_get-jni-cflags) |
282 |
+ |
283 |
+ eautoreconf |
284 |
+} |
285 |
+ |
286 |
+src_configure() { |
287 |
+ local myconf=( |
288 |
+ --enable-ltdl |
289 |
+ --disable-silent-rules |
290 |
+ $(use_enable static-libs static) |
291 |
+ ) |
292 |
+ |
293 |
+ # libtool file collision, bug 276609 |
294 |
+ myconf+=( --without-included-ltdl --disable-ltdl-install ) |
295 |
+ |
296 |
+ myconf+=( |
297 |
+ $(use_with cairo pangocairo) |
298 |
+ $(use_with devil) |
299 |
+ $(use_with gtk) |
300 |
+ $(use_with gts) |
301 |
+ $(use_with qt5 qt) |
302 |
+ $(use_with lasi) |
303 |
+ $(use_with pdf poppler) |
304 |
+ $(use_with postscript ghostscript) |
305 |
+ $(use_with svg rsvg) |
306 |
+ $(use_with X x) |
307 |
+ $(use_with X xaw) |
308 |
+ $(use_with X lefty) |
309 |
+ --with-digcola |
310 |
+ --with-fontconfig |
311 |
+ --with-freetype2 |
312 |
+ --with-ipsepcola |
313 |
+ --with-libgd |
314 |
+ --with-sfdp |
315 |
+ $(use_enable gdk-pixbuf) |
316 |
+ --without-ming |
317 |
+ ) |
318 |
+ |
319 |
+ # new/experimental features, to be tested, disable for now |
320 |
+ myconf+=( |
321 |
+ --with-cgraph |
322 |
+ --without-glitz |
323 |
+ --without-ipsepcola |
324 |
+ --without-smyrna |
325 |
+ --without-visio |
326 |
+ ) |
327 |
+ |
328 |
+ # Bindings: |
329 |
+ myconf+=( |
330 |
+ $(use_enable guile) |
331 |
+ --disable-io |
332 |
+ $(use_enable java) |
333 |
+ --disable-lua |
334 |
+ --disable-ocaml |
335 |
+ $(use_enable perl) |
336 |
+ --disable-php |
337 |
+ --disable-python |
338 |
+ $(use_enable python python2) |
339 |
+ $(use_enable python python3) |
340 |
+ --disable-r |
341 |
+ $(use_enable ruby) |
342 |
+ --disable-sharp |
343 |
+ $(use_enable tcl) |
344 |
+ ) |
345 |
+ |
346 |
+ econf ${myconf[@]} |
347 |
+} |
348 |
+ |
349 |
+src_install() { |
350 |
+ sed -i -e "s:htmldir:htmlinfodir:g" doc/info/Makefile || die |
351 |
+ |
352 |
+ emake DESTDIR="${D}" \ |
353 |
+ txtdir="${EPREFIX}"/usr/share/doc/${PF} \ |
354 |
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \ |
355 |
+ htmlinfodir="${EPREFIX}"/usr/share/doc/${PF}/html/info \ |
356 |
+ pdfdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \ |
357 |
+ pkgconfigdir="${EPREFIX}"/usr/$(get_libdir)/pkgconfig \ |
358 |
+ install |
359 |
+ |
360 |
+ if ! use examples; then |
361 |
+ rm -rf "${ED}"/usr/share/graphviz/demo || die |
362 |
+ fi |
363 |
+ |
364 |
+ if ! use static-libs; then |
365 |
+ find "${ED}" -name '*.la' -delete || die |
366 |
+ fi |
367 |
+ |
368 |
+ dodoc AUTHORS ChangeLog NEWS README |
369 |
+ |
370 |
+ use python && python_optimize \ |
371 |
+ "${D}$(python_get_sitedir)" \ |
372 |
+ "${D}/usr/$(get_libdir)/graphviz/python2" \ |
373 |
+ "${D}/usr/$(get_libdir)/graphviz/python3" |
374 |
+} |
375 |
+ |
376 |
+pkg_postinst() { |
377 |
+ # This actually works if --enable-ltdl is passed |
378 |
+ # to configure |
379 |
+ dot -c || die |
380 |
+} |
381 |
+ |
382 |
+pkg_postrm() { |
383 |
+ # Remove cruft, bug #547344 |
384 |
+ rm -rf "${EROOT}"usr/$(get_libdir)/graphviz/config{,6} || die |
385 |
+} |