File: proj-no-Alien.patch

package info (click to toggle)
libpdl-transform-proj4-perl 2.098-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 376 kB
  • sloc: perl: 2,823; makefile: 9
file content (76 lines) | stat: -rw-r--r-- 1,931 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Description: Patch the Proj4 Makefile.PLs to not need Alien::proj
Author: Ed J <mohawk2@users.noreply.github.com>
Forwarded: not-needed

--- a/GENERATED/PDL/Transform/Proj4.pm
+++ b/GENERATED/PDL/Transform/Proj4.pm
@@ -33,7 +33,6 @@ use strict;
 use warnings;
 use PDL::LiteF;
 use PDL::Transform;
-use Alien::proj;
 
 =head1 NAME
 
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -2,7 +2,6 @@ use strict;
 use warnings;
 use ExtUtils::MakeMaker;
 use PDL::Core::Dev;
-use Alien::proj;
 
 my @pd_srcs;
 undef &MY::init_PM; # suppress warning
@@ -31,8 +30,7 @@ WriteMakefile(
   TEST_REQUIRES => {
     'Test::More' => '0.88',
   },
-  INC => Alien::proj->cflags,
-  LIBS => [Alien::proj->libs],
+  LIBS => [ '-lproj' ],
   clean => { FILES => join ' ', qw(MANIFEST.bak) },
   NO_MYMETA => 1,
 );
--- a/lib/PDL/Transform/Proj4.pd
+++ b/lib/PDL/Transform/Proj4.pd
@@ -6,7 +6,7 @@
 use strict;
 use warnings;
 use File::Spec;
-use Alien::proj;
+use IPC::Run qw(run);
 
 our $VERSION = "2.098";
 pp_setversion($VERSION);
@@ -104,7 +104,10 @@ my %SKIP = map +($_=>1), qw(
   fixed Earth For CH1903
 );
 sub load_projection_information {
-    my ($text, $stderr, $exit_code) = Alien::proj->run_utility ("proj", "-lP");
+    my @cmd = ("proj", "-lP");
+    my ($text, $stderr, $exit_code, $in);
+    run \@cmd, \$in, \$text, \$stderr;
+    $exit_code = $?;
     warn $stderr if $stderr;
     die "proj -lP error $exit_code. See above for error text." if $exit_code;
     my @chunks = $text =~ /(.+?)(?=(?:^\S|\z))/gms;
@@ -175,7 +178,6 @@ use strict;
 use warnings;
 use PDL::LiteF;
 use PDL::Transform;
-use Alien::proj;
 
 =head1 NAME
 
--- a/t/gis_proj.t
+++ b/t/gis_proj.t
@@ -9,8 +9,6 @@ diag "ENV $_ = ", explain $ENV{$_}
     LC_RUN_PATH);
 }
 use PDL::Transform::Proj4;
-use Alien::proj;
-diag "Alien::proj version $Alien::proj::VERSION";
 
 my @version = eval { PDL::Transform::Proj4::proj_version() };
 is $@, '', 'proj_version no die';