source: trunk/dports/graphics/graphviz/Portfile @ 44608

Last change on this file since 44608 was 44608, checked in by ryandesign@…, 9 years ago

glib2, glib2-devel, graphviz, graphviz-devel, libiconv: Remove setting of MACOSX_DEPLOYMENT_TARGET which MacPorts 1.7.0 now takes care of for us.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 8.5 KB
Line 
1# $Id: Portfile 44608 2008-12-31 07:31:45Z ryandesign@macports.org $
2
3PortSystem              1.0
4
5name                    graphviz
6set my_name             graphviz
7version                 2.20.3
8categories              graphics
9maintainers             ryandesign
10homepage                http://www.graphviz.org/
11platforms               darwin
12use_parallel_build      yes
13dist_subdir             ${my_name}
14distname                ${my_name}-${version}
15distfiles               ${distname}${extract.suffix}:source
16
17description \
18    Graph visualization software from AT&T and Bell Labs
19
20long_description \
21    Graph Visualization Software from AT&T Laboratories and \
22    Bell Laboratories (Lucent Technologies). \
23    The package contains: \
24        dot    - batch program for drawing directed graphs as \
25         hierarchies \
26        neato  - batch program for drawing undirected graphs \
27         using Kamada-Kawai spring models. \
28    Users wishing to have only the graph layout \
29    programs (for non-interactive use) can use the +no_x11 \
30    variant to build graphviz without its display routines.
31
32master_sites \
33    ${homepage}pub/graphviz/stable/SOURCES/:source \
34    http://www.pixelglow.com/downloads/:guiapp
35
36checksums \
37    ${distname}${extract.suffix} \
38        md5     4d94c4b809a5c095acfc973d8d207fa9 \
39        sha1    63ae6bdb6b410387477d339225cc4f61c2bc7322 \
40        rmd160  64c80f3af55668e487f911132407c332c3c38e87
41
42platform darwin 6 {
43    pre-fetch {
44        ui_msg "Note: dot2gxl and gxl2dot do not build on Mac OS X 10.2 Jaguar,"
45        ui_msg "but the rest of Graphviz should work correctly."
46    }
47    patchfiles-append \
48        patch-Makefile.in
49}
50
51platform darwin 7 {
52    depends_lib-append \
53        port:gnuregex
54    post-extract {
55        reinplace "s|<regex.h>|<gnuregex.h>|g" ${worksrcpath}/lib/gvc/gvconfig.c
56    }
57}
58
59platform darwin 9 {
60    # http://developer.apple.com/qa/qa2007/qa1567.html
61    configure.ldflags-append \
62        "-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
63}
64
65depends_lib \
66    lib:libX11.6:XFree86 \
67    port:cairo \
68    path:lib/pkgconfig/pango.pc:pango \
69    port:jpeg \
70    port:libpng \
71    port:freetype \
72    port:expat \
73    port:zlib \
74    port:gettext
75
76depends_build \
77    port:pkgconfig
78
79depends_run \
80    port:urw-fonts
81
82configure.args \
83    --mandir=${prefix}/share/man \
84    --with-codegens \
85    --with-x \
86    --without-devil \
87    --without-smyrna \
88    --with-digcola \
89    --without-ipsepcola \
90    --without-rsvg \
91    --with-pangocairo \
92    --with-freetype2 \
93    --with-fontconfig \
94    --without-gdk-pixbuf \
95    --without-gtk \
96    --without-gtkgl \
97    --without-gtkglext \
98    --without-glade \
99    --without-gnomeui \
100    --without-ming \
101    --without-quartz \
102    --with-mylibgd \
103    --disable-swig \
104    --disable-sharp \
105    --disable-guile \
106    --disable-io \
107    --disable-java \
108    --disable-lua \
109    --disable-ocaml \
110    --disable-perl \
111    --disable-php \
112    --disable-python \
113    --disable-python23 \
114    --disable-python24 \
115    --disable-python25 \
116    --disable-r \
117    --disable-ruby \
118    --disable-tcl
119
120variant guile description {Include Guile language bindings} {
121    depends_lib-append \
122        port:guile
123    depends_build-append \
124        port:swig
125    configure.args-delete \
126        --disable-swig \
127        --disable-guile
128    configure.args-append \
129        --enable-guile
130}
131
132variant lua description {Include Lua language bindings} {
133    depends_lib-append \
134        port:lua
135    depends_build-append \
136        port:swig
137    configure.args-delete \
138        --disable-swig \
139        --disable-lua
140    configure.args-append \
141        --enable-lua
142}
143
144variant ocaml description {Include Objective Caml language bindings} {
145    depends_lib-append \
146        port:ocaml
147    depends_build-append \
148        port:swig
149    configure.args-delete \
150        --disable-swig \
151        --disable-ocaml
152    configure.args-append \
153        --enable-ocaml
154}
155
156variant perl description {Include PERL 5 language bindings} {
157    depends_lib-append \
158        path:bin/perl:perl5.8
159    depends_build-append \
160        port:swig
161    configure.args-delete \
162        --disable-swig \
163        --disable-perl
164    configure.args-append \
165        --enable-perl
166}
167
168variant php description {Include PHP 4 language bindings} {
169    depends_lib-append \
170        port:php4
171    depends_build-append \
172        port:swig
173    configure.args-delete \
174        --disable-swig \
175        --disable-php
176    configure.args-append \
177        --enable-php
178}
179
180variant python description {Include Python 2.4 language bindings} {
181    depends_lib-append \
182        port:python24
183    depends_build-append \
184        port:swig
185    configure.args-delete \
186        --disable-swig \
187        --disable-python
188    configure.args-append \
189        --enable-python
190}
191
192variant ruby description {Include Ruby language bindings} {
193    depends_lib-append \
194        port:ruby
195    depends_build-append \
196        port:swig
197    configure.args-delete \
198        --disable-swig \
199        --disable-ruby
200    configure.args-append \
201        --enable-ruby
202}
203
204variant tcl description {Include Tcl language bindings} {
205    depends_lib-append \
206        port:tcl
207    depends_build-append \
208        port:swig
209    configure.args-delete \
210        --disable-swig \
211        --disable-tcl
212    configure.args-append \
213        --enable-tcl
214}
215
216variant smyrna description {Include the Smyrna large graph viewer} {
217    configure.args-delete \
218        --without-smyrna \
219        --without-gtk \
220        --without-gtkglext \
221        --without-glade
222    configure.args-append \
223        --with-smyrna \
224        --with-gtk \
225        --with-gtkglext \
226        --with-glade
227    depends_lib-append \
228        port:gtk2 \
229        port:gtkglext \
230        port:libglade2
231}
232
233variant no_pangocairo description {Remove pangocairo support (no antialiased bitmapped output; no PDF output)} {
234    depends_lib-delete \
235        port:cairo \
236        port:pango
237    configure.args-delete \
238        --with-pangocairo
239    configure.args-append \
240        --without-pangocairo
241}
242
243variant no_x11 requires no_pangocairo description {Remove X11 support (removes lefty; implies no_pangocairo)} {
244    depends_lib-delete \
245        lib:libX11.6:XFree86
246    configure.args-append \
247        --without-x
248}
249
250# Can be removed once MacPorts 1.7.0 is released
251if {![info exists applications_dir]} {
252    set applications_dir /Applications/MacPorts
253}
254
255variant gui description {Include the Pixelglow graph viewer} {
256    distfiles-append \
257        graphviz-1.13-v16.tgz:guiapp
258    checksums-append \
259        graphviz-1.13-v16.tgz \
260            md5 a3278f993ef3ce021043a17b16a9fd5f \
261            sha1 87ee05a99088a98aef4937d72c3bb6cf488e3074 \
262            rmd160 35eac7c7013bddc0d1f107fcaf8e9c7d1e078231
263    post-extract {
264        copy "${workpath}/Graphviz 1.13 (v16)/Graphviz.app" ${worksrcpath}
265        delete ${worksrcpath}/Graphviz.app/Contents/Frameworks
266        system "cd ${worksrcpath}/Graphviz.app/Contents/Resources/English.lproj && iconv -f utf-16 -t utf-8 InfoPlist.strings > InfoPlist.strings.utf8"
267    }
268    patchfiles-append \
269        patch-gv-extension.diff
270    post-patch {
271        reinplace "s|1\.13|${version}|g" \
272            ${worksrcpath}/Graphviz.app/Contents/Info.plist \
273            ${worksrcpath}/Graphviz.app/Contents/Resources/Info.plist \
274            ${worksrcpath}/Graphviz.app/Contents/Resources/English.lproj/InfoPlist.strings.utf8
275        system "cd ${worksrcpath}/Graphviz.app/Contents/Resources/English.lproj && iconv -f utf-8 -t utf-16 InfoPlist.strings.utf8 > InfoPlist.strings"
276        delete ${worksrcpath}/Graphviz.app/Contents/Resources/English.lproj/InfoPlist.strings.utf8
277    }
278    post-destroot {
279        set apppath ${destroot}${applications_dir}
280        set macospath ${apppath}/Graphviz.app/Contents/MacOS
281        set dispatcher graphviz-dispatcher.php
282        xinstall -d ${apppath}
283        copy ${worksrcpath}/Graphviz.app ${apppath}
284        xinstall -m 755 ${filespath}/${dispatcher}.in ${macospath}/${dispatcher}
285        reinplace "s%@PREFIX@%${prefix}%g" ${macospath}/${dispatcher}
286        foreach prog {acyclic bcomps ccomps circo cvtgxl dijkstra dot gc gvcolor gvpack gvpr neato nop sccmap tred twopi unflatten} {
287            delete ${macospath}/${prog}
288            ln -s ${dispatcher} ${macospath}/${prog}
289        }
290    }
291}
292
293# Make the configuration file that makes the plugins work:
294post-activate {
295    system "dot -c"
296}
297
298livecheck.check         regex
299livecheck.url           ${homepage}Download_source.php
300livecheck.regex         ${my_name}-(\[0-9\]+\\.\[0-9\]*\[02468\](\\.\[0-9\]+)*)\\.tar
Note: See TracBrowser for help on using the repository browser.