From ec123cf0279fde1fe9871e4e543338b7322b9d8a Mon Sep 17 00:00:00 2001 From: Ed J Date: Thu, 21 Nov 2024 21:07:48 +0000 Subject: [PATCH] Core::Dev to get dirs more cannily --- Basic/lib/PDL/Core/Dev.pm | 5 +++-- Libtmp/GSL/DIFF/t/gsl_diff.t | 2 +- Libtmp/GSL/INTEG/t/gsl_integ.t | 2 +- Libtmp/GSL/INTERP/t/gsl_interp.t | 2 +- Libtmp/GSL/Makefile.PL | 3 ++- Libtmp/GSL/SF/Makefile.PL | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Basic/lib/PDL/Core/Dev.pm b/Basic/lib/PDL/Core/Dev.pm index be7838e51..3caf80d8e 100644 --- a/Basic/lib/PDL/Core/Dev.pm +++ b/Basic/lib/PDL/Core/Dev.pm @@ -145,7 +145,7 @@ sub _postamble { ? map "\$($_)", pdlpp_mod_vars($mod) : pdlpp_mod_values($internal, $src, $base, $multi_c); if ($internal) { - my $ppdir = File::Spec::Functions::abs2rel(catdir(dirname(dirname $w), qw(Basic lib PDL))); + my $ppdir = File::Spec::Functions::abs2rel(catdir($w, qw(PDL))); $pmdep .= join ' ', '', catfile($ppdir, 'PP.pm'), glob(catfile($ppdir, 'PP/*')); $cdep .= join ' ', $ppo, ':', map catfile($ppdir, qw(Core), $_), qw(pdl.h pdlcore.h pdlbroadcast.h pdlmagic.h); @@ -261,6 +261,7 @@ sub _stdargs { $clean .= " \$($mangled_c)"; } else { %hash = (%hash, OBJECT => "$base\$(OBJ_EXT)"); + $clean .= " $base.xs"; } if ($internal) { $hash{depend} = { @@ -269,7 +270,7 @@ sub _stdargs { } ( NAME => $mod, - VERSION_FROM => ($internal ? catfile(dirname($w), qw(lib PDL Core.pm)) : $src), + VERSION_FROM => ($internal ? catfile($w, qw(PDL Core.pm)) : $src), TYPEMAPS => [PDL_TYPEMAP()], PM => {"$base.pm" => "\$(INST_LIBDIR)/$base.pm"}, MAN3PODS => {"$base.pm" => "\$(INST_MAN3DIR)/$mod.\$(MAN3EXT)"}, diff --git a/Libtmp/GSL/DIFF/t/gsl_diff.t b/Libtmp/GSL/DIFF/t/gsl_diff.t index 769f59339..44053a92f 100644 --- a/Libtmp/GSL/DIFF/t/gsl_diff.t +++ b/Libtmp/GSL/DIFF/t/gsl_diff.t @@ -7,7 +7,7 @@ use strict; use warnings; use Test::More; -use PDL; +use PDL::LiteF; use PDL::GSL::DIFF; my @res = gsldiff(\&myf,1.5); diff --git a/Libtmp/GSL/INTEG/t/gsl_integ.t b/Libtmp/GSL/INTEG/t/gsl_integ.t index 43f442edd..f4a00c430 100644 --- a/Libtmp/GSL/INTEG/t/gsl_integ.t +++ b/Libtmp/GSL/INTEG/t/gsl_integ.t @@ -7,7 +7,7 @@ use strict; use warnings; use Test::More; -use PDL; +use PDL::LiteF; use PDL::GSL::INTEG; my $alfa = 2.6; diff --git a/Libtmp/GSL/INTERP/t/gsl_interp.t b/Libtmp/GSL/INTERP/t/gsl_interp.t index 3b76303a3..fc44b2efa 100644 --- a/Libtmp/GSL/INTERP/t/gsl_interp.t +++ b/Libtmp/GSL/INTERP/t/gsl_interp.t @@ -7,7 +7,7 @@ use strict; use warnings; -use PDL; +use PDL::LiteF; use PDL::GSL::INTERP; use Test::More; diff --git a/Libtmp/GSL/Makefile.PL b/Libtmp/GSL/Makefile.PL index c1b54104f..4e58784e1 100644 --- a/Libtmp/GSL/Makefile.PL +++ b/Libtmp/GSL/Makefile.PL @@ -1,6 +1,7 @@ use strict; use warnings; use ExtUtils::MakeMaker; +use PDL::Core::Dev; sub get_gsl_config { my ($flags) = @_; @@ -35,7 +36,7 @@ if (!defined($version) or $version =~ /^\s*$/) { } else { my @is_parts =split /\./,$version; my @needed_parts=split /\./,$MINVERSION; - + $needed_parts[-1]--; for (my $i=0; $i<=$#needed_parts; $i++) { my $is_part=(exists $is_parts[$i] ? $is_parts[$i] : 0); diff --git a/Libtmp/GSL/SF/Makefile.PL b/Libtmp/GSL/SF/Makefile.PL index 118b78e5c..5fa77ebc0 100644 --- a/Libtmp/GSL/SF/Makefile.PL +++ b/Libtmp/GSL/SF/Makefile.PL @@ -2,7 +2,7 @@ use strict; use warnings; use ExtUtils::MakeMaker; -our ($GSL_includes, $GSL_libs); +our ($GSL_includes, $GSL_libs); sub gsl_sf_links_ok { my($lib,$inc) = @_;