libedit: update to current version.

This commit is contained in:
PulkoMandy
2022-04-10 17:48:20 +02:00
parent 4d1b41a956
commit 5439f25322
4 changed files with 49 additions and 170 deletions

View File

@@ -1,79 +0,0 @@
SUMMARY="A BSD licensed replacement for the GNU readline library"
DESCRIPTION="
This is an autotool- and libtoolized port of the NetBSD Editline library \
(libedit). This Berkeley-style licensed command line editor library provides \
generic line editing, history, and tokenization functions, similar to those \
found in GNU Readline.
"
HOMEPAGE="http://www.thrysoee.dk/editline/"
COPYRIGHT="1992-2014 The NetBSD Foundation, Inc."
LICENSE="BSD (3-clause)"
REVISION="9"
SOURCE_URI="http://www.thrysoee.dk/editline/libedit-20150325-3.1.tar.gz"
CHECKSUM_SHA256="c88a5e4af83c5f40dda8455886ac98923a9c33125699742603a88a0253fcc8c5"
SOURCE_DIR="libedit-20150325-3.1"
PATCHES="libedit-2015_03_25_3.1.patchset"
ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
libedit$secondaryArchSuffix = $portVersion
lib:libedit$secondaryArchSuffix = 0.0.53 compat >= 0
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libncurses$secondaryArchSuffix
"
PROVIDES_devel="
libedit${secondaryArchSuffix}_devel = $portVersion
devel:libedit$secondaryArchSuffix = 0.0.53 compat >= 0
"
REQUIRES_devel="
libedit$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
devel:libncurses$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:aclocal
cmd:autoreconf
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:m4
cmd:make
cmd:sed
"
BUILD()
{
mkdir m4
autoreconf --force --install
runConfigure ./configure --enable-examples=no --enable-widec
make $jobArgs
}
INSTALL()
{
make install
# remove libtool file
rm $libDir/libedit.la
prepareInstalledDevelLibs libedit
fixPkgconfig
# devel package
packageEntries devel \
$developDir \
$manDir/man3
}
TEST()
{
make check
}

View File

@@ -4,18 +4,18 @@ DESCRIPTION="This is an autotool- and libtoolized port of the NetBSD Editline li
generic line editing, history, and tokenization functions, similar to those \
found in GNU Readline."
HOMEPAGE="http://thrysoee.dk/editline/"
COPYRIGHT="1992-2018 The NetBSD Foundation, Inc."
COPYRIGHT="1992-2021 The NetBSD Foundation, Inc."
LICENSE="BSD (3-clause)"
REVISION="2"
REVISION="1"
SOURCE_URI="http://thrysoee.dk/editline/libedit-${portVersion/_/-}.tar.gz"
CHECKSUM_SHA256="c41bea8fd140fb57ba67a98ec1d8ae0b8ffa82f4aba9c35a87e5a9499e653116"
SOURCE_DIR="libedit-${portVersion/_/-}"
CHECKSUM_SHA256="6792a6a992050762edcca28ff3318cdb7de37dccf7bc30db59fcd7017eed13c5"
PATCHES="libedit-${portVersion/_/-}.patchset"
ARCHITECTURES="all"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
libVersion="0.0.58"
libVersion="0.0.68"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
@@ -56,7 +56,8 @@ defineDebugInfoPackage libedit$secondaryArchSuffix \
BUILD()
{
autoreconf --force --install
runConfigure ./configure --enable-examples=no
runConfigure ./configure --enable-examples=no \
--enable-widec
make $jobArgs
}

View File

@@ -1,73 +0,0 @@
From 176329a96c16bf0508724fb05c1b3f8d6d6eab80 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 26 Nov 2014 16:48:13 +0000
Subject: Haiku patch
diff --git a/configure.ac b/configure.ac
index 8524d41..cbef26d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,7 +78,7 @@ AM_CONDITIONAL(ENABLE_EXAMPLES, [test "$enable_examples" = "yes"])
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stdlib.h string.h sys/ioctl.h sys/param.h unistd.h curses.h ncurses.h sys/cdefs.h termcap.h])
+AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stdint.h stdlib.h string.h sys/errno.h errno.h sys/ioctl.h sys/param.h unistd.h curses.h ncurses.h sys/cdefs.h langinfo.h])
AC_CHECK_HEADER([termios.h], [], [AC_MSG_ERROR([termios.h is required!])],[])
diff --git a/src/editline/readline.h b/src/editline/readline.h
index 932febb..08650d6 100644
--- a/src/editline/readline.h
+++ b/src/editline/readline.h
@@ -75,7 +75,7 @@ typedef KEYMAP_ENTRY *Keymap;
#ifndef CTRL
#include <sys/ioctl.h>
-#if !defined(__sun) && !defined(__hpux) && !defined(_AIX)
+#if !defined(__sun) && !defined(__hpux) && !defined(_AIX) && !defined(__HAIKU__)
#include <sys/ttydefaults.h>
#endif
#ifndef CTRL
diff --git a/src/vis.c b/src/vis.c
index d67f551..592f4a1 100644
--- a/src/vis.c
+++ b/src/vis.c
@@ -75,6 +75,10 @@ __FBSDID("$FreeBSD$");
#include <wchar.h>
#include <wctype.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
#ifdef __weak_alias
__weak_alias(strvisx,_strvisx)
#endif
--
1.8.3.4
From f02342663ecd194b8e8811bf074014bd02e20836 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 26 Nov 2014 16:55:47 +0000
Subject: define NBBY
diff --git a/src/sys.h b/src/sys.h
index 25b14bb..5425e3a 100644
--- a/src/sys.h
+++ b/src/sys.h
@@ -139,4 +139,8 @@ extern char* tgoto(const char*, int, int);
extern char* tgetstr(char*, char**);
#endif
+#ifdef __HAIKU__
+#define NBBY 8
+#endif
+
#endif /* _h_sys */
--
1.8.3.4

View File

@@ -1,14 +1,14 @@
From 0f4e432383e03e9885dbe8f43a2d988bbd327198 Mon Sep 17 00:00:00 2001
From a68cec6b9b23f1632f14e74e86778ff248ecc8cd Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 26 Nov 2014 16:48:13 +0000
Subject: Haiku patch
diff --git a/configure.ac b/configure.ac
index a5e3885..aff8782 100644
index 013fb62..5180019 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,7 +70,7 @@ AM_CONDITIONAL(ENABLE_EXAMPLES, [test "$enable_examples" = "yes"])
@@ -72,7 +72,7 @@ AM_CONDITIONAL(ENABLE_EXAMPLES, [test "$enable_examples" = "yes"])
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
@@ -18,10 +18,10 @@ index a5e3885..aff8782 100644
AC_CHECK_HEADER([ncurses.h], [],
[AC_CHECK_HEADER([curses.h], [],
diff --git a/src/editline/readline.h b/src/editline/readline.h
index a2a6c15..fe1069f 100644
index 7e53f41..64a5fb3 100644
--- a/src/editline/readline.h
+++ b/src/editline/readline.h
@@ -74,7 +74,7 @@ typedef KEYMAP_ENTRY *Keymap;
@@ -76,7 +76,7 @@ typedef KEYMAP_ENTRY *Keymap;
#ifndef CTRL
#include <sys/ioctl.h>
@@ -46,20 +46,20 @@ index ce66205..283cf38 100644
__weak_alias(strvisx,_strvisx)
#endif
--
2.16.1
2.30.2
From a841ec9f4fba924405644e532843ab83df9c43ec Mon Sep 17 00:00:00 2001
From 95fc6ef00932e10efe45dbc379249d64cfc31d14 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 26 Nov 2014 16:55:47 +0000
Subject: define NBBY
diff --git a/src/sys.h b/src/sys.h
index e575432..a7d57e2 100644
index d2bcf11..44dca9d 100644
--- a/src/sys.h
+++ b/src/sys.h
@@ -124,4 +124,8 @@ extern char* tgoto(const char*, int, int);
@@ -125,4 +125,8 @@ extern char* tgoto(const char*, int, int);
extern char* tgetstr(char*, char**);
#endif
@@ -69,17 +69,17 @@ index e575432..a7d57e2 100644
+
#endif /* _h_sys */
--
1.8.3.4
2.30.2
From 95b6557ba475077242e35969615f961259c2ff3e Mon Sep 17 00:00:00 2001
From 70f3f89ddea86c9b0307ec7f717d6cde4c8fc16d Mon Sep 17 00:00:00 2001
From: fbrosson <fbrosson@localhost>
Date: Thu, 1 Feb 2018 11:05:59 +0000
Subject: gcc2 support.
diff --git a/src/hist.c b/src/hist.c
index 3c9db7d..4c98944 100644
index 19ce1c1..2c88b28 100644
--- a/src/hist.c
+++ b/src/hist.c
@@ -188,12 +188,14 @@ hist_command(EditLine *el, int argc, const wchar_t **argv)
@@ -98,5 +98,35 @@ index 3c9db7d..4c98944 100644
strvis(buf, ptr, VIS_NL);
(void) fprintf(el->el_outfile, "%d\t%s\n",
--
2.16.1
2.30.2
From eaa32eed8c5a2f5709a3c71d2e6baf346775e46e Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 1 May 2021 09:40:38 +0000
Subject: Another gcc2 patch
diff --git a/src/filecomplete.c b/src/filecomplete.c
index baca190..a49ad41 100644
--- a/src/filecomplete.c
+++ b/src/filecomplete.c
@@ -707,6 +707,7 @@ fn_complete2(EditLine *el,
if (matches == NULL) {
goto out;
}
+ {
int i;
size_t matches_num, maxlen, match_len, match_display=1;
int single_match = matches[2] == NULL &&
@@ -813,6 +814,7 @@ fn_complete2(EditLine *el,
out:
el_free(temp);
return retval;
+ }
}
int
--
2.30.2