summaryrefslogtreecommitdiff
path: root/sci-mathematics/pari/files/pari-2.7.0-no-dot-inc.patch
blob: 9d868ef6b6a06fa189cc45b52281e66a5b92aae8 (plain)
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
From 2864fe5b852e443d98af92d8929e359525ccb1a2 Mon Sep 17 00:00:00 2001
From: Kent Fredric <kentfredric@gmail.com>
Date: Sun, 11 Jun 2017 10:31:03 +1200
Subject: [PATCH] Fix for 5.26 removal of '.' in @INC

Previous scripts assumed CWD was in @INC and that "PARI::822" was in
wherever CWD was.

This fixes both of those, and the latter, because its not obvious
from the build system where one should assume CWD to be.

Instead, the absolute path of the directory of these scripts is
inserted into @INC
---
 src/desc/doc_make  | 5 +++++
 src/desc/gen_proto | 4 ++++
 src/desc/merge_822 | 4 ++++
 3 files changed, 13 insertions(+)

diff --git a/src/desc/doc_make b/src/desc/doc_make
index 91b894e..ffbbb78 100755
--- a/src/desc/doc_make
+++ b/src/desc/doc_make
@@ -1,6 +1,11 @@
 #!/usr/bin/perl
 use warnings FATAL => 'all';
 use strict;
+
+use File::Spec;
+use File::Basename qw( dirname );
+use lib dirname(File::Spec->rel2abs(__FILE__));
+
 use PARI::822;
 
 my (%funcs, %Fun_by_sec);
diff --git a/src/desc/gen_proto b/src/desc/gen_proto
index ee55449..5ca0305 100755
--- a/src/desc/gen_proto
+++ b/src/desc/gen_proto
@@ -1,4 +1,8 @@
 #!/usr/bin/perl -w
+use File::Spec;
+use File::Basename qw( dirname );
+use lib dirname(File::Spec->rel2abs(__FILE__));
+
 use PARI::822;
 
 $class=$ARGV[0];
diff --git a/src/desc/merge_822 b/src/desc/merge_822
index 4c9217b..32b3cc9 100755
--- a/src/desc/merge_822
+++ b/src/desc/merge_822
@@ -1,4 +1,8 @@
 #!/usr/bin/perl -w
+use File::Spec;
+use File::Basename qw( dirname );
+use lib dirname(File::Spec->rel2abs(__FILE__));
+
 use PARI::822;
 
 open(IN, $ARGV[0]) || die "cannot find $ARGV[0]";
-- 
2.13.1