summaryrefslogtreecommitdiff
path: root/media-gfx/graphviz
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-gfx/graphviz
reinit the tree, so we can have metadata
Diffstat (limited to 'media-gfx/graphviz')
-rw-r--r--media-gfx/graphviz/Manifest10
-rw-r--r--media-gfx/graphviz/files/graphviz-2.34.0-Xaw-configure.patch81
-rw-r--r--media-gfx/graphviz/files/graphviz-2.34.0-dot-pangocairo-link.patch17
-rw-r--r--media-gfx/graphviz/files/graphviz-2.38.0-ghostscript-9.18.patch32
-rw-r--r--media-gfx/graphviz/graphviz-2.38.0-r1.ebuild267
-rw-r--r--media-gfx/graphviz/graphviz-2.40.1.ebuild275
-rw-r--r--media-gfx/graphviz/metadata.xml49
7 files changed, 731 insertions, 0 deletions
diff --git a/media-gfx/graphviz/Manifest b/media-gfx/graphviz/Manifest
new file mode 100644
index 000000000000..508ac46481c5
--- /dev/null
+++ b/media-gfx/graphviz/Manifest
@@ -0,0 +1,10 @@
+AUX graphviz-2.34.0-Xaw-configure.patch 2445 SHA256 93fa487d0170cce51779a94039814e3924afa88320b5de254f270d6705c8d5a0 SHA512 473d2ed9070329512cbc26929267b25fb8d7726e21ed01d2921d4d8ac13b8ffaf166f07229fa7409192cfa14fabb0cf68b299bb3331b3cc953ae5363274fd15c WHIRLPOOL 0f3468f1e23807728a46b5028c8f7df3887cc5219616779dc261bf8d6c7a2aa942740f05ef1c490ce4a66cd026e583e93cf751ae087414bf11f5a8717dbc1682
+AUX graphviz-2.34.0-dot-pangocairo-link.patch 882 SHA256 aa50acee0568c250286affdaaa2625347f2ea982b581c7831a9424f2fac03114 SHA512 8e40b35d8d1ec6a9e683e4f4f39fd5e6c253015727172ba0ed1cf6d9a3b4cc20e3d4169a11bbed29c3cf3dc8ff6d14508ea6459dd62e53e7d69b62ee39ef9f26 WHIRLPOOL 24b6e40c3e70397c099748511ccd34cf88ed1ecd4956b4924a80fe06c09858aa4ec67fcb6194ec7019a74f4ced0435461d18682dcabb5a77a147f345cebbed38
+AUX graphviz-2.38.0-ghostscript-9.18.patch 753 SHA256 b82a0026d528b9e6ffe74798361fd6404bf9dedd87c646d667ff19534a4498d8 SHA512 19327b3fbfecdad1990fd4d9668c3f318da5907c1a8c7e3abd1f1f5a0703c474975b7f08425eb2c0f5c32522ebea614d02b4db9e83cce7fb975458fb87cafc62 WHIRLPOOL 90b8e0ecbf5bfbfbf262af384d8faa2e91e31ed06762c12c8a542caadc64b0634046cdd5245da79e7525d0226064c4f36e6fd93bc2741e2979c21e44c15a810a
+DIST graphviz-2.38.0.tar.gz 25848858 SHA256 81aa238d9d4a010afa73a9d2a704fc3221c731e1e06577c2ab3496bdef67859e SHA512 0e51a97dae595f4e80bc9e4a12ba3c48485fab19941a28d522f5a0624b6a767e0ba720e9e55bff8efe8308dd1cd3793e2c99cb5fdfceb2d5cafb0cbee907e531 WHIRLPOOL b59bb517c4aa690ffd23e1b4d448d5dbaae5594eb1059d574e0cb3bf2091beb9ed867bd4fa7e8ca0259863f24849c96d4d1da056091922bf33ace7da43c8b5d4
+DIST graphviz-2.40.1.tar.gz 25633455 SHA256 ca5218fade0204d59947126c38439f432853543b0818d9d728c589dfe7f3a421 SHA512 a3f358a7050523a39b91a259563a95925b37853ffec799e571211af5b686d3af42457c937882954482785745d90416b1abd945caf05f8abb52b3876e07aa70f5 WHIRLPOOL 0ff4a23cf8c3e0bcbf12776d65ea0aa538050286d6b25bcc3707c7c1ad2d0f8c282239f57bfc0c3795bccf276e9d6627d77ed2920781008a2558af126787a72c
+EBUILD graphviz-2.38.0-r1.ebuild 7839 SHA256 58865a08ad9177b0547fbb219ac8d8149da90f970ff579751f0e68988ed22b6a SHA512 5033b119a945305cf1535b64a6fea92a1be164d23aa8413b69dafc46f6dea2058f843b63776c13c175101840d4648cf56c9b9dade6c0bd6b443dbb1c8c20fb89 WHIRLPOOL 8002451394fc1a8362d22c98b357f6d1b67fe0d7397d9024e1b019f2d2fb98aedbdaf79478a3947ab019585ee2ddd5406d4e21ad26f5fcabbe8a58de2f7e5eb7
+EBUILD graphviz-2.40.1.ebuild 7789 SHA256 4429467b1732701f6a2dc142b3b9c74a69b8dfe4a1a62871c83120906e4892ec SHA512 abf891342a6aa4a71a6d1d7066bfbfdc0bf1846447fc1cd87a2a9cb600f3b2f623e52bdc1aac060e39623ec489d6d2820333ccc7831b229211a27753f04b9081 WHIRLPOOL ecfb2c0f49ca26a8d6c45103f646d5e0da4fe279db62b32c3b9a4e16fb4e5b778b2171950621a2cd6b7b4892cc1b59730aaede1ab533fcd1bd37c186e65da88d
+MISC ChangeLog 6266 SHA256 5fa7dbf137ef0d386e76e36a0b34599dc0540c2844af95c701073a6fee6e919d SHA512 12824a1ff6e84e4928dfaa16ec9d6c71aa026cf2a78b0fee03299af3600e2720b7bc3cf096840fa31923cdebbfe790f34f99eb4041652d60e7be2795dd37de52 WHIRLPOOL 0449cea470386a2aadfe3a44e7aff59a3e710aa557dc25760dfcb6b59f98302216d15c4935397c38aed015be4d097e9719cadc98142864230d9bcfac9017604a
+MISC ChangeLog-2015 43213 SHA256 9fc790211b1c5ceeaf32fd859f9932dc4ddc452f7b54a5a7d52aef4627fe37bc SHA512 b7214b158c935dd7a5072eabed9717a756062bac87db70b34e756ca6cf20a655af589acbc7b13d90f3c9396794a580741b9ca8a407f3457938a13549a3277f8c WHIRLPOOL ff154647150d1c6409eee72c2b7eb08297a93f1a68c4f1d69be27105e70d2e4009f9763e306731f5fcd85aa60f08325c583073b33e35b3b3db0aaaa9d2f3bfbb
+MISC metadata.xml 2243 SHA256 3e1e0a6a9490585ed6f600e307b58a17faed88855cefdea806a845431a8cdcf1 SHA512 1834830ffacc66c508b0eb5c8897957d4f22d9cdb66176dfdd2c9fa17542561330bbec428658d8677db21ad2e05ebdb166912cbc799d27b24e94ff5b8477ef53 WHIRLPOOL 87907fd500244d3d05f95a8af20eb860b677374630f16917d6a3cf7f21606be0f1e83290931f458b6b16428023b0e53e190a7b3e7dfe48935a78da905c48cb65
diff --git a/media-gfx/graphviz/files/graphviz-2.34.0-Xaw-configure.patch b/media-gfx/graphviz/files/graphviz-2.34.0-Xaw-configure.patch
new file mode 100644
index 000000000000..2283cc5dab40
--- /dev/null
+++ b/media-gfx/graphviz/files/graphviz-2.34.0-Xaw-configure.patch
@@ -0,0 +1,81 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -560,8 +560,8 @@
+ use_xlib="Yes"
+ #no x11.pc on centos4
+ # PKG_CHECK_MODULES(X11, [x11])
+- PKG_CHECK_MODULES(XRENDER, [xrender],HAVE_XRENDER="yes" ,HAVE_XRENDER="no")
+ fi
++PKG_CHECK_MODULES(XRENDER, [xrender],HAVE_XRENDER="yes" ,HAVE_XRENDER="no")
+ AM_CONDITIONAL(WITH_X, [test "x$use_xlib" = "xYes"])
+ AM_CONDITIONAL(WITH_XRENDER, [test "x$,HAVE_XRENDER" = "xyes"])
+
+@@ -1924,6 +1924,10 @@
+ # so we set HAVE_LIBXPMFORLEFTY instead of the usual HAVE_LIBXPM
+ #
+
++AC_ARG_WITH(lefty,
++ [AS_HELP_STRING([--with-lefty=yes],[build lefty])],
++ [],[with_xaw=yes])
++
+ AC_ARG_WITH(Xpmincludedir,
+ [AS_HELP_STRING([--with-Xpmincludedir=DIR],[use Xpm includes from DIR])],
+ [XPM_INCLUDES="-I$withval"])
+@@ -1931,6 +1935,17 @@
+ [AS_HELP_STRING([--with-Xpmlibdir=DIR],[use Xpm libraries from DIR])],
+ [XPM_LIBS="-L$withval"])
+
++AC_ARG_WITH(Xawincludedir,
++ [AS_HELP_STRING([--with-Xawincludedir=DIR],[use Xaw includes from DIR])],
++ [XAW_INCLUDES="-I$withval"])
++AC_ARG_WITH(Xawlibdir,
++ [AS_HELP_STRING([--with-Xawlibdir=DIR],[use Xaw libraries from DIR])],
++ [XAW_LIBS="-L$withval"])
++
++if test "x$with_xaw" != "xyes"; then
++ use_lefty="No (disabled)"
++else
++
+ save_CPPFLAGS=$CPPFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CPPFLAGS="$CPPFLAGS $XPM_INCLUDES $X_CFLAGS"
+@@ -1941,18 +1956,10 @@
+ AC_MSG_WARN(Optional Xpm library not available), [-lXmu -lXt -lX11 -lXext $SOCKET_LIBS])
+ LDFLAGS=$save_LDFLAGS
+ CPPFLAGS=$save_CPPFLAGS
+-AC_SUBST([XPM_INCLUDES])
+-AC_SUBST([XPM_LIBS])
+
+ dnl -----------------------------------
+ dnl INCLUDES and LIBS for XAW
+
+-AC_ARG_WITH(Xawincludedir,
+- [AS_HELP_STRING([--with-Xawincludedir=DIR],[use Xaw includes from DIR])],
+- [XAW_INCLUDES="-I$withval"])
+-AC_ARG_WITH(Xawlibdir,
+- [AS_HELP_STRING([--with-Xawlibdir=DIR],[use Xaw libraries from DIR])],
+- [XAW_LIBS="-L$withval"])
+ save_CPPFLAGS=$CPPFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CPPFLAGS="$CPPFLAGS $XAW_INCLUDES $X_CFLAGS"
+@@ -1978,12 +1985,17 @@
+ fi
+ LDFLAGS=$save_LDFLAGS
+ CPPFLAGS=$save_CPPFLAGS
++
++fi
++
++AC_SUBST([XPM_INCLUDES])
++AC_SUBST([XPM_LIBS])
+ AC_SUBST([XAW_INCLUDES])
+ AC_SUBST([XAW_LIBS])
+-AM_CONDITIONAL(WITH_XAW, [test "x$with_xaw" != "xno"])
+-if test "x$with_xaw" = "xno"; then
++AM_CONDITIONAL(WITH_XAW, [test "x$with_xaw" = "xyes"])
++if test "x$with_xaw" != "xyes"; then
+ if test "x$no_x" != "xyes"; then
+- AC_MSG_WARN(Lefty cannot be built)
++ AC_MSG_WARN(Lefty will not be built)
+ fi
+ fi
+
diff --git a/media-gfx/graphviz/files/graphviz-2.34.0-dot-pangocairo-link.patch b/media-gfx/graphviz/files/graphviz-2.34.0-dot-pangocairo-link.patch
new file mode 100644
index 000000000000..df5ea34d3297
--- /dev/null
+++ b/media-gfx/graphviz/files/graphviz-2.34.0-dot-pangocairo-link.patch
@@ -0,0 +1,17 @@
+--- a/cmd/dot/Makefile.am
++++ b/cmd/dot/Makefile.am
+@@ -115,12 +115,8 @@
+ dot_static_LDADD += $(top_builddir)/plugin/webp/.libs/libgvplugin_webp_C.a $(WEBP_LIBS)
+ dot_builtins_LDADD += $(top_builddir)/plugin/webp/libgvplugin_webp.la $(WEBP_LIBS)
+ endif
+-dot_static_LDADD += $(top_builddir)/plugin/pango/.libs/libgvplugin_pango_C.a $(PANGOCAIRO_LIBS)
+-dot_builtins_LDADD += $(top_builddir)/plugin/pango/libgvplugin_pango.la $(PANGOCAIRO_LIBS)
+-if WITH_WEBP
+-dot_static_LDADD += $(top_builddir)/plugin/webp/.libs/libgvplugin_webp_C.a $(WEBP_LIBS)
+-dot_builtins_LDADD += $(top_builddir)/plugin/webp/libgvplugin_webp.la $(WEBP_LIBS)
+-endif
++dot_static_LDADD += $(top_builddir)/plugin/pango/.libs/libgvplugin_pango_C.a $(PANGOCAIRO_LIBS) $(PANGOFT2_LIBS)
++dot_builtins_LDADD += $(top_builddir)/plugin/pango/libgvplugin_pango.la $(PANGOCAIRO_LIBS) $(PANGOFT2_LIBS)
+ endif
+
+ if WITH_LASI
diff --git a/media-gfx/graphviz/files/graphviz-2.38.0-ghostscript-9.18.patch b/media-gfx/graphviz/files/graphviz-2.38.0-ghostscript-9.18.patch
new file mode 100644
index 000000000000..9d0d78a1580a
--- /dev/null
+++ b/media-gfx/graphviz/files/graphviz-2.38.0-ghostscript-9.18.patch
@@ -0,0 +1,32 @@
+From 8da53964edec8a665c3996d483df243eb150c2c4 Mon Sep 17 00:00:00 2001
+From: Jakob Nixdorf <flocke@shadowice.org>
+Date: Fri, 22 Jan 2016 20:10:42 +0100
+Subject: [PATCH] Fix build with ghostscript-9.18.
+
+--- a/plugin/gs/gvloadimage_gs.c
++++ b/plugin/gs/gvloadimage_gs.c
+@@ -32,6 +32,24 @@
+ #include <ghostscript/ierrors.h>
+ #include <cairo/cairo.h>
+
++
++/**
++ * Ensure compatibility with Ghostscipt versions newer than 9.18
++ * while maintaining compatibility with the older versions.
++ **/
++
++#ifndef e_VMerror
++#define e_VMerror gs_error_VMerror
++#endif
++
++#ifndef e_unregistered
++#define e_unregistered gs_error_unregistered
++#endif
++
++#ifndef e_invalidid
++#define e_invalidid gs_error_invalidid
++#endif
++
+ #ifdef WIN32
+ #define NUL_FILE "nul"
+ #else
diff --git a/media-gfx/graphviz/graphviz-2.38.0-r1.ebuild b/media-gfx/graphviz/graphviz-2.38.0-r1.ebuild
new file mode 100644
index 000000000000..435949e5f477
--- /dev/null
+++ b/media-gfx/graphviz/graphviz-2.38.0-r1.ebuild
@@ -0,0 +1,267 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils flag-o-matic java-pkg-opt-2 multilib python-single-r1 qmake-utils
+
+DESCRIPTION="Open Source Graph Visualization Software"
+HOMEPAGE="http://www.graphviz.org/"
+SRC_URI="http://www.graphviz.org/pub/graphviz/stable/SOURCES/${P}.tar.gz"
+
+LICENSE="CPL-1.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="+cairo devil doc examples gdk-pixbuf gtk gts guile java lasi nls pdf perl postscript python qt4 ruby svg static-libs tcl X elibc_FreeBSD"
+
+# Requires ksh
+RESTRICT="test"
+
+RDEPEND="
+ sys-libs/zlib
+ >=dev-libs/expat-2
+ >=dev-libs/glib-2.11.1:2
+ dev-libs/libltdl:0
+ >=media-libs/fontconfig-2.3.95
+ >=media-libs/freetype-2.1.10
+ >=media-libs/gd-2.0.34:=[fontconfig,jpeg,png,truetype,zlib]
+ >=media-libs/libpng-1.2:0
+ !<=sci-chemistry/cluster-1.3.081231
+ virtual/jpeg:0
+ virtual/libiconv
+ X? (
+ x11-libs/libXaw
+ x11-libs/libX11
+ x11-libs/libXmu
+ x11-libs/libXpm
+ x11-libs/libXt
+ )
+ cairo? (
+ >=x11-libs/pango-1.12
+ >=x11-libs/cairo-1.1.10[svg]
+ )
+ devil? ( media-libs/devil[png,jpeg] )
+ postscript? ( app-text/ghostscript-gpl )
+ gtk? ( x11-libs/gtk+:2 )
+ gts? ( sci-libs/gts )
+ lasi? ( media-libs/lasi )
+ pdf? ( app-text/poppler )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ )
+ ruby? ( dev-lang/ruby:* )
+ svg? ( gnome-base/librsvg )
+ tcl? ( >=dev-lang/tcl-8.3:0= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/flex
+ sys-devel/libtool
+ guile? ( dev-scheme/guile dev-lang/swig )
+ java? ( >=virtual/jdk-1.5 dev-lang/swig )
+ nls? ( >=sys-devel/gettext-0.14.5 )
+ perl? ( dev-lang/swig )
+ python? ( dev-lang/swig )
+ ruby? ( dev-lang/swig )
+ tcl? ( dev-lang/swig )"
+REQUIRED_USE="
+ !cairo? ( !X !gtk !postscript !lasi )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+# Dependency description / Maintainer-Info:
+
+# Rendering is done via the following plugins (/plugins):
+# - core, dot_layout, neato_layout, gd , dot
+# the ones which are always compiled in, depend on zlib, gd
+# - gtk
+# Directly depends on gtk-2.
+# needs 'pangocairo' enabled in graphviz configuration
+# gtk-2 depends on pango, cairo and libX11 directly.
+# - gdk-pixbuf
+# Disabled, GTK-1 junk.
+# - glitz
+# Disabled, no particular reason
+# needs 'pangocairo' enabled in graphviz configuration
+# - ming
+# flash plugin via -Tswf requires media-libs/ming-0.4. Disabled as it's
+# incomplete.
+# - cairo/pango:
+# Needs pango for text layout, uses cairo methods to draw stuff
+# - xlib:
+# needs cairo+pango,
+# can make use of gnomeui and inotify support (??? unsure),
+# needs libXaw for UI
+# UI also links directly against libX11, libXmu, and libXt
+# and uses libXpm if available so we make sure it always is
+
+# There can be swig-generated bindings for the following languages (/tclpkg/gv):
+# - c-sharp (disabled)
+# - scheme (enabled via guile) ... no longer broken on ~x86
+# - io (disabled)
+# - java (enabled via java) *2
+# - lua (enabled via lua)
+# - ocaml (enabled via ocaml)
+# - perl (enabled via perl) *1
+# - php (enabled via php) *2
+# - python (enabled via python) *1
+# - ruby (enabled via ruby) *1
+# - tcl (enabled via tcl)
+# *1 = The ${P}-bindings.patch takes care that those bindings are installed to the right location
+# *2 = Those bindings don't build because the paths for the headers/libs aren't
+# detected correctly and/or the options passed to swig are wrong (-php instead of -php4/5)
+
+# There are several other tools in /tclpkg:
+# gdtclft, tcldot, tclhandle, tclpathplan, tclstubs ; enabled with: --with-tcl
+# tkspline, tkstubs ; enabled with: --with-tk
+
+# And the commands (/cmd):
+# - dot, dotty, gvedit, gvpr, lefty, lneato, smyrna, tools/* :)
+# sci-libs/gts can be used for some of these
+# - lefty:
+# needs Xaw and X to build
+# - gvedit (via 'qt4'):
+# based on ./configure it needs qt-core and qt-gui only
+# - smyrna : experimental opengl front-end (via 'smyrna')
+# currently disabled -- it segfaults a lot
+# needs x11-libs/gtkglext, gnome-base/libglade, media-libs/freeglut
+# sci-libs/gts, x11-libs/gtk. Also needs 'gtk','glade','glut','gts' and 'png'
+# with flags enabled at configure time
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-2.34.0-Xaw-configure.patch \
+ "${FILESDIR}"/${PN}-2.34.0-dot-pangocairo-link.patch \
+ "${FILESDIR}"/${PN}-2.38.0-ghostscript-9.18.patch
+
+ # ToDo: Do the same thing for examples and/or
+ # write a patch for a configuration-option
+ # and send it to upstream
+ # note - the longer sed expression removes multi-line assignments that are extended via '\'
+ if ! use doc ; then
+ find . -iname Makefile.am \
+ | xargs sed -i -e '/^\(html\|pdf\)_DATA.*\\[[:space:]]*$/{:m;N;s/\\\n//;tm;d}' \
+ -e '/^\(html\|pdf\)_DATA/d' || die
+ fi
+
+ # This is an old version of libtool
+ # use the ./configure option to exclude its use, and
+ # delete the dir since we don't need to eautoreconf it
+ rm -rf libltdl || die
+
+ # no nls, no gettext, no iconv macro, so disable it
+ use nls || { sed -i -e '/^AM_ICONV/d' configure.ac || die; }
+
+ # Nuke the dead symlinks for the bindings
+ sed -i -e '/$(pkgluadir)/d' tclpkg/gv/Makefile.am || die
+
+ # replace the whitespace with tabs
+ sed -i -e 's: :\t:g' doc/info/Makefile.am || die
+
+ # use correct version of qmake. bug #567236
+ sed -i -e "/AC_CHECK_PROGS(QMAKE/a AC_SUBST(QMAKE,$(qt4_get_bindir)/qmake)" configure.ac || die
+
+ # workaround for http://www.graphviz.org/mantisbt/view.php?id=1895
+ use elibc_FreeBSD && append-flags $(test-flags -fno-builtin-sincos)
+
+ use java && append-cppflags $(java-pkg_get-jni-cflags)
+
+ eautoreconf
+}
+
+src_configure() {
+ # libtool file collision, bug 276609
+ local myconf="--without-included-ltdl --disable-ltdl-install"
+
+ myconf="${myconf}
+ $(use_with cairo pangocairo)
+ $(use_with devil)
+ $(use_with gtk)
+ $(use_with gts)
+ $(use_with qt4 qt)
+ $(use_with lasi)
+ $(use_with pdf poppler)
+ $(use_with postscript ghostscript)
+ $(use_with svg rsvg)
+ $(use_with X x)
+ $(use_with X xaw)
+ $(use_with X lefty)
+ --with-digcola
+ --with-fontconfig
+ --with-freetype2
+ --with-ipsepcola
+ --with-libgd
+ --with-sfdp
+ $(use_enable gdk-pixbuf)
+ --without-ming"
+
+ # new/experimental features, to be tested, disable for now
+ myconf="${myconf}
+ --with-cgraph
+ --without-glitz
+ --without-ipsepcola
+ --without-smyrna
+ --without-visio"
+
+ # Bindings:
+ myconf="${myconf}
+ $(use_enable guile)
+ --disable-io
+ $(use_enable java)
+ --disable-lua
+ --disable-ocaml
+ $(use_enable perl)
+ --disable-php
+ $(use_enable python)
+ --disable-r
+ $(use_enable ruby)
+ --disable-sharp
+ $(use_enable tcl)"
+
+ econf \
+ --enable-ltdl \
+ --disable-silent-rules \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+src_install() {
+ sed -i -e "s:htmldir:htmlinfodir:g" doc/info/Makefile || die
+
+ emake DESTDIR="${D}" \
+ txtdir="${EPREFIX}"/usr/share/doc/${PF} \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ htmlinfodir="${EPREFIX}"/usr/share/doc/${PF}/html/info \
+ pdfdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \
+ pkgconfigdir="${EPREFIX}"/usr/$(get_libdir)/pkgconfig \
+ install
+
+ use examples || rm -rf "${ED}"/usr/share/graphviz/demo
+
+ use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
+
+ dodoc AUTHORS ChangeLog NEWS README
+
+ use python && python_optimize \
+ "${D}$(python_get_sitedir)" \
+ "${D}/usr/$(get_libdir)/graphviz/python"
+}
+
+pkg_postinst() {
+ # This actually works if --enable-ltdl is passed
+ # to configure
+ dot -c
+}
+
+pkg_postrm() {
+ # Remove cruft, bug #547344
+ rm -f "${EROOT}usr/lib/graphviz/config{,6}"
+}
diff --git a/media-gfx/graphviz/graphviz-2.40.1.ebuild b/media-gfx/graphviz/graphviz-2.40.1.ebuild
new file mode 100644
index 000000000000..5d3f2809fa6a
--- /dev/null
+++ b/media-gfx/graphviz/graphviz-2.40.1.ebuild
@@ -0,0 +1,275 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils flag-o-matic java-pkg-opt-2 multilib python-single-r1 qmake-utils
+
+DESCRIPTION="Open Source Graph Visualization Software"
+HOMEPAGE="http://www.graphviz.org/ https://github.com/ellson/graphviz"
+SRC_URI="http://www.graphviz.org/pub/graphviz/stable/SOURCES/${P}.tar.gz"
+
+LICENSE="CPL-1.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="+cairo devil doc examples gdk-pixbuf gtk gts guile java lasi nls pdf perl postscript python qt4 ruby svg static-libs tcl X elibc_FreeBSD"
+
+# Requires ksh
+RESTRICT="test"
+
+RDEPEND="
+ sys-libs/zlib
+ >=dev-libs/expat-2
+ >=dev-libs/glib-2.11.1:2
+ dev-libs/libltdl:0
+ >=media-libs/fontconfig-2.3.95
+ >=media-libs/freetype-2.1.10
+ >=media-libs/gd-2.0.34:=[fontconfig,jpeg,png,truetype,zlib]
+ >=media-libs/libpng-1.2:0
+ !<=sci-chemistry/cluster-1.3.081231
+ virtual/jpeg:0
+ virtual/libiconv
+ X? (
+ x11-libs/libXaw
+ x11-libs/libX11
+ x11-libs/libXmu
+ x11-libs/libXpm
+ x11-libs/libXt
+ )
+ cairo? (
+ >=x11-libs/pango-1.12
+ >=x11-libs/cairo-1.1.10[svg]
+ )
+ devil? ( media-libs/devil[png,jpeg] )
+ postscript? ( app-text/ghostscript-gpl )
+ gtk? ( x11-libs/gtk+:2 )
+ gts? ( sci-libs/gts )
+ lasi? ( media-libs/lasi )
+ pdf? ( app-text/poppler )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ )
+ ruby? ( dev-lang/ruby:* )
+ svg? ( gnome-base/librsvg )
+ tcl? ( >=dev-lang/tcl-8.3:0= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/flex
+ sys-devel/libtool
+ guile? ( dev-scheme/guile dev-lang/swig )
+ java? ( >=virtual/jdk-1.5 dev-lang/swig )
+ nls? ( >=sys-devel/gettext-0.14.5 )
+ perl? ( dev-lang/swig )
+ python? ( dev-lang/swig )
+ ruby? ( dev-lang/swig )
+ tcl? ( dev-lang/swig )"
+REQUIRED_USE="
+ !cairo? ( !X !gtk !postscript !lasi )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+# Dependency description / Maintainer-Info:
+
+# Rendering is done via the following plugins (/plugins):
+# - core, dot_layout, neato_layout, gd , dot
+# the ones which are always compiled in, depend on zlib, gd
+# - gtk
+# Directly depends on gtk-2.
+# needs 'pangocairo' enabled in graphviz configuration
+# gtk-2 depends on pango, cairo and libX11 directly.
+# - gdk-pixbuf
+# Disabled, GTK-1 junk.
+# - glitz
+# Disabled, no particular reason
+# needs 'pangocairo' enabled in graphviz configuration
+# - ming
+# flash plugin via -Tswf requires media-libs/ming-0.4. Disabled as it's
+# incomplete.
+# - cairo/pango:
+# Needs pango for text layout, uses cairo methods to draw stuff
+# - xlib:
+# needs cairo+pango,
+# can make use of gnomeui and inotify support (??? unsure),
+# needs libXaw for UI
+# UI also links directly against libX11, libXmu, and libXt
+# and uses libXpm if available so we make sure it always is
+
+# There can be swig-generated bindings for the following languages (/tclpkg/gv):
+# - c-sharp (disabled)
+# - scheme (enabled via guile) ... no longer broken on ~x86
+# - io (disabled)
+# - java (enabled via java) *2
+# - lua (enabled via lua)
+# - ocaml (enabled via ocaml)
+# - perl (enabled via perl) *1
+# - php (enabled via php) *2
+# - python (enabled via python) *1
+# - ruby (enabled via ruby) *1
+# - tcl (enabled via tcl)
+# *1 = The ${P}-bindings.patch takes care that those bindings are installed to the right location
+# *2 = Those bindings don't build because the paths for the headers/libs aren't
+# detected correctly and/or the options passed to swig are wrong (-php instead of -php4/5)
+
+# There are several other tools in /tclpkg:
+# gdtclft, tcldot, tclhandle, tclpathplan, tclstubs ; enabled with: --with-tcl
+# tkspline, tkstubs ; enabled with: --with-tk
+
+# And the commands (/cmd):
+# - dot, dotty, gvedit, gvpr, lefty, lneato, smyrna, tools/* :)
+# sci-libs/gts can be used for some of these
+# - lefty:
+# needs Xaw and X to build
+# - gvedit (via 'qt4'):
+# based on ./configure it needs qt-core and qt-gui only
+# - smyrna : experimental opengl front-end (via 'smyrna')
+# currently disabled -- it segfaults a lot
+# needs x11-libs/gtkglext, gnome-base/libglade, media-libs/freeglut
+# sci-libs/gts, x11-libs/gtk. Also needs 'gtk','glade','glut','gts' and 'png'
+# with flags enabled at configure time
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.34.0-Xaw-configure.patch
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # ToDo: Do the same thing for examples and/or
+ # write a patch for a configuration-option
+ # and send it to upstream
+ # note - the longer sed expression removes multi-line assignments that are extended via '\'
+ if ! use doc ; then
+ find . -iname Makefile.am \
+ | xargs sed -i -e '/^\(html\|pdf\)_DATA.*\\[[:space:]]*$/{:m;N;s/\\\n//;tm;d}' \
+ -e '/^\(html\|pdf\)_DATA/d' || die
+ fi
+
+ # This is an old version of libtool
+ # use the ./configure option to exclude its use, and
+ # delete the dir since we don't need to eautoreconf it
+ rm -r libltdl || die
+
+ # no nls, no gettext, no iconv macro, so disable it
+ if ! use nls ; then
+ sed -i -e '/^AM_ICONV/d' configure.ac || die
+ fi
+
+ # Nuke the dead symlinks for the bindings
+ sed -i -e '/$(pkgluadir)/d' tclpkg/gv/Makefile.am || die
+
+ # replace the whitespace with tabs
+ sed -i -e 's: :\t:g' doc/info/Makefile.am || die
+
+ # use correct version of qmake. bug #567236
+ sed -i -e "/AC_CHECK_PROGS(QMAKE/a AC_SUBST(QMAKE,$(qt4_get_bindir)/qmake)" configure.ac || die
+
+ # workaround for http://www.graphviz.org/mantisbt/view.php?id=1895
+ use elibc_FreeBSD && append-flags $(test-flags -fno-builtin-sincos)
+
+ use java && append-cppflags $(java-pkg_get-jni-cflags)
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ --enable-ltdl
+ --disable-silent-rules
+ $(use_enable static-libs static)
+ )
+
+ # libtool file collision, bug 276609
+ myconf+=( --without-included-ltdl --disable-ltdl-install )
+
+ myconf+=(
+ $(use_with cairo pangocairo)
+ $(use_with devil)
+ $(use_with gtk)
+ $(use_with gts)
+ $(use_with qt4 qt)
+ $(use_with lasi)
+ $(use_with pdf poppler)
+ $(use_with postscript ghostscript)
+ $(use_with svg rsvg)
+ $(use_with X x)
+ $(use_with X xaw)
+ $(use_with X lefty)
+ --with-digcola
+ --with-fontconfig
+ --with-freetype2
+ --with-ipsepcola
+ --with-libgd
+ --with-sfdp
+ $(use_enable gdk-pixbuf)
+ --without-ming
+ )
+
+ # new/experimental features, to be tested, disable for now
+ myconf+=(
+ --with-cgraph
+ --without-glitz
+ --without-ipsepcola
+ --without-smyrna
+ --without-visio
+ )
+
+ # Bindings:
+ myconf+=(
+ $(use_enable guile)
+ --disable-io
+ $(use_enable java)
+ --disable-lua
+ --disable-ocaml
+ $(use_enable perl)
+ --disable-php
+ $(use_enable python)
+ --disable-r
+ $(use_enable ruby)
+ --disable-sharp
+ $(use_enable tcl)
+ )
+
+ econf ${myconf[@]}
+}
+
+src_install() {
+ sed -i -e "s:htmldir:htmlinfodir:g" doc/info/Makefile || die
+
+ emake DESTDIR="${D}" \
+ txtdir="${EPREFIX}"/usr/share/doc/${PF} \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ htmlinfodir="${EPREFIX}"/usr/share/doc/${PF}/html/info \
+ pdfdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \
+ pkgconfigdir="${EPREFIX}"/usr/$(get_libdir)/pkgconfig \
+ install
+
+ use examples || rm -rf "${ED}"/usr/share/graphviz/demo
+
+ use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
+
+ dodoc AUTHORS ChangeLog NEWS README
+
+ use python && python_optimize \
+ "${D}$(python_get_sitedir)" \
+ "${D}/usr/$(get_libdir)/graphviz/python"
+}
+
+pkg_postinst() {
+ # This actually works if --enable-ltdl is passed
+ # to configure
+ dot -c
+}
+
+pkg_postrm() {
+ # Remove cruft, bug #547344
+ rm -f "${EROOT}usr/lib/graphviz/config{,6}"
+}
diff --git a/media-gfx/graphviz/metadata.xml b/media-gfx/graphviz/metadata.xml
new file mode 100644
index 000000000000..73daee8cb67b
--- /dev/null
+++ b/media-gfx/graphviz/metadata.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>graphics@gentoo.org</email>
+ <name>Gentoo Graphics Project</name>
+ </maintainer>
+ <longdescription>
+graphviz is a set of graph drawing tools for Unix or MS-Windows
+(win32), including a web service interface (webdot). Source code and
+binary executables for common platforms are available. Graph drawing
+addresses the problem of visualizing structural information by
+constructing geometric representations of abstract graphs and networks.
+Automatic generation of graph drawings has important applications in key
+technologies such as database design, software engineering, VLSI and
+network design and visual interfaces in other domains. Situations where
+these tools might be particularly useful include:
+
+ * you would like to restructure a program and first need to
+understand the relationships between its types, procedures, and source
+files.
+ * you need to find the bottlenecks in an Internet backbone - not
+only individual links, but their relationships
+ * you're debugging a protocol or microarchitecture represented as a
+finite state machine and need to figure out how a certain
+ error state arises
+ * you would like to browse a database schema, knowledge base, or
+distributed program represented pictorially
+ * you would like to see an overview of a collection of linked
+documents
+ * you would like to discover patterns and communities of interest in
+a database of telephone calls or e-mail messages
+</longdescription>
+ <use>
+ <flag name="devil">Enables DevIL output plugin -Tdevil</flag>
+ <flag name="gdk-pixbuf">Enables gdk-pixbuf2 plugin</flag>
+ <flag name="gtk">Enables gtk+ output plugin -Tgtk (needs cairo)</flag>
+ <flag name="gts">Enables support for gts</flag>
+ <flag name="lasi">
+ Enables PostScript output via <pkg>media-libs/lasi</pkg>, for
+ plugin -Tlasi (needs cairo)
+ </flag>
+ <flag name="qt4">Builds gvedit front-end</flag>
+ <flag name="X">
+ Builds lefty front-end, builds plugin -Txlib, and enables support
+ for x11 in various other modules (needs cairo)
+ </flag>
+ </use>
+</pkgmetadata>