1 | # $Id: Portfile,v 1.7 2008/07/03 22:01:14 davidh Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name pgplot |
---|
5 | version 5.2.2 |
---|
6 | revision 3 |
---|
7 | categories graphics devel |
---|
8 | maintainers nomaintainer |
---|
9 | description C/Fortran graphics library |
---|
10 | long_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 | |
---|
18 | platforms darwin |
---|
19 | |
---|
20 | homepage http://www.astro.caltech.edu/~tjp/pgplot/ |
---|
21 | master_sites ftp://ftp.astro.caltech.edu/pub/pgplot/:pgplot |
---|
22 | |
---|
23 | distfiles ${name}5.2.tar.gz:pgplot |
---|
24 | |
---|
25 | distname ${name}5.2:pgplot |
---|
26 | |
---|
27 | worksrcdir ${name}/build:pgplot |
---|
28 | |
---|
29 | checksums ${name}5.2.tar.gz md5 e8a6e8d0d5ef9d1709dfb567724525ae |
---|
30 | |
---|
31 | depends_lib lib:libpng:libpng lib:libz:zlib |
---|
32 | |
---|
33 | patchfiles patch-makemake patch-src_grgfil.f patch-drivers.list \ |
---|
34 | patch-pgdispd_proccom.c patch-sys_darwin_aaaread.me |
---|
35 | |
---|
36 | post-extract { |
---|
37 | file mkdir ${worksrcpath} |
---|
38 | } |
---|
39 | |
---|
40 | pre-patch { |
---|
41 | file copy ${worksrcpath}/../drivers.list ${worksrcpath}/drivers.list |
---|
42 | } |
---|
43 | |
---|
44 | post-patch { |
---|
45 | reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/../src/grgfil.f |
---|
46 | } |
---|
47 | |
---|
48 | configure { |
---|
49 | cd ${worksrcpath} |
---|
50 | system "../makemake .. ${ppMakeMakeTarget} ${ppCompilerSpec}" |
---|
51 | } |
---|
52 | |
---|
53 | build.target all |
---|
54 | |
---|
55 | post-build { |
---|
56 | cd ${worksrcpath} |
---|
57 | system "make cpg" |
---|
58 | } |
---|
59 | |
---|
60 | destroot { |
---|
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 | |
---|
74 | set ppMakeMakeTarget darwin |
---|
75 | set ppCompilerSpec nocompiler |
---|
76 | |
---|
77 | variant g77 description {compiles with g77 compiler} conflicts gcc42 { |
---|
78 | depends_lib-append bin:g77-dp-3.4:gcc34 |
---|
79 | set ppCompilerSpec g77_gcc |
---|
80 | patchfiles-append patch-sys_darwin_g77_gcc.conf |
---|
81 | } |
---|
82 | |
---|
83 | variant gcc42 description {compiles with gcc42 compiler} conflicts g77 { |
---|
84 | depends_lib-append port:gcc42 |
---|
85 | set ppCompilerSpec gfortran_gcc_42 |
---|
86 | patchfiles-append patch-sys_darwin_gfortran_gcc_42.conf |
---|
87 | } |
---|
88 | |
---|
89 | post-patch { |
---|
90 | reinplace "s|@@PREFIX@@|${prefix}|g" \ |
---|
91 | ${worksrcpath}/../sys_darwin/${ppCompilerSpec}.conf |
---|
92 | reinplace "s|@@X11PREFIX@@|${x11prefix}|g" \ |
---|
93 | ${worksrcpath}/../sys_darwin/${ppCompilerSpec}.conf |
---|
94 | } |
---|
95 | |
---|
96 | variant x11 { |
---|
97 | depends_lib-append lib:libX11:XFree86 |
---|
98 | |
---|
99 | patchfiles-append patch-drivers_x11.list |
---|
100 | |
---|
101 | post-destroot { |
---|
102 | xinstall -m 755 -W ${worksrcpath} pgdisp pgxwin_server \ |
---|
103 | ${destroot}${prefix}/bin |
---|
104 | } |
---|
105 | } |
---|
106 | |
---|
107 | variant aqt { |
---|
108 | # Variant that adds aquaterm driver support |
---|
109 | depends_lib-append port:aquaterm |
---|
110 | patchfiles-append patch-drivers.list_aqt \ |
---|
111 | patch-sys_darwin_${ppCompilerSpec}.conf_aqt \ |
---|
112 | patch-makemake_aqt |
---|
113 | |
---|
114 | pre-patch { |
---|
115 | file copy ${prefix}/share/aquaterm/pgplot/aqdriv.m ${workpath}/pgplot/drivers/ |
---|
116 | } |
---|
117 | |
---|
118 | post-destroot { |
---|
119 | xinstall -m 755 -W ${worksrcpath} libpgplot.dylib \ |
---|
120 | ${destroot}${prefix}/lib |
---|
121 | } |
---|
122 | } |
---|
123 | |
---|
124 | # Variant to install demo programs |
---|
125 | variant demos { |
---|
126 | post-destroot { |
---|
127 | foreach f [glob {pgdemo[1-9]} {pgdemo1[0-7]}] { |
---|
128 | xinstall -m 755 -W ${worksrcpath} $f ${destroot}${prefix}/bin |
---|
129 | } |
---|
130 | } |
---|
131 | } |
---|
132 | |
---|
133 | default_variants +x11 +aqt +gcc42 |
---|