diff --git a/Basic/Makefile.PL b/Basic/Makefile.PL index d97f9c015..4dcaa2c58 100644 --- a/Basic/Makefile.PL +++ b/Basic/Makefile.PL @@ -94,8 +94,6 @@ WriteMakefile( }, }, DEFINE => $pthread_define, - INC => PDL::Core::Dev::PDL_INCLUDE(), - TYPEMAPS => [PDL::Core::Dev::PDL_TYPEMAP()], LIBS => [$libs_string], depend => { $core_obj => $hdeps, diff --git a/Basic/lib/PDL/Core/Dev.pm b/Basic/lib/PDL/Core/Dev.pm index 32358e0da..06f9ca5ec 100644 --- a/Basic/lib/PDL/Core/Dev.pm +++ b/Basic/lib/PDL/Core/Dev.pm @@ -85,17 +85,24 @@ As a side effect, the setting of the C value can be seen by the build process. To have the only F work in this new scheme, converting -it from the previous one(s), you need to add these keys to the -C call, some of which may previously have been -supplied by C: +it from the previous one(s), you need to add this key to the +C call: VERSION_FROM => 'lib/PDL/GSL/CDF.pd', - MIN_PERL_VERSION => '5.014', # PDL as of 2.094 - LIBS => [$GSL_libs], - XSMULTI => 1, - TYPEMAPS => [PDL::Core::Dev::PDL_TYPEMAP()], - INC => join(' ', PDL::Core::Dev::PDL_INCLUDE(), "-I".curdir(), $GSL_includes), - dist => {PREOP => '$(PERLRUNINST) -MPDL::Core::Dev -e pdlpp_mkgen $(DISTVNAME)' }, + +Note that the ones supplied by C are added for you. You I +need to provide overrides for C as before, and also C: + + { + my @pd_srcs; + package MY; # so that "SUPER" works right + sub init_PM { + my ($self) = @_; + $self->SUPER::init_PM; + @pd_srcs = ::pdlpp_eumm_update_deep($self); + } + sub postamble { ::pdlpp_postamble(@pd_srcs) } + } =head1 FUNCTIONS @@ -273,6 +280,14 @@ sub pdlpp_eumm_update_deep { my $xsb = $eumm->{XSBUILD}{xs} ||= {}; $eumm->{clean}{FILES} ||= ''; $eumm->{OBJECT} ||= ''; + $eumm->{INC} ||= ''; + my $pdl_inc = PDL_INCLUDE(); + $eumm->{INC} .= ' '.$pdl_inc if index($eumm->{INC}, $pdl_inc) == -1; + my $tms = $eumm->{TYPEMAPS} ||= []; + my $pdl_tm = PDL_TYPEMAP(); + push @$tms, $pdl_tm if !grep $_ eq $pdl_tm, @$tms; + $eumm->{XSMULTI} ||= 1; + $eumm->{dist}{PREOP} ||= '$(PERLRUNINST) -MPDL::Core::Dev -e pdlpp_mkgen $(DISTVNAME)'; my $xs = $eumm->{XS} ||= {}; my $global_version = $eumm->parse_version($eumm->{VERSION_FROM}); my @pd_srcs; diff --git a/Libtmp/GSL/Makefile.PL b/Libtmp/GSL/Makefile.PL index a50a696c0..004ac1509 100644 --- a/Libtmp/GSL/Makefile.PL +++ b/Libtmp/GSL/Makefile.PL @@ -55,9 +55,7 @@ WriteMakefile( NAME => 'PDL::GSL', VERSION_FROM => 'lib/PDL/GSL/CDF.pd', MIN_PERL_VERSION => '5.014', - XSMULTI => 1, - TYPEMAPS => [PDL::Core::Dev::PDL_TYPEMAP()], - INC => join(' ', PDL::Core::Dev::PDL_INCLUDE(), "-I".curdir(), $GSL_includes), + INC => join(' ', "-I".curdir(), $GSL_includes), LIBS => [$GSL_libs], clean => { FILES => join ' ', qw(MANIFEST.bak) }, NO_MYMETA => 1, diff --git a/Libtmp/Transform-Proj4/Makefile.PL b/Libtmp/Transform-Proj4/Makefile.PL index 3336305a0..9a49c3351 100644 --- a/Libtmp/Transform-Proj4/Makefile.PL +++ b/Libtmp/Transform-Proj4/Makefile.PL @@ -25,9 +25,7 @@ WriteMakefile( NAME => 'PDL::Transform::Proj4', VERSION_FROM => 'lib/PDL/Transform/Proj4.pd', MIN_PERL_VERSION => '5.014', - XSMULTI => 1, - INC => PDL::Core::Dev::PDL_INCLUDE() . ' ' . Alien::proj->cflags, - TYPEMAPS => [PDL::Core::Dev::PDL_TYPEMAP()], + INC => Alien::proj->cflags, LIBS => [Alien::proj->libs], clean => { FILES => join ' ', qw(MANIFEST.bak) }, NO_MYMETA => 1,