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

Contents of /media-gfx/graphviz/graphviz-2.26.3-r4.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, 5 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-r4.ebuild,v 1.11 2012/07/01 18:14:39 armin76 Exp $
4
5 EAPI=3
6 PYTHON_DEPEND="python? 2"
7
8 inherit eutils autotools multilib python flag-o-matic
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 ~amd64-fbsd ~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 elibc_FreeBSD"
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 \
108 "${FILESDIR}"/${P}-libtool.patch \
109 "${FILESDIR}"/${P}-automake-1.11.2.patch
110
111 # ToDo: Do the same thing for examples and/or
112 # write a patch for a configuration-option
113 # and send it to upstream
114 if ! use doc ; then
115 find . -iname Makefile.am \
116 | xargs sed -i -e '/html_DATA/d' -e '/pdf_DATA/d' || die
117 fi
118
119 # This is an old version of libtool
120 rm -rf libltdl
121 sed -i -e '/libltdl/d' configure.ac || die
122 sed -i -e 's/AC_LIBLTDL_CONVENIENCE/AC_LIBLTDL_INSTALLABLE/' configure.ac || die
123
124 # Update this file from our local libtool which is much newer than the
125 # bundled one. This allows MAKEOPTS=-j2 to work on FreeBSD.
126 if has_version ">=sys-devel/libtool-2" ; then
127 cp "${EPREFIX}"/usr/share/libtool/config/install-sh config || die
128 else
129 cp "${EPREFIX}"/usr/share/libtool/install-sh config || die
130 fi
131
132 # no nls, no gettext, no iconv macro, so disable it
133 use nls || { sed -i -e '/^AM_ICONV/d' configure.ac || die; }
134
135 # Nuke the dead symlinks for the bindings
136 sed -i -e '/$(pkgluadir)/d' tclpkg/gv/Makefile.am || die
137
138 # replace the whitespace with tabs
139 sed -i -e 's: :\t:g' doc/info/Makefile.am || die
140
141 # workaround for http://www.graphviz.org/mantisbt/view.php?id=1895
142 use elibc_FreeBSD && append-flags $(test-flags -fno-builtin-sincos)
143
144 eautoreconf
145 }
146
147 src_configure() {
148 # libtool file collision, bug 276609
149 local myconf="--disable-ltdl-install"
150
151 # Core functionality:
152 # All of X, cairo-output, gtk need the pango+cairo functionality
153 if use gtk || use cairo; then
154 myconf="${myconf} --with-x"
155 else
156 myconf="${myconf} --without-x"
157 fi
158 myconf="${myconf}
159 $(use_with cairo pangocairo)
160 $(use_with gtk)
161 $(use_with lasi)
162 --with-digcola
163 --with-fontconfig
164 --with-freetype2
165 --with-ipsepcola
166 --with-libgd
167 --with-sfdp
168 --without-gdk-pixbuf
169 --without-ming"
170
171 # new/experimental features, to be tested, disable for now
172 myconf="${myconf}
173 --without-cgraph
174 --without-devil
175 --without-digcola
176 --without-ipsepcola
177 --without-rsvg
178 --without-smyrna"
179
180 # Bindings:
181 myconf="${myconf}
182 --disable-guile
183 --disable-io
184 $(use_enable java)
185 --disable-lua
186 --disable-ocaml
187 $(use_enable perl)
188 --disable-php
189 $(use_enable python)
190 --disable-r
191 $(use_enable ruby)
192 --disable-sharp
193 $(use_enable tcl)"
194
195 econf \
196 --enable-ltdl \
197 $(use_enable static-libs static) \
198 ${myconf}
199 }
200
201 src_install() {
202 sed -i -e "s:htmldir:htmlinfodir:g" doc/info/Makefile || die
203
204 emake DESTDIR="${D}" \
205 txtdir="${EPREFIX}"/usr/share/doc/${PF} \
206 htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
207 htmlinfodir="${EPREFIX}"/usr/share/doc/${PF}/html/info \
208 pdfdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \
209 pkgconfigdir="${EPREFIX}"/usr/$(get_libdir)/pkgconfig \
210 install || die "emake install failed"
211
212 use examples || rm -rf "${D}/usr/share/graphviz/demo"
213
214 if ! use static-libs; then
215 find "${ED}"/usr/$(get_libdir)/ -name '*.la' -delete || die
216 fi
217
218 dodoc AUTHORS ChangeLog NEWS README
219 }
220
221 pkg_postinst() {
222 # This actually works if --enable-ltdl is passed
223 # to configure
224 dot -c
225 use python && python_mod_optimize gv.py
226 }
227
228 pkg_postrm() {
229 use python && python_mod_cleanup gv.py
230 }

  ViewVC Help
Powered by ViewVC 1.1.20