perl/perl6-Readline: Updated for version 0.1.4.

Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
Andreas Voegele 2018-07-22 11:39:04 +01:00 committed by Willy Sudiarto Raharjo
parent a9b8e6a8c2
commit 058260cc9e
No known key found for this signature in database
GPG key ID: 887B8374D7333381
3 changed files with 27 additions and 24 deletions

View file

@ -3,17 +3,23 @@ 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.
--- lib/Readline.pm.orig 2017-09-21 10:14:05.000000000 +0200
+++ lib/Readline.pm 2018-07-02 22:14:26.473664202 +0200
@@ -1,5 +1,11 @@
use v6;
use NativeCall;
+
+INIT {
+ my sub tgetnum(Str) returns int32 is native('ncurses') { * }
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('');
+}
+ }
+ }
+ }
+
#
# XXX &cglobal.signature -> (Any $libname, Any $symbol, Any $target-type)
#
( $library, $version )
}

View file

@ -17,12 +17,11 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
PRGNAM=perl6-Readline
VERSION=${VERSION:-0.0.2+e2cf431}
VERSION=${VERSION:-0.1.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
SRCNAM=perl6-readline
GITREF=${GITREF:-e2cf431a87c36d420a3f2737b2cbc160efeb9233}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@ -56,9 +55,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$GITREF
tar xvf $CWD/$SRCNAM-$GITREF.tar.gz
cd $SRCNAM-$GITREF
rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@ -66,9 +65,7 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
if [ "$(readlink /usr/lib${LIBDIRSUFFIX}/libreadline.so)" = "libreadline.so.6" ]; then
patch -b -p0 < $CWD/ncurses.patch
fi
patch -b -p1 < $CWD/ncurses.patch
if [ "${MAKETEST:-no}" = "yes" ]; then
env PERL6LIB=lib prove -e perl6

View file

@ -1,8 +1,8 @@
PRGNAM="perl6-Readline"
VERSION="0.0.2+e2cf431"
VERSION="0.1.4"
HOMEPAGE="https://github.com/drforr/perl6-readline"
DOWNLOAD="https://github.com/drforr/perl6-readline/archive/e2cf431/perl6-readline-e2cf431a87c36d420a3f2737b2cbc160efeb9233.tar.gz"
MD5SUM="b43e7c8947b2c6506bcf84827a3bff2f"
DOWNLOAD="https://github.com/drforr/perl6-readline/archive/0.1.4/perl6-readline-0.1.4.tar.gz"
MD5SUM="7e827ad1ac9c7498f1b7f2fbebb05e11"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="rakudo"