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

Contents of /media-gfx/graphviz/graphviz-2.28.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (show annotations) (download)
Tue Aug 7 21:02:58 2012 UTC (2 years, 1 month ago) by aballier
Branch: MAIN
Changes since 1.13: +2 -2 lines
keyword ~amd64-fbsd, bug #419621

(Portage version: 2.2.0_alpha120/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.28.0.ebuild,v 1.13 2012/08/05 18:46:27 armin76 Exp $
4
5 EAPI=4
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 #original 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 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris"
18 IUSE="+cairo devil doc examples gtk gts java lasi nls perl postscript python qt4 ruby svg static-libs tcl X elibc_FreeBSD"
19
20 # Requires ksh
21 RESTRICT="test"
22
23 RDEPEND="
24 sys-libs/zlib
25 >=dev-libs/expat-2
26 >=dev-libs/glib-2.11.1
27 >=media-libs/fontconfig-2.3.95
28 >=media-libs/freetype-2.1.10
29 >=media-libs/gd-2.0.34[fontconfig,jpeg,png,truetype,zlib]
30 >=media-libs/libpng-1.2:0
31 !<=sci-chemistry/cluster-1.3.081231
32 virtual/jpeg
33 virtual/libiconv
34 X? (
35 x11-libs/libXaw
36 x11-libs/libX11
37 x11-libs/libXmu
38 x11-libs/libXpm
39 x11-libs/libXt
40 )
41 cairo? (
42 >=x11-libs/pango-1.12
43 >=x11-libs/cairo-1.1.10[svg]
44 )
45 devil? ( media-libs/devil[png,jpeg] )
46 postscript? ( app-text/ghostscript-gpl )
47 gtk? ( x11-libs/gtk+:2 )
48 gts? ( sci-libs/gts )
49 lasi? ( media-libs/lasi )
50 qt4? (
51 x11-libs/qt-core:4
52 x11-libs/qt-gui:4
53 )
54 ruby? ( dev-lang/ruby )
55 svg? ( gnome-base/librsvg )
56 tcl? ( >=dev-lang/tcl-8.3 )"
57 DEPEND="${RDEPEND}
58 virtual/pkgconfig
59 sys-devel/flex
60 java? ( dev-lang/swig )
61 nls? ( >=sys-devel/gettext-0.14.5 )
62 perl? ( dev-lang/swig )
63 python? ( dev-lang/swig )
64 ruby? ( dev-lang/swig )
65 tcl? ( dev-lang/swig )"
66 REQUIRED_USE="!cairo? ( !X !gtk !postscript !lasi )"
67
68 # Dependency description / Maintainer-Info:
69
70 # Rendering is done via the following plugins (/plugins):
71 # - core, dot_layout, neato_layout, gd , dot
72 # the ones which are always compiled in, depend on zlib, gd
73 # - gtk
74 # Directly depends on gtk-2.
75 # needs 'pangocairo' enabled in graphviz configuration
76 # gtk-2 depends on pango, cairo and libX11 directly.
77 # - gdk-pixbuf
78 # Disabled, GTK-1 junk.
79 # - glitz
80 # Disabled, no particular reason
81 # needs 'pangocairo' enabled in graphviz configuration
82 # - ming
83 # flash plugin via -Tswf requires media-libs/ming-0.4. Disabled as it's
84 # incomplete.
85 # - cairo/pango:
86 # Needs pango for text layout, uses cairo methods to draw stuff
87 # - xlib:
88 # needs cairo+pango,
89 # can make use of gnomeui and inotify support (??? unsure),
90 # needs libXaw for UI
91 # UI also links directly against libX11, libXmu, and libXt
92 # and uses libXpm if available so we make sure it always is
93
94 # There can be swig-generated bindings for the following languages (/tclpkg/gv):
95 # - c-sharp (disabled)
96 # - scheme (enabled via guile) ... broken on ~x86
97 # - io (disabled)
98 # - java (enabled via java) *2
99 # - lua (enabled via lua)
100 # - ocaml (enabled via ocaml)
101 # - perl (enabled via perl) *1
102 # - php (enabled via php) *2
103 # - python (enabled via python) *1
104 # - ruby (enabled via ruby) *1
105 # - tcl (enabled via tcl)
106 # *1 = The ${P}-bindings.patch takes care that those bindings are installed to the right location
107 # *2 = Those bindings don't build because the paths for the headers/libs aren't
108 # detected correctly and/or the options passed to swig are wrong (-php instead of -php4/5)
109
110 # There are several other tools in /tclpkg:
111 # gdtclft, tcldot, tclhandle, tclpathplan, tclstubs ; enabled with: --with-tcl
112 # tkspline, tkstubs ; enabled with: --with-tk
113
114 # And the commands (/cmd):
115 # - dot, dotty, gvedit, gvpr, lefty, lneato, smyrna, tools/* :)
116 # sci-libs/gts can be used for some of these
117 # - lefty:
118 # needs Xaw and X to build
119 # - gvedit (via 'qt4'):
120 # based on ./configure it needs qt-core and qt-gui only
121 # - smyrna : experimental opengl front-end (via 'smyrna')
122 # currently disabled -- it segfaults a lot
123 # needs x11-libs/gtkglext, gnome-base/libglade, media-libs/freeglut
124 # sci-libs/gts, x11-libs/gtk. Also needs 'gtk','glade','glut','gts' and 'png'
125 # with flags enabled at configure time
126
127 pkg_setup() {
128 if use python; then
129 python_set_active_version 2
130 python_pkg_setup
131 fi
132 }
133
134 src_prepare() {
135 epatch \
136 "${FILESDIR}"/${P}-Xaw-configure.patch \
137 "${FILESDIR}"/${P}-automake-1.11.2.patch \
138 "${FILESDIR}"/${P}-dot-pangocairo-link.patch
139
140 # ToDo: Do the same thing for examples and/or
141 # write a patch for a configuration-option
142 # and send it to upstream
143 # note - the longer sed expression removes multi-line assignments that are extended via '\'
144 if ! use doc ; then
145 find . -iname Makefile.am \
146 | xargs sed -i -e '/^\(html\|pdf\)_DATA.*\\[[:space:]]*$/{:m;N;s/\\\n//;tm;d}' \
147 -e '/^\(html\|pdf\)_DATA/d' || die
148 fi
149
150 # This is an old version of libtool
151 # use the ./configure option to exclude its use, and
152 # delete the dir since we don't need to eautoreconf it
153 rm -rf libltdl
154
155 # no nls, no gettext, no iconv macro, so disable it
156 use nls || { sed -i -e '/^AM_ICONV/d' configure.ac || die; }
157
158 # Nuke the dead symlinks for the bindings
159 sed -i -e '/$(pkgluadir)/d' tclpkg/gv/Makefile.am || die
160
161 # replace the whitespace with tabs
162 sed -i -e 's: :\t:g' doc/info/Makefile.am || die
163
164 # workaround for http://www.graphviz.org/mantisbt/view.php?id=1895
165 use elibc_FreeBSD && append-flags $(test-flags -fno-builtin-sincos)
166
167 eautoreconf
168 }
169
170 src_configure() {
171 # libtool file collision, bug 276609
172 local myconf="--without-included-ltdl --disable-ltdl-install"
173
174 myconf="${myconf}
175 $(use_with cairo pangocairo)
176 $(use_with devil)
177 $(use_with gtk)
178 $(use_with gts)
179 $(use_with qt4)
180 $(use_with lasi)
181 $(use_with svg rsvg)
182 $(use_with X x)
183 $(use_with X xaw)
184 $(use_with X lefty)
185 --with-digcola
186 --with-fontconfig
187 --with-freetype2
188 --with-ipsepcola
189 --with-libgd
190 --with-sfdp
191 --without-gdk-pixbuf
192 --without-ming"
193
194 # new/experimental features, to be tested, disable for now
195 myconf="${myconf}
196 --without-cgraph
197 --without-glitz
198 --without-ipsepcola
199 --without-smyrna
200 --without-visio"
201
202 # Bindings:
203 myconf="${myconf}
204 --disable-guile
205 --disable-io
206 $(use_enable java)
207 --disable-lua
208 --disable-ocaml
209 $(use_enable perl)
210 --disable-php
211 $(use_enable python)
212 --disable-r
213 $(use_enable ruby)
214 --disable-sharp
215 $(use_enable tcl)"
216
217 econf \
218 --enable-ltdl \
219 --disable-silent-rules \
220 $(use_enable static-libs static) \
221 ${myconf}
222 }
223
224 src_install() {
225 sed -i -e "s:htmldir:htmlinfodir:g" doc/info/Makefile || die
226
227 emake DESTDIR="${D}" \
228 txtdir="${EPREFIX}"/usr/share/doc/${PF} \
229 htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
230 htmlinfodir="${EPREFIX}"/usr/share/doc/${PF}/html/info \
231 pdfdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \
232 pkgconfigdir="${EPREFIX}"/usr/$(get_libdir)/pkgconfig \
233 install
234
235 use examples || rm -rf "${ED}"/usr/share/graphviz/demo
236
237 use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
238
239 dodoc AUTHORS ChangeLog NEWS README
240 }
241
242 pkg_postinst() {
243 # This actually works if --enable-ltdl is passed
244 # to configure
245 dot -c
246 use python && python_mod_optimize gv.py
247 }
248
249 pkg_postrm() {
250 use python && python_mod_cleanup gv.py
251 }

  ViewVC Help
Powered by ViewVC 1.1.20