# $Id: Portfile 32256 2007-12-23 09:18:47Z ryandesign@macports.org $ PortSystem 1.0 name pgplot version 5.2.2 revision 3 categories graphics devel maintainers nomaintainer description C/Fortran graphics library long_description \ The PGPLOT Graphics Subroutine Library is a Fortran- or C-callable, \ device-independent graphics package for making simple scientific \ graphs. It is intended for making graphical images of publication \ quality with minimum effort on the part of the user. For most \ applications, the program can be device-independent, and the output can \ be directed to the appropriate device at run time. platforms darwin homepage http://www.astro.caltech.edu/~tjp/pgplot/ master_sites ftp://ftp.astro.caltech.edu/pub/pgplot/:pgplot distfiles ${name}5.2.tar.gz:pgplot distname ${name}5.2:pgplot worksrcdir ${name}/build:pgplot checksums ${name}5.2.tar.gz md5 e8a6e8d0d5ef9d1709dfb567724525ae depends_lib lib:libpng:libpng lib:libz:zlib bin:g77-dp-3.4:gcc34 patchfiles patch-makemake patch-src_grgfil.f patch-drivers.list \ patch-pgdispd_proccom.c post-extract { file mkdir ${worksrcpath} } pre-patch { file copy ${worksrcpath}/../drivers.list ${worksrcpath}/drivers.list } post-patch { reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/../src/grgfil.f } configure { cd ${worksrcpath} system "../makemake .. ${ppMakeMakeTarget} ${ppCompilerSpec}" } build.target all post-build { cd ${worksrcpath} system "make cpg" } destroot { xinstall -m 755 -d ${destroot}${prefix}/share/${name} \ ${destroot}${prefix}/share/doc/${name} xinstall -m 644 -W ${worksrcpath} grfont.dat rgb.txt \ ${destroot}${prefix}/share/${name} xinstall -m 644 -W ${worksrcpath} libpgplot.a libcpgplot.a \ ${destroot}${prefix}/lib system "ranlib ${destroot}${prefix}/lib/libpgplot.a \ ${destroot}${prefix}/lib/libcpgplot.a" xinstall -m 644 -W ${worksrcpath} cpgplot.h ${destroot}${prefix}/include xinstall -m 644 -W ${worksrcpath} pgplot.doc ../copyright.notice \ ${destroot}${prefix}/share/doc/${name} } platform darwin { global ppMakeMakeTarget ppCompilerSpec set ppMakeMakeTarget darwin set ppCompilerSpec g77_gcc patchfiles-append patch-sys_darwin_aaaread.me \ patch-sys_darwin_g77_gcc.conf post-patch { reinplace "s|@@PREFIX@@|${prefix}|g" \ ${worksrcpath}/../sys_darwin/${ppCompilerSpec}.conf reinplace "s|@@X11PREFIX@@|${x11prefix}|g" \ ${worksrcpath}/../sys_darwin/${ppCompilerSpec}.conf } } platform darwin 8 i386 { depends_lib-delete bin:g77-dp-3.4:gcc34 depends_lib-append port:gcc42 set ppCompilerSpec gfortran_gcc_42 patchfiles-delete patch-sys_darwin_g77_gcc.conf patchfiles-append patch-sys_darwin_gfortran_gcc_42.conf } default_variants +x11 +aqt variant x11 { depends_lib-append lib:libX11:XFree86 patchfiles-append patch-drivers_x11.list post-destroot { xinstall -m 755 -W ${worksrcpath} pgdisp pgxwin_server \ ${destroot}${prefix}/bin } } variant aqt { # Variant that adds aquaterm driver support depends_lib-append port:aquaterm patchfiles-append patch-drivers.list_aqt \ patch-sys_darwin_${ppCompilerSpec}.conf_aqt \ patch-makemake_aqt pre-patch { file copy ${prefix}/share/aquaterm/pgplot/aqdriv.m ${workpath}/pgplot/drivers/ } post-destroot { xinstall -m 755 -W ${worksrcpath} libpgplot.dylib \ ${destroot}${prefix}/lib } } # Variant to install demo programs variant demos { post-destroot { foreach f [glob {pgdemo[1-9]} {pgdemo1[0-7]}] { xinstall -m 755 -W ${worksrcpath} $f ${destroot}${prefix}/bin } } }