Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 501318 - media-gfx/graphviz-2.36.0 - make it python3 compatible + fixes
Summary: media-gfx/graphviz-2.36.0 - make it python3 compatible + fixes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords: PATCH, UPSTREAM
Depends on:
Blocks:
 
Reported: 2014-02-14 18:55 UTC by Alex Turbov
Modified: 2019-09-14 15:14 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to make it python 3 compatible (graphviz-2.36.0-python3-compat.patch,6.51 KB, patch)
2014-02-14 18:56 UTC, Alex Turbov
Details | Diff
patch to turn 2.36.0 to 2.36.0-r1 (graphviz-2.36.0-to-r1.ebuild.patch,1.60 KB, patch)
2014-02-14 18:57 UTC, Alex Turbov
Details | Diff
updated ebuild (graphviz-2.36.0-r1.ebuild,7.77 KB, text/plain)
2014-02-14 18:58 UTC, Alex Turbov
Details
use python-r1 instead of python-single-r1 (graphviz-2.36.0-r2.patch,2.40 KB, patch)
2014-02-17 02:39 UTC, Alex Turbov
Details | Diff
make it python3 compatible + fixes (graphviz-2.36.0-python3-compat.patch,19.07 KB, patch)
2014-02-17 02:42 UTC, Alex Turbov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Turbov 2014-02-14 18:55:29 UTC
0) make it python 3.3 compatible
1) use proper --with-pythonXY on configure
2) remove graphite flags due a bug in upstream

Reproducible: Always

Actual Results:  
python example work well w/ python 3.3. 
kapidox (recently hacked to use python bindings for graphviz) is able to build KF5 documentation.
Comment 1 Alex Turbov 2014-02-14 18:56:11 UTC
Created attachment 370414 [details, diff]
patch to make it python 3 compatible
Comment 2 Alex Turbov 2014-02-14 18:57:40 UTC
Created attachment 370416 [details, diff]
patch to turn 2.36.0 to 2.36.0-r1
Comment 3 Alex Turbov 2014-02-14 18:58:05 UTC
Created attachment 370418 [details]
updated ebuild
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-02-15 11:36:36 UTC
Comment on attachment 370418 [details]
updated ebuild

--- graphviz-2.36.0.ebuild      2014-02-07 14:30:47.135367781 +0100
+++ -   2014-02-15 12:36:23.339200527 +0100
@@ -3,7 +3,7 @@
 # $Header: /var/cvsroot/gentoo-x86/media-gfx/graphviz/graphviz-2.36.0.ebuild,v 1.2 2014/02/06 12:19:14 kensington Exp $
 EAPI=5
-PYTHON_COMPAT=( python{2_6,2_7} )
+PYTHON_COMPAT=( python{2_6,2_7,3_3} )
 inherit autotools eutils flag-o-matic java-pkg-opt-2 multilib python-single-r1
@@ -137,7 +137,8 @@
 src_prepare() {
        epatch \
                "${FILESDIR}"/${PN}-2.34.0-Xaw-configure.patch \
-               "${FILESDIR}"/${PN}-2.34.0-dot-pangocairo-link.patch
+               "${FILESDIR}"/${PN}-2.34.0-dot-pangocairo-link.patch \
+               "${FILESDIR}"/${P}-python3-compat.patch
        # ToDo: Do the same thing for examples and/or
        #       write a patch for a configuration-option
@@ -168,6 +169,13 @@
        use java && append-cppflags $(java-pkg_get-jni-cflags)
+       # 2.36.0 has assertion failure w/ some graphite flags:
+       # dot: mincross.c:1077: install_in_rank: Assertion `
+       # (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->rank)[r].n <= 
+       # (((Agraphinfo_t*)(((Agobj_t*)(g))->data))->rank)[r].an' failed.
+       # So, turn graphite options OFF
+       filter-flags -floop* -fgraphite* -ftree-loop* -fivopts
+
        eautoreconf
 }
@@ -204,6 +212,7 @@
                --without-visio"
        # Bindings:
+       local -r with_python=`sed 's,_,,' <<<${PYTHON_SINGLE_TARGET}`
        myconf="${myconf}
                $(use_enable guile)
                --disable-io
@@ -212,7 +221,7 @@
                --disable-ocaml
                $(use_enable perl)
                --disable-php
-               $(use_enable python)
+               $(use_enable python ${with_python})
                --disable-r
                $(use_enable ruby)
                --disable-sharp
Comment 5 Michael Palimaka (kensington) gentoo-dev 2014-02-15 17:18:58 UTC
I said this on another bug too, but if it's possible, non-single-target support would be nice too.
Comment 6 Alex Turbov 2014-02-17 02:39:46 UTC
Created attachment 370600 [details, diff]
use python-r1 instead of python-single-r1

next generation of the same ebuild capable to link w/ few PYTHON_TARGETS simultaneously.
kde-frameworks/kapidox now can be less restrictive about python version.
https://github.com/gentoo/kde/commit/a452697f2b2debfea728af5f2dd5a4e84342b5e5#commitcomment-5387329
Comment 7 Alex Turbov 2014-02-17 02:42:21 UTC
Created attachment 370602 [details, diff]
make it python3 compatible + fixes

add Python3 support + a lot of fixes to ugly config files (full of copy-n-paste errors)... upstream devs definitely must read some docs about autotools...
Comment 8 Pacho Ramos gentoo-dev 2015-10-03 09:37:56 UTC
The python3 compat patches should probably be forwarded to upstream directly for preventing us from diverging with them

Thanks
Comment 9 Pacho Ramos gentoo-dev 2019-04-04 12:38:51 UTC
Fedora is applying this simpler patch
https://src.fedoraproject.org/rpms/graphviz/blob/master/f/graphviz-2.40.1-python3.patch