source: trunk/dports/perl/p5-pdl/Portfile

Last change on this file was 154393, checked in by mojca@…, 9 months ago

p5-*: remove subports for perl5.22 (#52081)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.9 KB
Line 
1# -*- 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
2# $Id: Portfile 154393 2016-10-28 22:10:07Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           perl5 1.0
6
7perl5.branches      5.24
8perl5.setup         PDL 2.017
9maintainers         peculier.com:mgrimes openmaintainer
10license             {Artistic-1 GPL}
11description         Perl Data Language - scientific computing capability for perl
12long_description    The perlDL project aims to turn perl into an efficient numerical \
13                    language for scientific computing. The PDL module gives standard perl \
14                    the ability to COMPACTLY store and SPEEDILY manipulate the large \
15                    N-dimensional data sets which are the bread and butter of scientific \
16                    computing.
17
18platforms           darwin
19
20homepage            http://pdl.perl.org/
21
22checksums           rmd160  9b5852f7696fa6dd002e4ce9d576c100cdc6bbc5 \
23                    sha256  93b3f22454485d92efb2f85d2e622fd584b2df6a252eae672eba3c39d3c3bd10
24
25#
26# support options
27#
28# plotting support using pgplot (PDL::Graphics::PGPLOT) is always enabled
29# plotting support using plplot (PDL::Graphics::PLplot) has been removed from the PDL distribution, available as a separate module if desired
30# plotting support using gnuplot is available via separate module PDL::Graphics::Gnuplot
31# 3D plotting support (PDL::Graphics::TriD) using opengl is optional, use +opengl to enable (#46306)
32# hdf4 support (PDL::IO::HDF) is enabled by default, use -hdf4 to disable (#46304)
33# hdf5 support is available via separate module PDL::IO::HDF5
34# image io support using the gd library (PDL::IO::GD) is optional, use +gd to enable
35# projection transform support using the Proj4 library (PDL::GIS::Proj) is optional, use +proj to enable
36# coordinate transform support using the Proj4 library (PDL::Transform::Proj4) is optional, use +proj to enable
37# fft support via PDL::FFT and PDL::Slatec::fft is always enabled
38# alternate fft support using the fftw library is available via separate module PDL::FFTW3
39# dependency on Devel::REPL added to enable build of enhanced pdl2 shell (#47019)
40#
41
42variant gd description {Enable support for the GD image library} {}
43variant hdf4 description {Enable support for the HDF4 SD library} {}
44variant opengl description {Enable TriD plotting support using opengl} {}
45variant proj description {Enable support for the Proj4 projection library} {}
46
47default_variants    +hdf4
48
49if {${perl5.major} != ""} {
50    depends_build-append \
51                    port:p${perl5.major}-devel-checklib \
52                    port:p${perl5.major}-test-deep \
53                    port:p${perl5.major}-test-exception \
54                    port:p${perl5.major}-test-warn
55
56    depends_lib-append \
57                    port:freeglut \
58                    port:gsl \
59                    port:jpeg \
60                    port:netpbm \
61                    port:p${perl5.major}-astro-fits-header \
62                    port:p${perl5.major}-convert-uu \
63                    port:p${perl5.major}-file-map \
64                    port:p${perl5.major}-filter-simple \
65                    port:p${perl5.major}-inline \
66                    port:p${perl5.major}-inline-c \
67                    port:p${perl5.major}-module-compile \
68                    port:p${perl5.major}-pgplot \
69                    port:p${perl5.major}-term-readline-gnu \
70                    port:pgplot \
71                    port:slatec \
72                    port:xorg-libXi \
73                    port:xorg-libXmu
74
75    set enable_gd     0
76    set enable_hdf4   0
77    set enable_opengl 0
78    set enable_proj   0
79
80    if {[variant_isset gd]} {
81        set enable_gd 1
82        depends_lib-append \
83                    port:p${perl5.major}-gd
84    }
85
86    if {[variant_isset hdf4]} {
87        set enable_hdf4 1
88        depends_lib-append \
89                    port:hdf4
90    }
91
92    if {[variant_isset opengl]} {
93        set enable_opengl 1
94        depends_lib-append \
95                    port:p${perl5.major}-opengl
96    }
97
98    if {[variant_isset proj]} {
99        set enable_proj 1
100        depends_lib-append \
101                    port:proj
102    }
103
104    # pgplot is not universal
105    universal_variant no
106
107    patchfiles      patch-perldl.conf.diff \
108                    patch-proj.diff
109     
110    post-patch {
111        reinplace "s|/usr/local|${prefix}|g" \
112            ${worksrcpath}/Basic/Core/pdlsimple.h.PL \
113            ${worksrcpath}/Doc/Doc/Config.pm.PL \
114            ${worksrcpath}/Graphics/TriD/Makefile.PL \
115            ${worksrcpath}/IO/Browser/Makefile.PL \
116            ${worksrcpath}/IO/GD/Makefile.PL \
117            ${worksrcpath}/IO/HDF/Makefile.PL \
118            ${worksrcpath}/Lib/FFT/Makefile.PL \
119            ${worksrcpath}/Lib/GIS/Proj/Makefile.PL \
120            ${worksrcpath}/Lib/Transform/Proj4/Makefile.PL \
121            ${worksrcpath}/t/callext.t
122
123        reinplace "s|^#!.*|#!${perl5.bin}|" ${worksrcpath}/Perldl2/pdl2
124        reinplace "s|__WITH_GD__|${enable_gd}|" ${worksrcpath}/perldl.conf
125        reinplace "s|__WITH_HDF__|${enable_hdf4}|" ${worksrcpath}/perldl.conf
126        reinplace "s|__WITH_OPENGL__|${enable_opengl}|" ${worksrcpath}/perldl.conf
127        reinplace "s|__WITH_PROJ__|${enable_proj}|" ${worksrcpath}/perldl.conf
128    }
129
130    post-build {
131        # Create the pdldoc.db file for the help system
132        exec ${perl5.bin} -I ${worksrcpath}/blib/arch \
133            -I ${worksrcpath}/blib/lib \
134            ${worksrcpath}/Doc/scantree.pl ${worksrcpath}/blib/lib \
135            ${worksrcpath}/pdldoc.db \
136            ${worksrcpath}/blib/lib/PDL/Index.pod \
137            >/dev/null 2>/dev/null
138
139        # Rewrite the paths in the pdldoc.db file. scantree will have the
140        # ${worksrcpath}/blib/lib paths, we need ${perl5.archlib}.
141        exec ${perl5.bin} ${filespath}/fix-pdldocdb.pl \
142            ${worksrcpath}/pdldoc.db \
143            ${worksrcpath}/blib/lib/PDL/pdldoc.db \
144            "${worksrcpath}/blib/lib" \
145            "${perl5.archlib}"
146    }
147}
Note: See TracBrowser for help on using the repository browser.