Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pdl core only build - DO NOT MERGE #113

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
184 changes: 0 additions & 184 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,191 +120,7 @@ Basic/Ufunc/Ufunc.xs
Demos/BAD2_demo.pm
Demos/BAD_demo.pm
Doc/Doc/Config.pm
Graphics/IIS/IIS.c
Graphics/IIS/IIS.pm
Graphics/IIS/IIS.xs
Graphics/PGPLOT/Window/Window.c
Graphics/PLplot/OPTIONS!
Graphics/PLplot/PLplot.c
Graphics/PLplot/PLplot.pm
Graphics/PLplot/PLplot.xs
Graphics/TriD/OpenGL/OpenGL.c
Graphics/TriD/OpenGL/OpenGL.pm
Graphics/TriD/OpenGL/OpenGL.xs
Graphics/TriD/OpenGL/X.h.cpp
Graphics/TriD/OpenGL/gl.h.cpp
Graphics/TriD/OpenGL/glu.h.cpp
Graphics/TriD/OpenGL/glx.h.cpp
Graphics/TriD/OpenGL/glxtokens.h.cpp
Graphics/TriD/OpenGL/typemap
Graphics/TriD/OpenGLQ/OpenGLQ.c
Graphics/TriD/OpenGLQ/OpenGLQ.pm
Graphics/TriD/OpenGLQ/OpenGLQ.xs
Graphics/TriD/Rout/Rout.c
Graphics/TriD/Rout/Rout.pm
Graphics/TriD/Rout/Rout.xs
IO/Browser/Browser.c
IO/Browser/Browser.pm
IO/Browser/Browser.xs
IO/GD/GD.c
IO/GD/GD.pm
IO/GD/GD.xs
IO/HDF/SD/SD.c
IO/HDF/SD/SD.pm
IO/HDF/SD/SD.xs
IO/HDF/VS/VS.c
IO/HDF/VS/VS.pm
IO/HDF/VS/VS.xs
IO/Misc/Misc.c
IO/Misc/Misc.pm
IO/Misc/Misc.xs
IO/NDF/NDF.pm
IO/Pnm/Pnm.c
IO/Pnm/Pnm.pm
IO/Pnm/Pnm.xs
IO/Storable/Storable.c
IO/Storable/Storable.pm
IO/Storable/Storable.xs
Lib/CallExt/CallExt.c
Lib/Compression/Compression.c
Lib/Compression/Compression.pm
Lib/Compression/Compression.xs
Lib/FFT/FFT.c
Lib/FFT/FFT.pm
Lib/FFT/FFT.xs
Lib/Fit/Gaussian/Gaussian.c
Lib/Fit/Gaussian/Gaussian.pm
Lib/Fit/Gaussian/Gaussian.xs
Lib/GIS/Proj/Proj.c
Lib/GIS/Proj/Proj.pm
Lib/GIS/Proj/Proj.xs
Lib/GSL/DIFF/DIFF.c
Lib/GSL/DIFF/DIFF.pm
Lib/GSL/DIFF/DIFF.xs
Lib/GSL/INTEG/INTEG.c
Lib/GSL/INTEG/INTEG.pm
Lib/GSL/INTEG/INTEG.xs
Lib/GSL/INTERP/INTERP.c
Lib/GSL/INTERP/INTERP.pm
Lib/GSL/INTERP/INTERP.xs
Lib/GSL/MROOT/MROOT.c
Lib/GSL/MROOT/MROOT.pm
Lib/GSL/MROOT/MROOT.xs
Lib/GSL/RNG/RNG.c
Lib/GSL/RNG/RNG.pm
Lib/GSL/RNG/RNG.xs
Lib/GSL/SF/airy/AIRY.c
Lib/GSL/SF/airy/AIRY.pm
Lib/GSL/SF/airy/AIRY.xs
Lib/GSL/SF/bessel/BESSEL.c
Lib/GSL/SF/bessel/BESSEL.pm
Lib/GSL/SF/bessel/BESSEL.xs
Lib/GSL/SF/clausen/CLAUSEN.c
Lib/GSL/SF/clausen/CLAUSEN.pm
Lib/GSL/SF/clausen/CLAUSEN.xs
Lib/GSL/SF/coulomb/COULOMB.c
Lib/GSL/SF/coulomb/COULOMB.pm
Lib/GSL/SF/coulomb/COULOMB.xs
Lib/GSL/SF/coupling/COUPLING.c
Lib/GSL/SF/coupling/COUPLING.pm
Lib/GSL/SF/coupling/COUPLING.xs
Lib/GSL/SF/dawson/DAWSON.c
Lib/GSL/SF/dawson/DAWSON.pm
Lib/GSL/SF/dawson/DAWSON.xs
Lib/GSL/SF/debye/DEBYE.c
Lib/GSL/SF/debye/DEBYE.pm
Lib/GSL/SF/debye/DEBYE.xs
Lib/GSL/SF/dilog/DILOG.c
Lib/GSL/SF/dilog/DILOG.pm
Lib/GSL/SF/dilog/DILOG.xs
Lib/GSL/SF/elementary/ELEMENTARY.c
Lib/GSL/SF/elementary/ELEMENTARY.pm
Lib/GSL/SF/elementary/ELEMENTARY.xs
Lib/GSL/SF/ellint/ELLINT.c
Lib/GSL/SF/ellint/ELLINT.pm
Lib/GSL/SF/ellint/ELLINT.xs
Lib/GSL/SF/elljac/ELLJAC.c
Lib/GSL/SF/elljac/ELLJAC.pm
Lib/GSL/SF/elljac/ELLJAC.xs
Lib/GSL/SF/erf/ERF.c
Lib/GSL/SF/erf/ERF.pm
Lib/GSL/SF/erf/ERF.xs
Lib/GSL/SF/exp/EXP.c
Lib/GSL/SF/exp/EXP.pm
Lib/GSL/SF/exp/EXP.xs
Lib/GSL/SF/expint/EXPINT.c
Lib/GSL/SF/expint/EXPINT.pm
Lib/GSL/SF/expint/EXPINT.xs
Lib/GSL/SF/fermi_dirac/FERMI_DIRAC.c
Lib/GSL/SF/fermi_dirac/FERMI_DIRAC.pm
Lib/GSL/SF/fermi_dirac/FERMI_DIRAC.xs
Lib/GSL/SF/gamma/GAMMA.c
Lib/GSL/SF/gamma/GAMMA.pm
Lib/GSL/SF/gamma/GAMMA.xs
Lib/GSL/SF/gegenbauer/GEGENBAUER.c
Lib/GSL/SF/gegenbauer/GEGENBAUER.pm
Lib/GSL/SF/gegenbauer/GEGENBAUER.xs
Lib/GSL/SF/hyperg/HYPERG.c
Lib/GSL/SF/hyperg/HYPERG.pm
Lib/GSL/SF/hyperg/HYPERG.xs
Lib/GSL/SF/laguerre/LAGUERRE.c
Lib/GSL/SF/laguerre/LAGUERRE.pm
Lib/GSL/SF/laguerre/LAGUERRE.xs
Lib/GSL/SF/legendre/LEGENDRE.c
Lib/GSL/SF/legendre/LEGENDRE.pm
Lib/GSL/SF/legendre/LEGENDRE.xs
Lib/GSL/SF/log/LOG.c
Lib/GSL/SF/log/LOG.pm
Lib/GSL/SF/log/LOG.xs
Lib/GSL/SF/poly/POLY.c
Lib/GSL/SF/poly/POLY.pm
Lib/GSL/SF/poly/POLY.xs
Lib/GSL/SF/pow_int/POW_INT.c
Lib/GSL/SF/pow_int/POW_INT.pm
Lib/GSL/SF/pow_int/POW_INT.xs
Lib/GSL/SF/psi/PSI.c
Lib/GSL/SF/psi/PSI.pm
Lib/GSL/SF/psi/PSI.xs
Lib/GSL/SF/synchrotron/SYNCHROTRON.c
Lib/GSL/SF/synchrotron/SYNCHROTRON.pm
Lib/GSL/SF/synchrotron/SYNCHROTRON.xs
Lib/GSL/SF/transport/TRANSPORT.c
Lib/GSL/SF/transport/TRANSPORT.pm
Lib/GSL/SF/transport/TRANSPORT.xs
Lib/GSL/SF/trig/TRIG.c
Lib/GSL/SF/trig/TRIG.pm
Lib/GSL/SF/trig/TRIG.xs
Lib/GSL/SF/zeta/ZETA.c
Lib/GSL/SF/zeta/ZETA.pm
Lib/GSL/SF/zeta/ZETA.xs
Lib/Image2D/Image2D.c
Lib/Image2D/Image2D.pm
Lib/Image2D/Image2D.xs
Lib/ImageND/ImageND.c
Lib/ImageND/ImageND.pm
Lib/ImageND/ImageND.xs
Lib/ImageRGB/ImageRGB.c
Lib/ImageRGB/ImageRGB.pm
Lib/ImageRGB/ImageRGB.xs
Lib/Minuit/Minuit.c
Lib/Minuit/Minuit.pm
Lib/Minuit/Minuit.xs
Lib/Minuit/minuitlib/libminuit.a
Lib/Slatec/Slatec.c
Lib/Slatec/Slatec.pm
Lib/Slatec/Slatec.xs
Lib/Slatec/SlatecProtos.h
Lib/Slatec/f77_underscore
Lib/Transform/Cartography/earth_day.ppm
Lib/Transform/Cartography/earth_night.ppm
Lib/Transform/Proj4/Proj4.c
Lib/Transform/Proj4/Proj4.pm
Lib/Transform/Proj4/Proj4.xs
Lib/Transform/Transform.c
Lib/Transform/Transform.pm
Lib/Transform/Transform.xs
MANIFEST.bak
Perldl2/pdl2.pod
_Inline/
gsl.pl
pdl
Expand Down
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,16 @@ matrix:
env: PDL_WITH_BADVAL=1 PDL_BADVAL_USENAN=1 PDL_BADVAL_PER_PDL=0
- perl: "5.20"
env: PDL_WITH_BADVAL=1 PDL_BADVAL_USENAN=1 PDL_BADVAL_PER_PDL=1
- perl: "5.20"
env: DISABLE_FORTRAN=1 # what if we don't have Fortran installed?
- perl: "5.20"
env: CC="clang" # use `clang` instead of `gcc` default
allow_failures:
- perl: blead
before_install:
- sudo apt-get update
- sudo apt-get install build-essential libx11-dev pgplot5 libplplot-dev libgd2-xpm-dev libhdf4-alt-dev libproj-dev libvpx-dev libxpm-dev proj-bin libcfitsio3-dev libreadline-dev
- if [ "$DISABLE_FORTRAN" != 1 ]; then sudo apt-get install gfortran; fi # set DISABLE_FOTRAN = 1 to not install gfortran
# clang is already installed in Travis-CI environment. Using PERL_MM_OPT does not work with subdirectory Makefile.PLs so we override Config.pm
# Also, both $Config{cc} and $Config{ld} need to be set because under ELF environments (such as Travis-CI's Ubuntu), this is what Perl's Config.pm does.
- if [ "$CC" == "clang" ]; then mkdir build_aux; echo 'package force_clang; use ExtUtils::MakeMaker::Config; $Config{cc} = $Config{ld} = "clang"; 1' > build_aux/force_clang.pm; export PERL5OPT="-I$(pwd)/build_aux -Mforce_clang"; fi
- sudo apt-get install libxi-dev libxmu-dev freeglut3-dev libgsl0-dev libnetpbm10-dev # for OpenGL
- export PGPLOT_DEV=/NULL
- perl -pi -e 's|WITH_BADVAL => 1|WITH_BADVAL => 0| if defined $ENV{PDL_WITH_BADVAL} && $ENV{PDL_WITH_BADVAL} == 0' perldl.conf # disable bad value support
- perl -pi -e 's|BADVAL_USENAN => 0|BADVAL_USENAN => 1| if defined $ENV{PDL_BADVAL_USENAN} && $ENV{PDL_BADVAL_USENAN} == 1' perldl.conf # enable BADVAL_USENAN
- perl -pi -e 's|BADVAL_PER_PDL => 0|BADVAL_PER_PDL => 1| if defined $ENV{PDL_BADVAL_PER_PDL} && $ENV{PDL_BADVAL_PER_PDL} == 1' perldl.conf # enable BADVAL_PER_PDL
Expand All @@ -51,7 +46,6 @@ before_install:
- source ~/travis-perl-helpers/init
- build-perl
- perl -V
- cpanm --quiet --notest ExtUtils::F77 Term::ReadLine::Gnu PGPLOT # do not need tests
- cpanm --quiet --notest Devel::CheckLib # specify this now because this is a CONFIGURE_REQUIRES for author-side
- cpanm --force --verbose ExtUtils::ParseXS # we install the latest ExtUtils::ParseXS
- if [ "$EUMM_BLEAD" == 1 ]; then cpanm --quiet --notest --dev ExtUtils::MakeMaker; fi
Expand Down
62 changes: 1 addition & 61 deletions Basic/Core/Dev.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ PDL development and is often used from within Makefile.PL's.

package PDL::Core::Dev;

use File::Path;
use File::Basename;
use ExtUtils::Manifest;
use English; require Exporter;

@ISA = qw( Exporter );
Expand All @@ -34,7 +31,7 @@ use English; require Exporter;
pdlpp_postamble_int pdlpp_stdargs_int
pdlpp_postamble pdlpp_stdargs write_dummy_make
unsupported getcyglib trylink
pdlpp_mkgen
pdlpp_genpm
);

# Installation locations
Expand Down Expand Up @@ -472,67 +469,10 @@ sub pdlpp_stdargs {
'INC' => &PDL_INST_INCLUDE()." $inc",
'LIBS' => $libs ? ["$libs "] : [],
'clean' => {'FILES' => "$pref.xs $pref.pm $pref\$(OBJ_EXT) $pref.c"},
'dist' => {'PREOP' => '$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" -MPDL::Core::Dev -e pdlpp_mkgen $(DISTVNAME)' },
(eval ($ExtUtils::MakeMaker::VERSION) >= 6.57_02 ? ('NO_MYMETA' => 1) : ()),
);
}

# pdlpp_mkgen($dir)
# - scans $dir/MANIFEST for all *.pd files and creates corresponding *.pm files
# in $dir/GENERATED/ subdir; needed for proper doc rendering at metacpan.org
# - it is used in Makefile.PL like:
# dist => { PREOP=>'$(PERL) -MPDL::Core::Dev -e pdlpp_mkgen $(DISTVNAME)' }
# so all the magic *.pm generation happens during "make dist"
# - it is intended to be called as a one-liner:
# perl -MPDL::Core::Dev -e pdlpp_mkgen DirName
#
sub pdlpp_mkgen {
my $dir = @_ > 0 ? $_[0] : $ARGV[0];
die "pdlpp_mkgen: unspecified directory" unless defined $dir && -d $dir;
my $file = "$dir/MANIFEST";
die "pdlpp_mkgen: non-existing '$dir/MANIFEST'" unless -f $file;

my @pairs = ();
my $manifest = ExtUtils::Manifest::maniread($file);
for (keys %$manifest) {
next if $_ !~ m/\.pd$/; # skip non-pd files
next if $_ =~ m/^(t|xt)\//; # skip *.pd files in test subdirs
next unless -f $_;
my $content = do { local $/; open my $in, '<', $_; <$in> };
if ($content =~ /=head1\s+NAME\s+(\S+)\s+/sg) {
push @pairs, [$_, $1];
}
else {
warn "pdlpp_mkgen: unknown module name for '$_' (use proper '=head1 NAME' section)\n";
}
}

my %added = ();
for (@pairs) {
my ($pd, $mod) = @$_;
(my $prefix = $mod) =~ s|::|/|g;
my $manifestpm = "GENERATED/$prefix.pm";
$prefix = "$dir/GENERATED/$prefix";
File::Path::mkpath(dirname($prefix));
#there is no way to use PDL::PP from perl code, thus calling via system()
my @in = map { "-I$_" } @INC, 'inc';
my $rv = system($^X, @in, "-MPDL::PP qw[$mod $mod $prefix]", $pd);
if ($rv == 0 && -f "$prefix.pm") {
$added{$manifestpm} = "mod=$mod pd=$pd (added by pdlpp_mkgen)";
unlink "$prefix.xs"; #we need only .pm
}
else {
warn "pdlpp_mkgen: cannot convert '$pd'\n";
}
}

if (scalar(keys %added) > 0) {
#maniadd works only with this global variable
local $ExtUtils::Manifest::MANIFEST = $file;
ExtUtils::Manifest::maniadd(\%added);
}
}

sub unsupported {
my ($package,$os) = @_;
"No support for $package on $os platform yet. Will skip build process";
Expand Down
11 changes: 1 addition & 10 deletions Basic/PDL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Some notes:

=over 5

=item Modules loaded by default
=item SYNOPSIS

See the SYNOPSIS section at the end of this document for a list of
modules loaded by default.
Expand Down Expand Up @@ -137,9 +137,6 @@ start-up modules.
use PDL::MatrixOps;
use PDL::Math;
use PDL::Version;
use PDL::IO::Misc;
use PDL::IO::FITS;
use PDL::IO::Pic;
use PDL::Lvalue;

=cut
Expand Down Expand Up @@ -170,12 +167,6 @@ use PDL::Math;
use PDL::MatrixOps;
use PDL::Lvalue;

# Load these for TPJ compatibility

use PDL::IO::Misc; # Misc IO (Ascii)
use PDL::IO::FITS; # FITS IO (rfits/wfits; used by rpic/wpic too)
use PDL::IO::Pic; # rpic/wpic

# Load this so config/install info is available

use PDL::Config;
Expand Down
Loading