source: trunk/dports/graphics/pgplot/Portfile @ 30230

Last change on this file since 30230 was 30230, checked in by jmpp@…, 13 years ago

nomaintainer address abstraction in graphics category.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1# $Id: Portfile 30230 2007-10-22 23:03:23Z jmpp@macports.org $
2
3PortSystem                      1.0
4name                            pgplot
5version                         5.2.2
6revision                        3
7categories                      graphics devel
8maintainers                     nomaintainer
9description                     C/Fortran graphics library
10long_description \
11        The PGPLOT Graphics Subroutine Library is a Fortran- or C-callable, \
12        device-independent graphics package for making simple scientific \
13        graphs.  It is intended for making graphical images of publication \
14        quality with minimum effort on the part of the user. For most \
15        applications, the program can be device-independent, and the output can \
16        be directed to the appropriate device at run time.
17
18platforms                       darwin
19
20homepage                        http://www.astro.caltech.edu/~tjp/pgplot/
21master_sites            ftp://ftp.astro.caltech.edu/pub/pgplot/:pgplot
22
23distfiles                       ${name}5.2.tar.gz:pgplot
24
25distname                        ${name}5.2:pgplot
26
27worksrcdir                      ${name}/build:pgplot
28
29checksums                       ${name}5.2.tar.gz md5 e8a6e8d0d5ef9d1709dfb567724525ae
30
31depends_lib                     lib:libpng:libpng lib:libz:zlib bin:g77-dp-3.4:gcc34
32
33patchfiles                      patch-makemake patch-src_grgfil.f patch-drivers.list \
34                                        patch-pgdispd_proccom.c
35
36post-extract {
37        file mkdir ${worksrcpath}
38}
39
40pre-patch {
41        file copy ${worksrcpath}/../drivers.list ${worksrcpath}/drivers.list
42}
43
44post-patch {
45        reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/../src/grgfil.f
46}
47
48configure {
49        cd ${worksrcpath}
50        system "../makemake .. ${ppMakeMakeTarget} ${ppCompilerSpec}"
51}
52
53build.target            all
54
55post-build {
56        cd ${worksrcpath}
57        system "make cpg"
58}
59
60destroot {
61        xinstall -m 755 -d ${destroot}/${prefix}/share/${name} \
62                ${destroot}/${prefix}/share/doc/${name}
63        xinstall -m 644 -W ${worksrcpath} grfont.dat rgb.txt \
64                ${destroot}/${prefix}/share/${name}
65        xinstall -m 644 -W ${worksrcpath} libpgplot.a libcpgplot.a \
66                ${destroot}/${prefix}/lib
67        system "ranlib ${destroot}/${prefix}/lib/libpgplot.a \
68                ${destroot}/${prefix}/lib/libcpgplot.a"
69        xinstall -m 644 -W ${worksrcpath} cpgplot.h ${destroot}/${prefix}/include
70        xinstall -m 644 -W ${worksrcpath} pgplot.doc ../copyright.notice \
71                ${destroot}/${prefix}/share/doc/${name}
72}
73
74platform darwin {
75        global ppMakeMakeTarget ppCompilerSpec
76        set ppMakeMakeTarget    darwin
77        set ppCompilerSpec              g77_gcc
78        patchfiles-append               patch-sys_darwin_aaaread.me \
79                                                        patch-sys_darwin_g77_gcc.conf
80        post-patch {
81                reinplace "s|@@PREFIX@@|${prefix}|g" \
82                        ${worksrcpath}/../sys_darwin/${ppCompilerSpec}.conf
83                reinplace "s|@@X11PREFIX@@|${x11prefix}|g" \
84                        ${worksrcpath}/../sys_darwin/${ppCompilerSpec}.conf
85        }
86}
87
88platform darwin 8 i386 {
89        depends_lib-delete      bin:g77-dp-3.4:gcc34
90        depends_lib-append      port:gcc42
91
92        set ppCompilerSpec      gfortran_gcc_42
93
94        patchfiles-delete       patch-sys_darwin_g77_gcc.conf
95        patchfiles-append       patch-sys_darwin_gfortran_gcc_42.conf
96}
97
98default_variants +x11 +aqt
99
100variant x11 {
101        depends_lib-append      lib:libX11:XFree86
102
103        patchfiles-append       patch-drivers_x11.list
104
105        post-destroot {
106                xinstall -m 755 -W ${worksrcpath} pgdisp pgxwin_server \
107                        ${destroot}/${prefix}/bin
108        }
109}
110
111variant aqt {
112# Variant that adds aquaterm driver support
113        depends_lib-append      port:aquaterm
114        patchfiles-append       patch-drivers.list_aqt \
115                                                patch-sys_darwin_${ppCompilerSpec}.conf_aqt \
116                                                patch-makemake_aqt
117       
118        pre-patch {
119                file copy ${prefix}/share/aquaterm/pgplot/aqdriv.m ${workpath}/pgplot/drivers/
120        }
121
122        post-destroot {
123                xinstall -m 755 -W ${worksrcpath} libpgplot.dylib \
124                        ${destroot}/${prefix}/lib
125        }
126}
127
128# Variant to install demo programs
129variant demos {
130        post-destroot {
131                foreach f [glob {pgdemo[1-9]} {pgdemo1[0-7]}] {
132                        xinstall -m 755 -W ${worksrcpath} $f ${destroot}/${prefix}/bin
133                }
134        }
135}
Note: See TracBrowser for help on using the repository browser.