Revision: 133533 https://trac.macports.org/changeset/133533 Author: devans@macports.org Date: 2015-03-04 11:18:39 -0800 (Wed, 04 Mar 2015) Log 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) Modified Paths: -------------- trunk/dports/perl/p5-pdl/Portfile Added Paths: ----------- trunk/dports/perl/p5-pdl/files/patch-perldl.conf.diff Modified: trunk/dports/perl/p5-pdl/Portfile =================================================================== --- trunk/dports/perl/p5-pdl/Portfile 2015-03-04 19:17:54 UTC (rev 133532) +++ trunk/dports/perl/p5-pdl/Portfile 2015-03-04 19:18:39 UTC (rev 133533) @@ -6,7 +6,7 @@ perl5.branches 5.16 5.18 5.20 perl5.setup PDL 2.007 -revision 6 +revision 7 maintainers peculier.com:mgrimes openmaintainer license {Artistic-1 GPL} description Perl Data Language - scientific computing capability for perl @@ -23,100 +23,131 @@ checksums rmd160 8d700ea03cb937ca94768e8a2e7338919f2ba561 \ sha256 609f6661061e444f2b5de845b2ab927adb9007b6511cf2f08aa0d6df0c62500c +# +# support options +# +# 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) +# + +variant gd description {Enable support for the GD image library} {} +variant hdf4 description {Enable support for the HDF4 SD library} {} +variant opengl description {Enable TriD plotting support using opengl} {} +variant plplot description {Enable plotting support using plplot} {} +variant proj description {Enable support for the Proj4 projection library} {} + +default_variants +hdf4 + if {${perl5.major} != ""} { -depends_lib-append \ - port:fftw-3 \ + depends_lib-append \ port:freeglut \ port:gsl \ - port:hdf5 \ port:jpeg \ port:netpbm \ port:p${perl5.major}-astro-fits-header \ port:p${perl5.major}-convert-uu \ + port:p${perl5.major}-devel-repl \ port:p${perl5.major}-extutils-f77 \ port:p${perl5.major}-file-map \ port:p${perl5.major}-filter-simple \ port:p${perl5.major}-inline \ port:p${perl5.major}-module-compile \ - port:p${perl5.major}-opengl \ port:p${perl5.major}-pgplot \ port:p${perl5.major}-term-readline-gnu \ port:p${perl5.major}-test-warn \ port:pgplot \ - port:plplot \ port:slatec \ port:xorg-libXi \ port:xorg-libXmu - # In core: - # port:p${perl5.major}-data-dumper \ - # port:p${perl5.major}-extutils-makemaker \ - # port:p${perl5.major}-file-temp \ - # port:p${perl5.major}-filter-util-call \ - # port:p${perl5.major}-pod-select \ - # port:p${perl5.major}-text-balanced \ - - # Deprecated from core in 5.16 but still there in - # 5.18. Will need macports packages for these at some - # point: - # port:p${perl5.major}-filter-simple \ - # port:p${perl5.major}-pod-parser \ + set enable_gd 0 + set enable_hdf4 0 + set enable_opengl 0 + set enable_plplot 0 + set enable_proj 0 - # Needed for pdl2, but no MacPort package available - # and the dependency chain is very long - # port:p${perl5.major}-devel-repl \ + if {[variant_isset gd]} { + set enable_gd 1 + depends_lib-append \ + port:p${perl5.major}-gd + } -# Prereqs in Makefile.PL: -# 'Astro::FITS::Header' => 0, -# 'Convert::UU' => 0, -# 'Data::Dumper' => 2.121, # core 2.121 in 5.6.2 -# 'ExtUtils::MakeMaker' => 6.56, # core 6.48 in 5.8.9 -# 'File::Map' => 0.47, -# 'File::Spec' => 0.6, # core 0.6 in 5.00405 -# 'File::Temp' => 0, # core in 5.6.1 -# 'Filter::Util::Call' => 0, # core in 5.7.4 -# 'Filter::Simple' => 0.88, # core, but only 0.84 -# 'Inline' => 0.43, -# 'Module::Compile' => 0.23, -# 'Pod::Parser' => 0, # core in 5.6.0 -# 'Pod::Select' => 0, # core in 5.6.0 -# 'Storable' => 1.03, # core 2.04 in 5.8.0 -# 'Text::Balanced' => 1.89, # core 1.89 in 5.7.3 -# 'Test::Warn' => 0, + if {[variant_isset hdf4]} { + set enable_hdf4 1 + depends_lib-append \ + port:hdf4 + } -# pgplot is not universal -universal_variant no + if {[variant_isset opengl]} { + set enable_opengl 1 + depends_lib-append \ + port:p${perl5.major}-opengl + } -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/FFT/Makefile.PL \ - ${worksrcpath}/Lib/GIS/Proj/Makefile.PL \ - ${worksrcpath}/Lib/Transform/Proj4/Makefile.PL \ - ${worksrcpath}/t/callext.t -} + if {[variant_isset plplot]} { + set enable_plplot 1 + depends_lib-append \ + port:plplot + } -post-build { - # Create the pdldoc.db file for the help system - exec ${perl5.bin} -I ${worksrcpath}/blib/arch \ - -I ${worksrcpath}/blib/lib \ - ${worksrcpath}/Doc/scantree.pl ${worksrcpath}/blib/lib \ - ${worksrcpath}/pdldoc.db \ - ${worksrcpath}/blib/lib/PDL/Index.pod \ - >/dev/null 2>/dev/null + if {[variant_isset proj]} { + set enable_proj 1 + depends_lib-append \ + port:proj + } - # Rewrite the paths in the pdldoc.db file. scantree will have the - # ${worksrcpath}/blib/lib paths, we need ${perl5.archlib}. - exec ${perl5.bin} ${filespath}/fix-pdldocdb.pl \ - ${worksrcpath}/pdldoc.db \ - ${worksrcpath}/blib/lib/PDL/pdldoc.db \ - "${worksrcpath}/blib/lib" \ - "${perl5.archlib}" + # pgplot is not universal + universal_variant no + + patchfiles patch-perldl.conf.diff + + 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/FFT/Makefile.PL \ + ${worksrcpath}/Lib/GIS/Proj/Makefile.PL \ + ${worksrcpath}/Lib/Transform/Proj4/Makefile.PL \ + ${worksrcpath}/t/callext.t + + reinplace "s|^#!.*|#!${perl5.bin}|" ${worksrcpath}/Perldl2/pdl2 + reinplace "s|__WITH_GD__|${enable_gd}|" ${worksrcpath}/perldl.conf + reinplace "s|__WITH_HDF__|${enable_hdf4}|" ${worksrcpath}/perldl.conf + reinplace "s|__WITH_OPENGL__|${enable_opengl}|" ${worksrcpath}/perldl.conf + reinplace "s|__WITH_PLPLOT__|${enable_plplot}|" ${worksrcpath}/perldl.conf + reinplace "s|__WITH_PROJ__|${enable_proj}|" ${worksrcpath}/perldl.conf + } + + post-build { + # Create the pdldoc.db file for the help system + exec ${perl5.bin} -I ${worksrcpath}/blib/arch \ + -I ${worksrcpath}/blib/lib \ + ${worksrcpath}/Doc/scantree.pl ${worksrcpath}/blib/lib \ + ${worksrcpath}/pdldoc.db \ + ${worksrcpath}/blib/lib/PDL/Index.pod \ + >/dev/null 2>/dev/null + + # Rewrite the paths in the pdldoc.db file. scantree will have the + # ${worksrcpath}/blib/lib paths, we need ${perl5.archlib}. + exec ${perl5.bin} ${filespath}/fix-pdldocdb.pl \ + ${worksrcpath}/pdldoc.db \ + ${worksrcpath}/blib/lib/PDL/pdldoc.db \ + "${worksrcpath}/blib/lib" \ + "${perl5.archlib}" + } } -} Added: trunk/dports/perl/p5-pdl/files/patch-perldl.conf.diff =================================================================== --- trunk/dports/perl/p5-pdl/files/patch-perldl.conf.diff (rev 0) +++ trunk/dports/perl/p5-pdl/files/patch-perldl.conf.diff 2015-03-04 19:18:39 UTC (rev 133533) @@ -0,0 +1,47 @@ +--- perldl.conf.orig 2013-10-06 06:58:45.000000000 -0700 ++++ perldl.conf 2015-03-04 09:18:24.000000000 -0800 +@@ -115,7 +115,7 @@ + # false -> use legacy, deprecated X11 only bindings + # undef -> let PDL build decide (check if Perl OpenGL is present) + # +- USE_POGL => undef, ++ USE_POGL => __WITH_OPENGL__, + # USE_POGL => 0, + # + POGL_VERSION => 0.6702, # minimum compatible OpenGL version +@@ -127,7 +127,7 @@ + # + # default settings (let PDL build decide whether to build PLPLOT) + # +- WITH_PLPLOT => 0, # Leave it up to PDL to decide ++ WITH_PLPLOT => __WITH_PLPLOT__, # Leave it up to PDL to decide + WHERE_PLPLOT_LIBS => undef, # let PDL search for plplot installation + WHERE_PLPLOT_INCLUDE => undef, # let PDL search for plplot installation + +@@ -184,7 +184,7 @@ + # false -> don't use + # true -> force use + +- WITH_HDF => undef, # Leave it up to PDL to decide ++ WITH_HDF => __WITH_HDF__, # Leave it up to PDL to decide + HDF_LIBS => undef, + HDF_INC => undef, + +@@ -192,7 +192,7 @@ + # false -> don't use + # true -> force use + +- WITH_GD => undef, # Leave it up to PDL to decide ++ WITH_GD => __WITH_GD__, # Leave it up to PDL to decide + GD_LIBS => undef, + GD_INC => undef, + +@@ -200,7 +200,7 @@ + # false -> don't use + # true -> force use + # +- WITH_PROJ => undef, # Leave it up to PDL to decide ++ WITH_PROJ => __WITH_PROJ__, # Leave it up to PDL to decide + PROJ_LIBS => undef, + PROJ_INC => undef, +