-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PDL::Transform::Proj4 switch to new lib/*.pd scheme
- Loading branch information
Showing
7 changed files
with
32 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Proj4.c | ||
Proj4.pm | ||
Proj4.xs | ||
lib/PDL/Transform/Proj4.c | ||
lib/PDL/Transform/Proj4.pm | ||
lib/PDL/Transform/Proj4.xs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,34 @@ | ||
use strict; | ||
use warnings; | ||
use ExtUtils::MakeMaker; | ||
|
||
my $package_name = "PDL::Transform::Proj4"; | ||
my $lib_name = "Proj4"; | ||
use PDL::Core::Dev; | ||
|
||
eval { require Alien::proj }; | ||
if ($@) { | ||
write_dummy_make("Will skip build of $package_name on this system - no Alien::proj"); | ||
write_dummy_make("Will skip build of PDL::Transform::Proj4 on this system - no Alien::proj"); | ||
return; | ||
} | ||
|
||
my $ppfile = "proj4.pd"; | ||
my $package = [$ppfile, 'Proj4', $package_name]; | ||
my %hash = pdlpp_stdargs_int($package); | ||
$hash{VERSION_FROM} = $ppfile; | ||
$hash{LIBS}[0] .= ' ' . Alien::proj->libs; | ||
$hash{INC} .= ' ' . Alien::proj->cflags; | ||
$hash{realclean} ||= { FILES => '' }; | ||
$hash{realclean}{FILES} .= ' _Inline'; | ||
$hash{PM}{'Demo.pm'} = '$(INST_LIB)/PDL/Demos/Proj4_demo.pm'; | ||
my @pd_srcs; | ||
undef &MY::init_PM; # suppress warning | ||
*MY::init_PM = sub { | ||
package MY; # so that "SUPER" works right | ||
my ($self) = @_; | ||
$self->SUPER::init_PM; | ||
@pd_srcs = ::pdlpp_eumm_update_deep($self); | ||
}; | ||
|
||
undef &MY::postamble; # suppress warning | ||
*MY::postamble = sub { pdlpp_postamble_int( $package ); }; | ||
WriteMakefile(%hash); | ||
*MY::postamble = sub { pdlpp_postamble_int(@pd_srcs); }; | ||
|
||
WriteMakefile( | ||
NAME => 'PDL', | ||
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()], | ||
LIBS => [Alien::proj->libs], | ||
clean => { FILES => join ' ', qw(MANIFEST.bak) }, | ||
NO_MYMETA => 1, | ||
); |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters