source: trunk/dports/graphics/graphviz-oldgui/Portfile

Last change on this file was 107821, checked in by ryandesign@…, 4 years ago

mongodb, oracle-instantclient, curl, VillainousStyle, pure-gen, MyPaint, keybinder, fontconfig, graphviz-oldgui, openni, ttf2eot: use eq and ne for string comparisons

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 107821 2013-07-06 08:26:24Z ryandesign@macports.org $
3
4PortSystem                      1.0
5
6name                            graphviz-oldgui
7conflicts                       graphviz-gui graphviz-gui-devel
8version                         16
9categories                      graphics
10maintainers                     ryandesign
11homepage                        http://www.pixelglow.com/graphviz/
12master_sites                    http://www.pixelglow.com/downloads/
13platforms                       macosx
14use_parallel_build              no
15dist_subdir                     graphviz
16distname                        graphviz-1.13-v${version}
17extract.suffix                  .tgz
18universal_variant               no
19supported_archs                 ppc
20
21description                     Mac OS X Aqua GUI for viewing and exporting \
22                                Graphviz graphs
23
24long_description                ${description}.
25
26checksums                       md5     a3278f993ef3ce021043a17b16a9fd5f \
27                                sha1    87ee05a99088a98aef4937d72c3bb6cf488e3074 \
28                                rmd160  35eac7c7013bddc0d1f107fcaf8e9c7d1e078231
29
30depends_build                   port:pkgconfig \
31                                port:libiconv
32
33depends_run                     path:bin/dot:graphviz
34
35pre-fetch {
36    if {${os.major} >= 9} {
37        set newport graphviz-gui
38        if {[expr [lindex [split [exec ${prefix}/bin/pkg-config --modversion libgvc] .] 1] % 2]} {
39            set newport graphviz-gui-devel
40        }
41        ui_msg "Consider installing ${newport} instead of ${name}."
42    }
43}
44
45post-extract {
46    # Rename worksrcpath so it doesn't contain spaces; some phases have problems otherwise.
47    move "${workpath}/Graphviz 1.13 (v16)" ${worksrcpath}
48    # The frameworks are v1.13 frameworks that aren't applicable anymore.
49    delete ${worksrcpath}/Graphviz.app/Contents/Frameworks
50    # Remove the .DS_Store files that we don't really want to install.
51    fs-traverse item ${worksrcpath} {
52        if {[file tail ${item}] eq ".DS_Store" && [file isfile ${item}]} {
53            delete ${item}
54        }
55    }
56    # Convert the strings from UTF-16 to UTF-8 so that we can patch them.
57    system -W ${worksrcpath}/Graphviz.app/Contents/Resources/English.lproj "${prefix}/bin/iconv -f utf-16 -t utf-8 InfoPlist.strings > InfoPlist.strings.utf8"
58}
59
60patchfiles                      patch-version.diff \
61                                patch-gv-extension.diff
62
63post-patch {
64    # Convert the strings back to UTF-16 which is what Mac OS X expects.
65    system -W ${worksrcpath}/Graphviz.app/Contents/Resources/English.lproj "${prefix}/bin/iconv -f utf-8 -t utf-16 InfoPlist.strings.utf8 > InfoPlist.strings"
66    delete ${worksrcpath}/Graphviz.app/Contents/Resources/English.lproj/InfoPlist.strings.utf8
67}
68
69use_configure                   no
70
71build {
72    # Replace the v1.13 executables with symlinks to a wrapper script that
73    # calls the new executables in ${prefix}/bin. The wrapper is necessary
74    # to emulate the -Tepdf option which was specific to Pixelglow's fork.
75    set dispatcher graphviz-dispatcher.php
76    set macospath ${worksrcpath}/Graphviz.app/Contents/MacOS
77    xinstall -m 755 ${filespath}/${dispatcher}.in ${macospath}/${dispatcher}
78    reinplace "s%@PREFIX@%${prefix}%g" ${macospath}/${dispatcher}
79    foreach prog {acyclic bcomps ccomps circo cvtgxl dijkstra dot gc gvcolor gvpack gvpr neato nop sccmap tred twopi unflatten} {
80        delete ${macospath}/${prog}
81        ln -s ${dispatcher} ${macospath}/${prog}
82    }
83}
84
85destroot {
86    set apppath ${destroot}${applications_dir}
87    xinstall -d ${apppath}
88    copy ${worksrcpath}/Graphviz.app ${apppath}
89}
90
91livecheck.type                  none
Note: See TracBrowser for help on using the repository browser.