# -*- 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
# $Id: Portfile 87136 2011-11-11 21:25:11Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           perl5 1.0

perl5.setup         PDL 2.4.6
revision            2
maintainers         saao.ac.za:tim
description         Perl Data Language - scientific computing capability for perl
long_description    The perlDL project aims to turn perl into an efficient numerical \
                    language for scientific computing. The PDL module gives standard perl \
                    the ability to COMPACTLY store and SPEEDILY manipulate the large \
                    N-dimensional data sets which are the bread and butter of scientific \
                    computing.

platforms           darwin

homepage            http://pdl.perl.org/

checksums           md5     a4aa5f3fd7363824e8f555d0245c4ac7 \
                    sha1    f5edb7d10fdf603a42cb695a8320414b189ea3e5 \
                    rmd160  e343a8af32ce3cd67af046f839618c596f02d2a2

if {${perl5.major} != ""} {
depends_lib-append  port:p${perl5.major}-text-balanced \
                    port:p${perl5.major}-inline \
                    port:p${perl5.major}-extutils-f77 \
                    port:p${perl5.major}-gd \
                    port:p${perl5.major}-astro-fits-header \
                    port:netpbm \
                    port:hdf5-18 \
                    port:jpeg \
                    port:gsl \
                    port:fftw-3 \
                    port:proj \
                    port:pgplot \
                    port:p${perl5.major}-term-readline-gnu \
                    port:plplot

# pgplot is not universal
universal_variant   no

patch.pre_args      -p1
patchfiles          patch-plplot_build

post-patch {
    reinplace "s|/usr/local|${prefix}|g" \
        ${worksrcpath}/Basic/Core/pdlsimple.h.PL \
        ${worksrcpath}/Doc/Doc/Config.pm.PL \
        ${worksrcpath}/Graphics/PLplot/Makefile.PL \
        ${worksrcpath}/Graphics/TriD/Makefile.PL \
        ${worksrcpath}/IO/Browser/Makefile.PL \
        ${worksrcpath}/IO/GD/Makefile.PL \
        ${worksrcpath}/IO/HDF/Makefile.PL \
        ${worksrcpath}/Lib/FFTW/Makefile.PL \
        ${worksrcpath}/Lib/GIS/Proj/Makefile.PL \
        ${worksrcpath}/Lib/Transform/Proj4/Makefile.PL \
        ${worksrcpath}/t/callext.t
}
}
