Skip to content

Commit

Permalink
Transform::Proj4 use Alien::proj better for build - #499
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Oct 3, 2024
1 parent 23fdf9f commit ff325ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- split Graphics/IIS out to separate PDL::Graphics::IIS distro
- split Libtmp/Minuit out to separate PDL::Minuit distro
- Transform::Proj4 add NoPthread as using non-thread-safe API
- Transform::Proj4 use Alien::proj better for build (#499) - thanks @shawnlaffan

2.093 2024-09-29
- PDL.set_datatype now doesn't physicalise input, PDL.convert_type does
Expand Down
8 changes: 4 additions & 4 deletions Libtmp/Transform/Proj4/proj4.pd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use strict;
use warnings;
use File::Spec;
use Alien::proj;

our $VERSION = "1.32";

Expand Down Expand Up @@ -144,7 +145,7 @@ my %SKIP = map +($_=>1), qw(
fixed Earth For CH1903
);
sub load_projection_information {
my $text = do { open my $fh, '-|', qw(proj -lP) or die "proj -lP: $!"; local $/; <$fh> };
my $text = Alien::proj->run_utility ("proj", "-lP");
my @chunks = $text =~ /(.+?)(?=(?:^\S|\z))/gms;
chomp for @chunks;
my %descriptions = map {
Expand Down Expand Up @@ -526,12 +527,11 @@ sub proj_params
# Returns a string with information about what parameters proj will
# actually use, this includes defaults, and +init=file stuff. It's
# the same as running 'proj -v'. It uses the proj command line, so
# it might not work with all shells. I've tested it with bash.
# the same as running 'proj -v'.
sub get_proj_info
{
my $params = shift;
my @a = split(/\n/, `echo | proj -v $params`);
my @a = split /\n/, Alien::proj->run_utility ("proj", "-v", $params);
pop(@a);
return join("\n", @a);
}
Expand Down

0 comments on commit ff325ba

Please sign in to comment.