/[gentoo-x86]/media-gfx/graphviz/graphviz-2.26.3-r3.ebuild
Gentoo

Contents of /media-gfx/graphviz/graphviz-2.26.3-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Sat Jul 14 00:17:43 2012 UTC (2 years, 2 months ago) by xarthisius
Branch: MAIN
Changes since 1.11: +2 -2 lines
Add missing dependency on gd[zlib] wrt #406959 by Drake Donahue <donahue95@comcast.net>. Thanks to Benjamin Lamowski <ben-bugs@lamowski.net> for the solution. Drop old

(Portage version: 2.2.0_alpha116/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/graphviz/graphviz-2.26.3-r3.ebuild,v 1.11 2012/05/05 07:00:24 jdhore Exp $
4
5 EAPI=3
6 PYTHON_DEPEND="python? 2"
7
8 inherit eutils autotools multilib python
9
10 DESCRIPTION="Open Source Graph Visualization Software"
11 HOMEPAGE="http://www.graphviz.org/"
12 SRC_URI="http://www.graphviz.org/pub/graphviz/ARCHIVE/${P}.tar.gz"
13
14 LICENSE="CPL-1.0"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris"
17 IUSE="cairo doc examples gtk java lasi nls perl python ruby static-libs tcl"
18
19 # Requires ksh
20 RESTRICT="test"
21
22 RDEPEND="
23 >=dev-libs/expat-2.0.0
24 >=dev-libs/glib-2.11.1
25 >=media-libs/fontconfig-2.3.95
26 >=media-libs/freetype-2.1.10
27 >=media-libs/gd-2.0.28[fontconfig,jpeg,png,truetype,zlib]
28 >=media-libs/libpng-1.4
29 virtual/jpeg
30 virtual/libiconv
31 cairo? (
32 x11-libs/libXaw
33 >=x11-libs/pango-1.12
34 >=x11-libs/cairo-1.1.10[svg]
35 )
36 gtk? (
37 x11-libs/gtk+:2
38 x11-libs/libXaw
39 >=x11-libs/pango-1.12
40 >=x11-libs/cairo-1.1.10
41 )
42 lasi? ( media-libs/lasi )
43 ruby? ( dev-lang/ruby )
44 tcl? ( >=dev-lang/tcl-8.3 )"
45 DEPEND="${RDEPEND}
46 virtual/pkgconfig
47 sys-devel/flex
48 java? ( dev-lang/swig )
49 nls? ( >=sys-devel/gettext-0.14.5 )
50 perl? ( dev-lang/swig )
51 python? ( dev-lang/swig )
52 ruby? ( dev-lang/swig )
53 tcl? ( dev-lang/swig )"
54
55 # Dependency description / Maintainer-Info:
56
57 # Rendering is done via the following plugins (/plugins):
58 # - core, dot_layout, neato_layout, gd , dot
59 # the ones which are always compiled in, depend on zlib, gd
60 # - gtk
61 # Directly depends on gtk-2.
62 # gtk-2 depends on pango, cairo and libX11 directly.
63 # - gdk-pixbuf
64 # Disabled, GTK-1 junk.
65 # - ming
66 # flash plugin via -Tswf requires media-libs/ming-0.4. Disabled as it's
67 # incomplete.
68 # - cairo:
69 # Needs pango for text layout, uses cairo methods to draw stuff
70 # - xlib :
71 # needs cairo+pango,
72 # can make use of gnomeui and inotify support,
73 # needs libXaw for UI
74
75 # There can be swig-generated bindings for the following languages (/tclpkg/gv):
76 # - c-sharp (disabled)
77 # - scheme (enabled via guile) ... broken on ~x86
78 # - io (disabled)
79 # - java (enabled via java) *2
80 # - lua (enabled via lua)
81 # - ocaml (enabled via ocaml)
82 # - perl (enabled via perl) *1
83 # - php (enabled via php) *2
84 # - python (enabled via python) *1
85 # - ruby (enabled via ruby) *1
86 # - tcl (enabled via tcl)
87 # *1 = The ${P}-bindings.patch takes care that those bindings are installed to the right location
88 # *2 = Those bindings don't build because the paths for the headers/libs aren't
89 # detected correctly and/or the options passed to swig are wrong (-php instead of -php4/5)
90
91 # There are several other tools in /tclpkg:
92 # gdtclft, tcldot, tclhandle, tclpathplan, tclstubs ; enabled with: --with-tcl
93 # tkspline, tkstubs ; enabled with: --with-tk
94
95 # And the commands (/cmd):
96 # - dot, dotty, gvpr, lefty, lneato, tools/* :)
97 # Lefty needs Xaw and X to build
98
99 pkg_setup() {
100 if use python; then
101 python_set_active_version 2
102 python_pkg_setup
103 fi
104 }
105
106 src_prepare() {
107 epatch "${FILESDIR}"/${P}-libtool.patch
108
109 # ToDo: Do the same thing for examples and/or
110 # write a patch for a configuration-option
111 # and send it to upstream
112 if ! use doc ; then
113 find . -iname Makefile.am \
114 | xargs sed -i -e '/html_DATA/d' -e '/pdf_DATA/d' || die
115 fi
116
117 # This is an old version of libtool
118 rm -rf libltdl
119 sed -i -e '/libltdl/d' configure.ac || die
120 sed -i -e 's/AC_LIBLTDL_CONVENIENCE/AC_LIBLTDL_INSTALLABLE/' configure.ac || die
121
122 # Update this file from our local libtool which is much newer than the
123 # bundled one. This allows MAKEOPTS=-j2 to work on FreeBSD.
124 if has_version ">=sys-devel/libtool-2" ; then
125 cp "${EPREFIX}"/usr/share/libtool/config/install-sh config || die
126 else
127 cp "${EPREFIX}"/usr/share/libtool/install-sh config || die
128 fi
129
130 # no nls, no gettext, no iconv macro, so disable it
131 use nls || { sed -i -e '/^AM_ICONV/d' configure.ac || die; }
132
133 # Nuke the dead symlinks for the bindings
134 sed -i -e '/$(pkgluadir)/d' tclpkg/gv/Makefile.am || die
135
136 # replace the whitespace with tabs
137 sed -i -e 's: :\t:g' doc/info/Makefile.am || die
138
139 eautoreconf
140 }
141
142 src_configure() {
143 # libtool file collision, bug 276609
144 local myconf="--disable-ltdl-install"
145
146 # Core functionality:
147 # All of X, cairo-output, gtk need the pango+cairo functionality
148 if use gtk || use cairo; then
149 myconf="${myconf} --with-x"
150 else
151 myconf="${myconf} --without-x"
152 fi
153 myconf="${myconf}
154 $(use_with cairo pangocairo)
155 $(use_with gtk)
156 $(use_with lasi)
157 --with-digcola
158 --with-fontconfig
159 --with-freetype2
160 --with-ipsepcola
161 --with-libgd
162 --with-sfdp
163 --without-gdk-pixbuf
164 --without-ming"
165
166 # new/experimental features, to be tested, disable for now
167 myconf="${myconf}
168 --without-cgraph
169 --without-devil
170 --without-digcola
171 --without-ipsepcola
172 --without-rsvg
173 --without-smyrna"
174
175 # Bindings:
176 myconf="${myconf}
177 --disable-guile
178 --disable-io
179 $(use_enable java)
180 --disable-lua
181 --disable-ocaml
182 $(use_enable perl)
183 --disable-php
184 $(use_enable python)
185 --disable-r
186 $(use_enable ruby)
187 --disable-sharp
188 $(use_enable tcl)"
189
190 econf \
191 --enable-ltdl \
192 $(use_enable static-libs static) \
193 ${myconf}
194 }
195
196 src_install() {
197 sed -i -e "s:htmldir:htmlinfodir:g" doc/info/Makefile || die
198
199 emake DESTDIR="${D}" \
200 txtdir="${EPREFIX}"/usr/share/doc/${PF} \
201 htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
202 htmlinfodir="${EPREFIX}"/usr/share/doc/${PF}/html/info \
203 pdfdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \
204 pkgconfigdir="${EPREFIX}"/usr/$(get_libdir)/pkgconfig \
205 install || die "emake install failed"
206
207 use examples || rm -rf "${D}/usr/share/graphviz/demo"
208
209 if ! use static-libs; then
210 find "${ED}"/usr/$(get_libdir)/ -name '*.la' -delete || die
211 fi
212
213 dodoc AUTHORS ChangeLog NEWS README
214 }
215
216 pkg_postinst() {
217 # This actually works if --enable-ltdl is passed
218 # to configure
219 dot -c
220 use python && python_mod_optimize gv.py
221 }
222
223 pkg_postrm() {
224 use python && python_mod_cleanup gv.py
225 }

  ViewVC Help
Powered by ViewVC 1.1.20