Ticket #36397: Portfile

File Portfile, 3.4 KB (added by stevecheckoway (Stephen Checkoway), 12 years ago)
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 85806 2011-10-16 08:24:16Z dports@macports.org $
3
4PortSystem          1.0
5
6name                jgraph
7version             8.3
8categories          graphics
9# see http://packages.debian.org/changelogs/pool/main/j/jgraph/current/copyright
10license             GPL
11homepage \
12    http://www.cs.utk.edu/~plank/plank/jgraph/jgraph.html
13maintainers         pahtak.org:s
14description         A Filter for Plotting Graphs in PostScript
15long_description    Jgraph is a program that takes the description \
16                    a graph or graphs as input, and produces a \
17                    PostScript file on the standard output. Jgraph \
18                    is ideal for plotting any mixture of scatter \
19                    point graphs, line graphs, and/or bar graphs, \
20                    and embedding the output into LaTeX, or any \
21                    other text processing system that can read \
22                    PostScript
23platforms           darwin
24distname            ${name}
25dist_subdir         ${name}/${version}
26master_sites        http://www.cs.utk.edu/~plank/plank/jgraph/
27checksums           md5 f73fa282f7fe6cf562e08c70da7bfb65 \
28                    sha1 4ea864f7bca8cf03217fc57a745753092493ddfa \
29                    rmd160 b575acd5fa8f99c8433e81128619a7247881c306
30
31supported_archs     ppc i386
32patchfiles          patch-draw.c.diff \
33                    patch-edit.c.diff \
34                    patch-jgraph.c.diff \
35                    patch-jgraph.h.diff \
36                    patch-list.c.diff \
37                    patch-list.h.diff \
38                    patch-makefile.diff \
39                    patch-printline.c.diff \
40                    patch-prio_list.c.diff \
41                    patch-prio_list.h.diff \
42                    patch-process.c.diff \
43                    patch-show.c.diff \
44                    patch-token.c.diff
45
46post-patch {
47    reinplace s|@@CC@@|${configure.cc}| ${worksrcpath}/makefile
48}
49
50post-extract {
51    # The tarball comes with object files!
52    file delete ${worksrcpath}/jgraph
53    file delete ${worksrcpath}/draw.o
54    file delete ${worksrcpath}/edit.o
55    file delete ${worksrcpath}/jgraph.o
56    file delete ${worksrcpath}/list.o
57    file delete ${worksrcpath}/printline.o
58    file delete ${worksrcpath}/prio_list.o
59    file delete ${worksrcpath}/process.o
60    file delete ${worksrcpath}/show.o
61    file delete ${worksrcpath}/token.o
62    # Replace JGRAPH_DIR with the actual directory
63    reinplace "s,JGRAPH_DIR,${prefix}/share/examples/${name}," ${worksrcpath}/jgraph.1
64}
65
66livecheck.type      regex
67livecheck.url       ${homepage}
68livecheck.regex     "The Software \\(version (\\d+(?:\\.\\d+)*)\\)"
69
70use_configure no
71use_test no
72destroot {
73    xinstall -m 755 -d ${destroot}$prefix/bin
74    xinstall -m 755 ${worksrcpath}/jgraph ${destroot}${prefix}/bin
75    xinstall -m 755 -d ${destroot}$prefix/share/man
76    xinstall -m 755 -d ${destroot}$prefix/share/man/man1
77    xinstall -m 644 ${worksrcpath}/jgraph.1 \
78        ${destroot}${prefix}/share/man/man1
79    xinstall -m 755 -d ${destroot}$prefix/share/doc/${name}
80    xinstall -m 644 ${worksrcpath}/README \
81        ${destroot}${prefix}/share/doc/${name}
82    xinstall -m 755 -d ${destroot}${prefix}/share/examples/${name}
83    eval xinstall -m 644 [glob ${worksrcpath}/*.jgr] \
84        ${destroot}${prefix}/share/examples/${name}
85}