Skip to content

Commit 6ab5286

Browse files
committed
switch to lib/*.pd scheme
1 parent 333c89c commit 6ab5286

14 files changed

+67
-114
lines changed

.gitignore

+12-19
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
1-
Complex/Complex.bs
2-
Complex/Complex.c
3-
Complex/Complex.o*
4-
Complex/selectfunc.o*
5-
Complex/Complex.pm
6-
Complex/Complex.xs
7-
Real/Real.bs
8-
Real/Real.c
9-
Real/Real.o*
10-
Real/selectfunc.o*
11-
Real/Real.pm
12-
Real/Real.xs
13-
Trans/Trans.bs
14-
Trans/Trans.c
15-
Trans/Trans.o*
16-
Trans/selectfunc.o*
17-
Trans/Trans.pm
18-
Trans/Trans.xs
19-
*/pp-*.[co]*
1+
lib/PDL/LinearAlgebra/Complex.c
2+
lib/PDL/LinearAlgebra/Complex.pm
3+
lib/PDL/LinearAlgebra/Complex.xs
4+
lib/PDL/LinearAlgebra/Real.c
5+
lib/PDL/LinearAlgebra/Real.pm
6+
lib/PDL/LinearAlgebra/Real.xs
7+
lib/PDL/LinearAlgebra/Trans.c
8+
lib/PDL/LinearAlgebra/Trans.pm
9+
lib/PDL/LinearAlgebra/Trans.xs
10+
**/*-pp-*.c
11+
**/*.o*
12+
**/*.bs
2013
**/*.gcda
2114
**/*.gcno
2215
**/*.gcov

Changes

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- uses PDL 2.096+ lib/*.pd format for quicker builds
2+
13
0.431 2025-01-03
24
- mschur test with complex data can give different on 32-bit (#29) - thanks @sebastic for report
35

Complex/Makefile.PL

-22
This file was deleted.

MANIFEST

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
Artistic_2
22
Changes
3-
Complex/complex.pd
4-
Complex/Makefile.PL
5-
Complex/selectfunc.c
63
Config
74
lib/PDL/LinearAlgebra.pm
5+
lib/PDL/LinearAlgebra/Complex-selectfunc.c
6+
lib/PDL/LinearAlgebra/Complex.pd
7+
lib/PDL/LinearAlgebra/Real-selectfunc.c
8+
lib/PDL/LinearAlgebra/Real.pd
89
lib/PDL/LinearAlgebra/Special.pm
10+
lib/PDL/LinearAlgebra/Trans-selectfunc.c
11+
lib/PDL/LinearAlgebra/Trans.pd
912
Makefile.PL
1013
MANIFEST This list of files
1114
pp_defc.pl
1215
README
13-
Real/Makefile.PL
14-
Real/real.pd
15-
Real/selectfunc.c
1616
t/1.t
1717
t/cgtsv.t
1818
t/common.pl
1919
t/gtsv.t
20-
Trans/Makefile.PL
21-
Trans/selectfunc.c
22-
Trans/trans.pd

MANIFEST.SKIP

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
/pp-.*
2-
Real/Real\.
3-
Trans/Trans\.
4-
Complex/Complex\.
1+
/[^/]*pp-.*
2+
lib/PDL/LinearAlgebra/Complex\.(c|xs|pm)$
3+
lib/PDL/LinearAlgebra/Real\.(c|xs|pm)$
4+
lib/PDL/LinearAlgebra/Trans\.(c|xs|pm)$
55
cover_db/
66
Makefile(\.old)?$
77
\.o(bj|)$
8+
\.bs$
89
\.sw.*$
910
META
1011
MANIFEST\.SKIP

Makefile.PL

+23-9
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ EOF
4444
);
4545
}
4646
47+
my $preop = '$(PERLRUNINST) -MPDL::Core::Dev -e pdlpp_mkgen $(DISTVNAME)';
48+
my $package_name = "PDL::LinearAlgebra";
49+
(my $repo = $package_name) =~ s#::#-#g;
50+
$repo = "PDLPorters/$repo";
4751
WriteMakefile(
4852
NAME => 'PDL::LinearAlgebra',
4953
ABSTRACT => 'PDL bindings to some BLAS and LAPACK library routines',
@@ -54,31 +58,32 @@ WriteMakefile(
5458
"meta-spec" => { version => 2 },
5559
resources => {
5660
homepage => 'http://pdl.perl.org/',
61+
bugtracker => {web=>"https://github.com/$repo/issues"},
5762
repository => {
58-
url => 'git://github.com/PDLPorters/pdl-linearalgebra.git',
63+
url => "git://github.com/$repo.git",
5964
type => 'git',
60-
web => 'https://github.com/PDLPorters/pdl-linearalgebra',
65+
web => "https://github.com/$repo",
6166
},
62-
bugtracker => {web=>'https://github.com/PDLPorters/pdl-linearalgebra/issues'},
67+
x_IRC => 'irc://irc.perl.org/#pdl',
6368
},
64-
x_IRC => 'irc://irc.perl.org/#pdl',
6569
},
6670
CONFIGURE_REQUIRES => {
67-
"PDL" => '2.091',
71+
"PDL" => '2.096',
6872
"Devel::CheckLib" => 0,
6973
"ExtUtils::F77" => '1.26',
7074
},
7175
PREREQ_PM => {
72-
"PDL" => '2.091', # tricpy etc
76+
"PDL" => '2.096', # lib/*.pd
7377
},
7478
TEST_REQUIRES => {
7579
"Test::More" => '0.88', # done_testing
7680
},
77-
dist => { PREOP=>'$(PERL) -MPDL::Core::Dev -e pdlpp_mkgen $(DISTVNAME)' }, # GENERATED subdir in dist tarball
81+
INC => $inc,
82+
LIBS => [$libs0],
83+
dist => { COMPRESS => 'gzip', SUFFIX => 'gz', PREOP => $preop },
7884
clean => { FILES => '*~' },
7985
);
8086
81-
8287
sub find_libs {
8388
return if $^O !~ /linux/i;
8489
# in performance order based on libraries I've used
@@ -107,7 +112,16 @@ sub find_macos_libs {
107112
qq{-L"$pref/lib" -llapack -lblas};
108113
}
109114
115+
my @pd_srcs;
116+
sub MY::init_PM {
117+
package MY; # so that "SUPER" works right
118+
my ($self) = @_;
119+
$self->SUPER::init_PM;
120+
delete $self->{PM}{'pp_defc.pl'};
121+
@pd_srcs = ::pdlpp_eumm_update_deep($self);
122+
}
110123
sub MY::postamble {
111124
my $oneliner = PDL::Core::Dev::_oneliner(qq{exit if \$ENV{DESTDIR}; use PDL::Doc; eval { PDL::Doc::add_module(shift); }});
112-
qq|\ninstall :: pure_install\n\t$oneliner \$(NAME)\n|;
125+
pdlpp_postamble(@pd_srcs) .
126+
qq|\ninstall :: pure_install\n\t$oneliner \$(NAME)\n|;
113127
}

Real/Makefile.PL

-22
This file was deleted.

Trans/Makefile.PL

-22
This file was deleted.
File renamed without changes.

Complex/complex.pd lib/PDL/LinearAlgebra/Complex.pd

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
do('../Config');
1+
do('./Config');
22

33
{ # required because PAUSE will reject undefined $VERSION
44
require ExtUtils::MM;
55
my $MM = bless { NAME => 'Fake' }, 'MM';
6-
my $global_version = $MM->parse_version('../lib/PDL/LinearAlgebra.pm');
6+
my $global_version = $MM->parse_version('lib/PDL/LinearAlgebra.pm');
77
pp_setversion($global_version);
88
}
99

10+
{ no warnings 'once'; # pass info back to Makefile.PL
11+
$PDL::Core::Dev::EXTRAS{$::PDLMOD}{OBJECT} .= join '', map " $::PDLBASE-$_\$(OBJ_EXT)", qw(selectfunc);
12+
}
13+
1014
if ($config{CBLAS}){
1115
pp_addhdr('#include <cblas.h>');
1216
}
@@ -76,7 +80,7 @@ sub generate_code($){
7680
}
7781
}
7882

79-
do '../pp_defc.pl'; die if $@;
83+
do './pp_defc.pl'; die if $@;
8084

8185
pp_addpm({At=>'Top'},<<'EOD');
8286
use strict;
File renamed without changes.

Real/real.pd lib/PDL/LinearAlgebra/Real.pd

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
do('../Config');
1+
do('./Config');
22

33
{ # required because PAUSE will reject undefined $VERSION
44
require ExtUtils::MM;
55
my $MM = bless { NAME => 'Fake' }, 'MM';
6-
my $global_version = $MM->parse_version('../lib/PDL/LinearAlgebra.pm');
6+
my $global_version = $MM->parse_version('lib/PDL/LinearAlgebra.pm');
77
pp_setversion($global_version);
88
}
99

10+
{ no warnings 'once'; # pass info back to Makefile.PL
11+
$PDL::Core::Dev::EXTRAS{$::PDLMOD}{OBJECT} .= join '', map " $::PDLBASE-$_\$(OBJ_EXT)", qw(selectfunc);
12+
}
13+
1014
sub generate_code($){
1115
if ($config{WITHOUT_THREAD}){
1216
return '
File renamed without changes.

Trans/trans.pd lib/PDL/LinearAlgebra/Trans.pd

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
{ # required because PAUSE will reject undefined $VERSION
22
require ExtUtils::MM;
33
my $MM = bless { NAME => 'Fake' }, 'MM';
4-
my $global_version = $MM->parse_version('../lib/PDL/LinearAlgebra.pm');
4+
my $global_version = $MM->parse_version('lib/PDL/LinearAlgebra.pm');
55
pp_setversion($global_version);
66
}
77

8+
{ no warnings 'once'; # pass info back to Makefile.PL
9+
$PDL::Core::Dev::EXTRAS{$::PDLMOD}{OBJECT} .= join '', map " $::PDLBASE-$_\$(OBJ_EXT)", qw(selectfunc);
10+
}
11+
812
if ($^O =~ /MSWin/) {
913
pp_addhdr('
1014
#include <float.h>
@@ -347,7 +351,7 @@ ACM - Transactions On Mathematical Software, 24(1):130-156, 1998
347351
EOT
348352
);
349353

350-
do '../pp_defc.pl'; die if $@;
354+
do './pp_defc.pl'; die if $@;
351355
pp_defc('geexp',
352356
Pars => '[io]A(2,n,n);int deg();scale();int trace();int [o]ns();int [o]info(); int [t] ipiv(n)',
353357
Doc => '

0 commit comments

Comments
 (0)