Changeset 133533


Ignore:
Timestamp:
Mar 4, 2015, 7:18:39 PM (4 years ago)
Author:
devans@…
Message:

p5-pdl: update dependencies, add variants to avoid opportunistic configuration and simplify default, update comments, increment revision (openmaintainer)

  • plotting support using pgplot (PDL::Graphics::PGPLOT) is always enabled
  • plotting support using plplot (PDL::Graphics::PLplot) is optional, use +plplot to enable (#46305)
  • plotting support using gnuplot is available via separate module PDL::Graphics::Gnuplot
  • 3D plotting support (PDL::Graphics::TriD) using opengl is optional, use +opengl to enable (#46306)
  • hdf4 support (PDL::IO::HDF) is enabled by default, use -hdf4 to disable (#46304)
  • hdf5 support is available via separate module PDL::IO::HDF5
  • image io support using the gd library (PDL::IO::GD) is optional, use +gd to enable
  • projection transform support using the Proj4 library (PDL::GIS::Proj) is optional, use +proj to enable
  • coordinate transform support using the Proj4 library (PDL::Transform::Proj4) is optional, use +proj to enable
  • fft support via PDL::FFT and PDL::Slatec::fft is always enabled
  • alternate fft support using the fftw library is available via separate module PDL::FFTW
  • dependency on Devel::REPL added to enable build of enhanced pdl2 shell (#47019)
Location:
trunk/dports/perl/p5-pdl
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/perl/p5-pdl/Portfile

    r131063 r133533  
    77perl5.branches      5.16 5.18 5.20
    88perl5.setup         PDL 2.007
    9 revision            6
     9revision            7
    1010maintainers         peculier.com:mgrimes openmaintainer
    1111license             {Artistic-1 GPL}
     
    2424                    sha256  609f6661061e444f2b5de845b2ab927adb9007b6511cf2f08aa0d6df0c62500c
    2525
     26#
     27# support options
     28#
     29# plotting support using pgplot (PDL::Graphics::PGPLOT) is always enabled
     30# plotting support using plplot (PDL::Graphics::PLplot) is optional, use +plplot to enable (#46305)
     31# plotting support using gnuplot is available via separate module PDL::Graphics::Gnuplot
     32# 3D plotting support (PDL::Graphics::TriD) using opengl is optional, use +opengl to enable (#46306)
     33# hdf4 support (PDL::IO::HDF) is enabled by default, use -hdf4 to disable (#46304)
     34# hdf5 support is available via separate module PDL::IO::HDF5
     35# image io support using the gd library (PDL::IO::GD) is optional, use +gd to enable
     36# projection transform support using the Proj4 library (PDL::GIS::Proj) is optional, use +proj to enable
     37# coordinate transform support using the Proj4 library (PDL::Transform::Proj4) is optional, use +proj to enable
     38# fft support via PDL::FFT and PDL::Slatec::fft is always enabled
     39# alternate fft support using the fftw library is available via separate module PDL::FFTW
     40# dependency on Devel::REPL added to enable build of enhanced pdl2 shell (#47019)
     41#
     42
     43variant gd description {Enable support for the GD image library} {}
     44variant hdf4 description {Enable support for the HDF4 SD library} {}
     45variant opengl description {Enable TriD plotting support using opengl} {}
     46variant plplot description {Enable plotting support using plplot} {}
     47variant proj description {Enable support for the Proj4 projection library} {}
     48
     49default_variants    +hdf4
     50
    2651if {${perl5.major} != ""} {
    27 depends_lib-append \
    28                     port:fftw-3 \
     52    depends_lib-append \
    2953                    port:freeglut \
    3054                    port:gsl \
    31                     port:hdf5 \
    3255                    port:jpeg \
    3356                    port:netpbm \
    3457                    port:p${perl5.major}-astro-fits-header \
    3558                    port:p${perl5.major}-convert-uu \
     59                    port:p${perl5.major}-devel-repl \
    3660                    port:p${perl5.major}-extutils-f77 \
    3761                    port:p${perl5.major}-file-map \
     
    3963                    port:p${perl5.major}-inline \
    4064                    port:p${perl5.major}-module-compile \
    41                     port:p${perl5.major}-opengl \
    4265                    port:p${perl5.major}-pgplot \
    4366                    port:p${perl5.major}-term-readline-gnu \
    4467                    port:p${perl5.major}-test-warn \
    4568                    port:pgplot \
    46                     port:plplot \
    4769                    port:slatec \
    4870                    port:xorg-libXi \
    4971                    port:xorg-libXmu
    5072
    51                     # In core:
    52                     # port:p${perl5.major}-data-dumper \
    53                     # port:p${perl5.major}-extutils-makemaker \
    54                     # port:p${perl5.major}-file-temp \
    55                     # port:p${perl5.major}-filter-util-call \
    56                     # port:p${perl5.major}-pod-select \
    57                     # port:p${perl5.major}-text-balanced \
    58                    
    59                     # Deprecated from core in 5.16 but still there in
    60                     # 5.18. Will need macports packages for these at some
    61                     # point:
    62                     # port:p${perl5.major}-filter-simple \
    63                     # port:p${perl5.major}-pod-parser \
     73    set enable_gd     0
     74    set enable_hdf4   0
     75    set enable_opengl 0
     76    set enable_plplot 0
     77    set enable_proj   0
    6478
    65                     # Needed for pdl2, but no MacPort package available
    66                     # and the dependency chain is very long
    67                     # port:p${perl5.major}-devel-repl \
     79    if {[variant_isset gd]} {
     80        set enable_gd 1
     81        depends_lib-append \
     82                    port:p${perl5.major}-gd
     83    }
    6884
    69 # Prereqs in Makefile.PL:
    70 # 'Astro::FITS::Header' => 0,
    71 # 'Convert::UU'         => 0,
    72 # 'Data::Dumper'        => 2.121,       # core 2.121 in 5.6.2
    73 # 'ExtUtils::MakeMaker' => 6.56,        # core 6.48 in 5.8.9
    74 # 'File::Map'           => 0.47,
    75 # 'File::Spec'          => 0.6,         # core 0.6 in 5.00405
    76 # 'File::Temp'          => 0,           # core in 5.6.1
    77 # 'Filter::Util::Call'  => 0,           # core in 5.7.4
    78 # 'Filter::Simple'      => 0.88,        # core, but only 0.84
    79 # 'Inline'              => 0.43,
    80 # 'Module::Compile'     => 0.23,
    81 # 'Pod::Parser'         => 0,           # core in 5.6.0
    82 # 'Pod::Select'         => 0,           # core in 5.6.0
    83 # 'Storable'            => 1.03,        # core 2.04 in 5.8.0
    84 # 'Text::Balanced'      => 1.89,        # core 1.89 in 5.7.3
    85 # 'Test::Warn'          => 0,
     85    if {[variant_isset hdf4]} {
     86        set enable_hdf4 1
     87        depends_lib-append \
     88                    port:hdf4
     89    }
    8690
    87 # pgplot is not universal
    88 universal_variant   no
     91    if {[variant_isset opengl]} {
     92        set enable_opengl 1
     93        depends_lib-append \
     94                    port:p${perl5.major}-opengl
     95    }
    8996
    90 post-patch {
    91     reinplace "s|/usr/local|${prefix}|g" \
    92         ${worksrcpath}/Basic/Core/pdlsimple.h.PL \
    93         ${worksrcpath}/Doc/Doc/Config.pm.PL \
    94         ${worksrcpath}/Graphics/PLplot/Makefile.PL \
    95         ${worksrcpath}/Graphics/TriD/Makefile.PL \
    96         ${worksrcpath}/IO/Browser/Makefile.PL \
    97         ${worksrcpath}/IO/GD/Makefile.PL \
    98         ${worksrcpath}/IO/HDF/Makefile.PL \
    99         ${worksrcpath}/Lib/FFT/Makefile.PL \
    100         ${worksrcpath}/Lib/GIS/Proj/Makefile.PL \
    101         ${worksrcpath}/Lib/Transform/Proj4/Makefile.PL \
    102         ${worksrcpath}/t/callext.t
     97    if {[variant_isset plplot]} {
     98        set enable_plplot 1
     99        depends_lib-append \
     100                    port:plplot
     101    }
     102
     103    if {[variant_isset proj]} {
     104        set enable_proj 1
     105        depends_lib-append \
     106                    port:proj
     107    }
     108
     109    # pgplot is not universal
     110    universal_variant no
     111
     112    patchfiles      patch-perldl.conf.diff
     113     
     114    post-patch {
     115        reinplace "s|/usr/local|${prefix}|g" \
     116            ${worksrcpath}/Basic/Core/pdlsimple.h.PL \
     117            ${worksrcpath}/Doc/Doc/Config.pm.PL \
     118            ${worksrcpath}/Graphics/PLplot/Makefile.PL \
     119            ${worksrcpath}/Graphics/TriD/Makefile.PL \
     120            ${worksrcpath}/IO/Browser/Makefile.PL \
     121            ${worksrcpath}/IO/GD/Makefile.PL \
     122            ${worksrcpath}/IO/HDF/Makefile.PL \
     123            ${worksrcpath}/Lib/FFT/Makefile.PL \
     124            ${worksrcpath}/Lib/GIS/Proj/Makefile.PL \
     125            ${worksrcpath}/Lib/Transform/Proj4/Makefile.PL \
     126            ${worksrcpath}/t/callext.t
     127
     128        reinplace "s|^#!.*|#!${perl5.bin}|" ${worksrcpath}/Perldl2/pdl2
     129        reinplace "s|__WITH_GD__|${enable_gd}|" ${worksrcpath}/perldl.conf
     130        reinplace "s|__WITH_HDF__|${enable_hdf4}|" ${worksrcpath}/perldl.conf
     131        reinplace "s|__WITH_OPENGL__|${enable_opengl}|" ${worksrcpath}/perldl.conf
     132        reinplace "s|__WITH_PLPLOT__|${enable_plplot}|" ${worksrcpath}/perldl.conf
     133        reinplace "s|__WITH_PROJ__|${enable_proj}|" ${worksrcpath}/perldl.conf
     134    }
     135
     136    post-build {
     137        # Create the pdldoc.db file for the help system
     138        exec ${perl5.bin} -I ${worksrcpath}/blib/arch \
     139            -I ${worksrcpath}/blib/lib \
     140            ${worksrcpath}/Doc/scantree.pl ${worksrcpath}/blib/lib \
     141            ${worksrcpath}/pdldoc.db \
     142            ${worksrcpath}/blib/lib/PDL/Index.pod \
     143            >/dev/null 2>/dev/null
     144
     145        # Rewrite the paths in the pdldoc.db file. scantree will have the
     146        # ${worksrcpath}/blib/lib paths, we need ${perl5.archlib}.
     147        exec ${perl5.bin} ${filespath}/fix-pdldocdb.pl \
     148            ${worksrcpath}/pdldoc.db \
     149            ${worksrcpath}/blib/lib/PDL/pdldoc.db \
     150            "${worksrcpath}/blib/lib" \
     151            "${perl5.archlib}"
     152    }
    103153}
    104 
    105 post-build {
    106     # Create the pdldoc.db file for the help system
    107     exec ${perl5.bin} -I ${worksrcpath}/blib/arch \
    108         -I ${worksrcpath}/blib/lib \
    109         ${worksrcpath}/Doc/scantree.pl ${worksrcpath}/blib/lib \
    110         ${worksrcpath}/pdldoc.db \
    111         ${worksrcpath}/blib/lib/PDL/Index.pod \
    112         >/dev/null 2>/dev/null
    113 
    114     # Rewrite the paths in the pdldoc.db file. scantree will have the
    115     # ${worksrcpath}/blib/lib paths, we need ${perl5.archlib}.
    116     exec ${perl5.bin} ${filespath}/fix-pdldocdb.pl \
    117         ${worksrcpath}/pdldoc.db \
    118         ${worksrcpath}/blib/lib/PDL/pdldoc.db \
    119         "${worksrcpath}/blib/lib" \
    120         "${perl5.archlib}"
    121 }
    122 }
Note: See TracChangeset for help on using the changeset viewer.