mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
libedit: update to version 20230828, remove older recipes. (#9876)
This commit is contained in:
@@ -1,90 +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://thrysoee.dk/editline/"
|
||||
COPYRIGHT="1992-2021 The NetBSD Foundation, Inc."
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://thrysoee.dk/editline/libedit-${portVersion/_/-}.tar.gz"
|
||||
CHECKSUM_SHA256="571ebe44b74860823e24a08cf04086ff104fd7dfa1020abf26c52543134f5602"
|
||||
SOURCE_DIR="libedit-${portVersion/_/-}"
|
||||
PATCHES="libedit-${portVersion/_/-}.patchset"
|
||||
|
||||
ARCHITECTURES="all"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
|
||||
libVersion="0.0.65"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
libedit$secondaryArchSuffix = $portVersion
|
||||
lib:libedit$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libncurses$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
libedit${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libedit$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libedit$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libncurses$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoreconf
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:m4
|
||||
cmd:make
|
||||
cmd:sed
|
||||
"
|
||||
|
||||
defineDebugInfoPackage libedit$secondaryArchSuffix \
|
||||
"$libDir"/libedit.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
autoreconf --force --install
|
||||
runConfigure ./configure --enable-examples=no \
|
||||
--enable-widec
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
# remove libtool file
|
||||
rm -f "$libDir"/libedit.la
|
||||
|
||||
if [ -n "$secondaryArchSuffix" ]; then
|
||||
rm -rf "$documentationDir"
|
||||
maybe_manDir_man3=
|
||||
else
|
||||
maybe_manDir_man3="$manDir"/man3
|
||||
fi
|
||||
|
||||
prepareInstalledDevelLib libedit
|
||||
fixPkgconfig
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
"$developDir" \
|
||||
${maybe_manDir_man3:+"$maybe_manDir_man3"}
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
@@ -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-2021 The NetBSD Foundation, Inc."
|
||||
COPYRIGHT="1992-2023 The NetBSD Foundation, Inc."
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://thrysoee.dk/editline/libedit-${portVersion/_/-}.tar.gz"
|
||||
SOURCE_DIR="libedit-${portVersion/_/-}"
|
||||
CHECKSUM_SHA256="6792a6a992050762edcca28ff3318cdb7de37dccf7bc30db59fcd7017eed13c5"
|
||||
PATCHES="libedit-${portVersion/_/-}.patchset"
|
||||
CHECKSUM_SHA256="4ee8182b6e569290e7d1f44f0f78dac8716b35f656b76528f699c69c98814dad"
|
||||
PATCHES="libedit-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all"
|
||||
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="0.0.68"
|
||||
libVersion="0.0.72"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
@@ -1,132 +0,0 @@
|
||||
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 013fb62..5180019 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -72,7 +72,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([ncurses.h], [],
|
||||
[AC_CHECK_HEADER([curses.h], [],
|
||||
diff --git a/src/editline/readline.h b/src/editline/readline.h
|
||||
index 7e53f41..64a5fb3 100644
|
||||
--- a/src/editline/readline.h
|
||||
+++ b/src/editline/readline.h
|
||||
@@ -76,7 +76,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 ce66205..283cf38 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
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
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 d2bcf11..44dca9d 100644
|
||||
--- a/src/sys.h
|
||||
+++ b/src/sys.h
|
||||
@@ -125,4 +125,8 @@ extern char* tgoto(const char*, int, int);
|
||||
extern char* tgetstr(char*, char**);
|
||||
#endif
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#define NBBY 8
|
||||
+#endif
|
||||
+
|
||||
#endif /* _h_sys */
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
||||
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 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)
|
||||
len = len * 4 + 1;
|
||||
if (len >= maxlen) {
|
||||
maxlen = len + 1024;
|
||||
+ {
|
||||
char *nbuf = el_realloc(buf, maxlen);
|
||||
if (nbuf == NULL) {
|
||||
el_free(buf);
|
||||
return -1;
|
||||
}
|
||||
buf = nbuf;
|
||||
+ }
|
||||
}
|
||||
strvis(buf, ptr, VIS_NL);
|
||||
(void) fprintf(el->el_outfile, "%d\t%s\n",
|
||||
--
|
||||
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
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
From 16e6736e5ab6bc363ef932c11867287f3d218845 Mon Sep 17 00:00:00 2001
|
||||
From 3b54df8e515ccfa21f2c70c2ed958a6093940a72 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 72a41f9..c03c84d 100644
|
||||
index 6ecb255..ffee684 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -72,7 +72,7 @@ AM_CONDITIONAL(ENABLE_EXAMPLES, [test "$enable_examples" = "yes"])
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
@@ -73,7 +73,7 @@ AC_CHECK_INCLUDES_DEFAULT
|
||||
AC_PROG_EGREP
|
||||
|
||||
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])
|
||||
@@ -18,10 +18,10 @@ index 72a41f9..c03c84d 100644
|
||||
AC_CHECK_HEADER([ncurses.h], [],
|
||||
[AC_CHECK_HEADER([curses.h], [],
|
||||
diff --git a/src/editline/readline.h b/src/editline/readline.h
|
||||
index e9f941a..b0db9e0 100644
|
||||
index 03e2d2e..894ebf5 100644
|
||||
--- a/src/editline/readline.h
|
||||
+++ b/src/editline/readline.h
|
||||
@@ -77,7 +77,7 @@ typedef KEYMAP_ENTRY *Keymap;
|
||||
@@ -78,7 +78,7 @@ typedef KEYMAP_ENTRY *Keymap;
|
||||
|
||||
#ifndef CTRL
|
||||
#include <sys/ioctl.h>
|
||||
@@ -31,7 +31,7 @@ index e9f941a..b0db9e0 100644
|
||||
#endif
|
||||
#ifndef CTRL
|
||||
diff --git a/src/vis.c b/src/vis.c
|
||||
index a454874..9981ac2 100644
|
||||
index 00f98f0..c853983 100644
|
||||
--- a/src/vis.c
|
||||
+++ b/src/vis.c
|
||||
@@ -75,6 +75,10 @@ __FBSDID("$FreeBSD$");
|
||||
@@ -46,20 +46,20 @@ index a454874..9981ac2 100644
|
||||
__weak_alias(strvisx,_strvisx)
|
||||
#endif
|
||||
--
|
||||
2.30.2
|
||||
2.42.1
|
||||
|
||||
|
||||
From 993bc4d5d290e6770d5046794659fac47c2ea367 Mon Sep 17 00:00:00 2001
|
||||
From 01328eeefbf7b5941a94bb5b0450fe6ca03b1e45 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 d2bcf11..44dca9d 100644
|
||||
index 0511bad..6ba29a1 100644
|
||||
--- a/src/sys.h
|
||||
+++ b/src/sys.h
|
||||
@@ -125,4 +125,8 @@ extern char* tgoto(const char*, int, int);
|
||||
@@ -132,4 +132,8 @@ extern char* tgoto(const char*, int, int);
|
||||
extern char* tgetstr(char*, char**);
|
||||
#endif
|
||||
|
||||
@@ -69,10 +69,10 @@ index d2bcf11..44dca9d 100644
|
||||
+
|
||||
#endif /* _h_sys */
|
||||
--
|
||||
2.30.2
|
||||
2.42.1
|
||||
|
||||
|
||||
From 7de9dc213a7b3a81b2c43e5af0df60ae6ee4d620 Mon Sep 17 00:00:00 2001
|
||||
From f316faa7dfb62198a82c5301082d9691b36e1b51 Mon Sep 17 00:00:00 2001
|
||||
From: fbrosson <fbrosson@localhost>
|
||||
Date: Thu, 1 Feb 2018 11:05:59 +0000
|
||||
Subject: gcc2 support.
|
||||
@@ -98,20 +98,20 @@ index 19ce1c1..2c88b28 100644
|
||||
strvis(buf, ptr, VIS_NL);
|
||||
(void) fprintf(el->el_outfile, "%d\t%s\n",
|
||||
--
|
||||
2.30.2
|
||||
2.42.1
|
||||
|
||||
|
||||
From 1ea2455e8f597149a1612a8a0fab70245cf58a2b Mon Sep 17 00:00:00 2001
|
||||
From be21054f496d6e830785cdb63235991a74edf4d8 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 84ae508..51501d6 100644
|
||||
index 8354c81..875bedb 100644
|
||||
--- a/src/filecomplete.c
|
||||
+++ b/src/filecomplete.c
|
||||
@@ -707,6 +707,7 @@ fn_complete2(EditLine *el,
|
||||
@@ -712,6 +712,7 @@ fn_complete2(EditLine *el,
|
||||
if (matches == NULL) {
|
||||
goto out;
|
||||
}
|
||||
@@ -119,7 +119,7 @@ index 84ae508..51501d6 100644
|
||||
int i;
|
||||
size_t matches_num, maxlen, match_len, match_display=1;
|
||||
int single_match = matches[2] == NULL &&
|
||||
@@ -814,6 +815,7 @@ out2:
|
||||
@@ -819,6 +820,7 @@ out2:
|
||||
out:
|
||||
el_free(temp);
|
||||
return retval;
|
||||
@@ -128,10 +128,10 @@ index 84ae508..51501d6 100644
|
||||
|
||||
int
|
||||
--
|
||||
2.30.2
|
||||
2.42.1
|
||||
|
||||
|
||||
From e86be215341d8a867f9f005ee66e389a8b4baf12 Mon Sep 17 00:00:00 2001
|
||||
From a49b526579707aa9e2a1129c31d9cf902a66b7cd Mon Sep 17 00:00:00 2001
|
||||
From: PulkoMandy <pulkomandy@pulkomandy.tk>
|
||||
Date: Sun, 10 Apr 2022 22:10:17 +0200
|
||||
Subject: Fix NULL pointer dereference if the prompt contains invalid UTF8
|
||||
@@ -156,5 +156,68 @@ index 026a746..bbad962 100644
|
||||
if (elp->p_ignore == *p) {
|
||||
wchar_t *litstart = ++p;
|
||||
--
|
||||
2.30.2
|
||||
2.42.1
|
||||
|
||||
|
||||
From 4f67b7208698e7415302d7310b68462b3dbac5c1 Mon Sep 17 00:00:00 2001
|
||||
From: Oscar Lesta <oscar.lesta@gmail.com>
|
||||
Date: Mon, 11 Dec 2023 00:49:44 -0300
|
||||
Subject: Fix more parsing errors when using GCC2
|
||||
|
||||
|
||||
diff --git a/src/chared.c b/src/chared.c
|
||||
index 03d31dd..aac2593 100644
|
||||
--- a/src/chared.c
|
||||
+++ b/src/chared.c
|
||||
@@ -650,11 +650,13 @@ el_deletestr1(EditLine *el, int start, int end)
|
||||
|
||||
p1 = el->el_line.buffer + start;
|
||||
p2 = el->el_line.buffer + end;
|
||||
- for (size_t i = 0; i < len; i++) {
|
||||
+ {
|
||||
+ size_t i;
|
||||
+ for (i = 0; i < len; i++) {
|
||||
*p1++ = *p2++;
|
||||
el->el_line.lastchar--;
|
||||
}
|
||||
-
|
||||
+ }
|
||||
if (el->el_line.cursor < el->el_line.buffer)
|
||||
el->el_line.cursor = el->el_line.buffer;
|
||||
|
||||
@@ -679,9 +681,11 @@ el_wreplacestr(EditLine *el, const wchar_t *s)
|
||||
}
|
||||
|
||||
p = el->el_line.buffer;
|
||||
- for (size_t i = 0; i < len; i++)
|
||||
+ {
|
||||
+ size_t i;
|
||||
+ for (i = 0; i < len; i++)
|
||||
*p++ = *s++;
|
||||
-
|
||||
+ }
|
||||
el->el_line.buffer[len] = '\0';
|
||||
el->el_line.lastchar = el->el_line.buffer + len;
|
||||
if (el->el_line.cursor > el->el_line.lastchar)
|
||||
diff --git a/src/chartype.c b/src/chartype.c
|
||||
index 42079a4..fb18a65 100644
|
||||
--- a/src/chartype.c
|
||||
+++ b/src/chartype.c
|
||||
@@ -236,10 +236,13 @@ ct_visual_string(const wchar_t *s, ct_buffer_t *conv)
|
||||
}
|
||||
|
||||
/* failed to encode, need more buffer space */
|
||||
- uintptr_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff;
|
||||
+ {
|
||||
+ uintptr_t sused;
|
||||
+ sused = (uintptr_t)dst - (uintptr_t)conv->wbuff;
|
||||
if (ct_conv_wbuff_resize(conv, conv->wsize + CT_BUFSIZ) == -1)
|
||||
return NULL;
|
||||
dst = conv->wbuff + sused;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (dst >= (conv->wbuff + conv->wsize)) { /* sigh */
|
||||
--
|
||||
2.42.1
|
||||
|
||||
Reference in New Issue
Block a user