# -*- 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 105131 2013-04-11 16:41:47Z macsforever2000@macports.org $

PortSystem          1.0
PortGroup           perl5 1.0

perl5.branches      5.8 5.10 5.12 5.14 5.16
perl5.setup         PDL 2.4.11
maintainers         saao.ac.za:tim
license             Artistic GPL-2
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           rmd160  7c877c7477930a0a874190670aedc6375746c63d \
                    sha256  c777ed2519d73ebde0d870e94931a2d2c57865abcee27dfec53f4412a2cac662

if {${perl5.major} != ""} {
    # proj 4.7 is needed for now. https://trac.macports.org/ticket/35292
    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:proj47 \
                        port:pgplot \
                        port:p${perl5.major}-term-readline-gnu \
                        port:plplot

    # pgplot is not universal
    universal_variant   no

    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
    }
}
