aboutsummaryrefslogtreecommitdiff
path: root/perl/perl6-Readline/ncurses.patch
blob: ea103ee2d9c0e501f511fa31075d897bee62a789 (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
From: https://github.com/drforr/perl6-readline/issues/23

On Slackware 14.2, symbols from ncurses need to be loaded before symbols from
readline can be used.

diff --git a/lib/Readline.pm b/lib/Readline.pm
index 6001792..94db447 100644
--- a/lib/Readline.pm
+++ b/lib/Readline.pm
@@ -711,6 +711,15 @@ class Readline:ver<0.1.4> {
       last;
     }
 
+    given $*DISTRO.name {
+      when 'slackware' {
+        if $version ~~ v6 {
+          my sub tgetnum(Str --> int32) is native('ncurses') { * }
+          tgetnum('');
+        }
+      }
+    }
+
     ( $library, $version )
   }