libedit: bump to 20170329-3.1, add debuginfo package. (#2168)

Also add a tiny gcc2 patch and drop docs on secondary arch.

Remark: "--enable-widec" is now enabled by default in configure.
This commit is contained in:
fbrosson
2018-02-14 00:45:48 +00:00
committed by waddlesplash
parent 8bde92b21c
commit 7eafec092d
2 changed files with 71 additions and 25 deletions

View File

@@ -3,21 +3,24 @@ DESCRIPTION="This is an autotool- and libtoolized port of the NetBSD Editline li
(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."
HOMEPAGE="http://thrysoee.dk/editline/"
COPYRIGHT="1992-2018 The NetBSD Foundation, Inc."
LICENSE="BSD (3-clause)"
REVISION="2"
SOURCE_URI="http://www.thrysoee.dk/editline/libedit-20141030-3.1.tar.gz"
CHECKSUM_SHA256="9701e16570fb8f7fa407b506986652221b701a9dd61defc05bb7d1c61cdf5a40"
SOURCE_DIR="libedit-20141029-3.1"
PATCHES="libedit-2014_10_30_3.1.patchset"
REVISION="1"
SOURCE_URI="http://thrysoee.dk/editline/libedit-${portVersion/_/-}.tar.gz"
CHECKSUM_SHA256="91f2d90fbd2a048ff6dad7131d9a39e690fd8a8fd982a353f1333dd4017dd4be"
SOURCE_DIR="libedit-${portVersion/_/-}"
PATCHES="libedit-${portVersion/_/-}.patchset"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
libVersion="0.0.56"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libedit$secondaryArchSuffix = $portVersion
lib:libedit$secondaryArchSuffix = 0.0.52 compat >= 0
lib:libedit$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
@@ -26,7 +29,7 @@ REQUIRES="
PROVIDES_devel="
libedit${secondaryArchSuffix}_devel = $portVersion
devel:libedit$secondaryArchSuffix = 0.0.52 compat >= 0
devel:libedit$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
libedit$secondaryArchSuffix == $portVersion base
@@ -42,14 +45,18 @@ BUILD_PREREQUIRES="
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
runConfigure ./configure --enable-examples=no
make $jobArgs
}
@@ -57,13 +64,23 @@ INSTALL()
{
make install
prepareInstalledDevelLibs libedit
# 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 \
$manDir/man3
"$developDir" \
"$maybe_manDir_man3"
}
TEST()

View File

@@ -1,27 +1,27 @@
From 176329a96c16bf0508724fb05c1b3f8d6d6eab80 Mon Sep 17 00:00:00 2001
From 0f4e432383e03e9885dbe8f43a2d988bbd327198 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
index 9a571b2..c4bff22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,7 +78,7 @@ AM_CONDITIONAL(ENABLE_EXAMPLES, [test "$enable_examples" = "yes"])
@@ -70,7 +70,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!])],[])
AC_CHECK_HEADER([ncurses.h], [],
[AC_CHECK_HEADER([curses.h], [],
diff --git a/src/editline/readline.h b/src/editline/readline.h
index 932febb..08650d6 100644
index 777a4c6..0fc61af 100644
--- a/src/editline/readline.h
+++ b/src/editline/readline.h
@@ -75,7 +75,7 @@ typedef KEYMAP_ENTRY *Keymap;
@@ -74,7 +74,7 @@ typedef KEYMAP_ENTRY *Keymap;
#ifndef CTRL
#include <sys/ioctl.h>
@@ -31,7 +31,7 @@ index 932febb..08650d6 100644
#endif
#ifndef CTRL
diff --git a/src/vis.c b/src/vis.c
index d67f551..592f4a1 100644
index 914e7b1..69da62d 100644
--- a/src/vis.c
+++ b/src/vis.c
@@ -75,6 +75,10 @@ __FBSDID("$FreeBSD$");
@@ -46,20 +46,20 @@ index d67f551..592f4a1 100644
__weak_alias(strvisx,_strvisx)
#endif
--
1.8.3.4
2.16.1
From f02342663ecd194b8e8811bf074014bd02e20836 Mon Sep 17 00:00:00 2001
From a841ec9f4fba924405644e532843ab83df9c43ec 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
index e575432..a7d57e2 100644
--- a/src/sys.h
+++ b/src/sys.h
@@ -139,4 +139,8 @@ extern char* tgoto(const char*, int, int);
@@ -124,4 +124,8 @@ extern char* tgoto(const char*, int, int);
extern char* tgetstr(char*, char**);
#endif
@@ -71,3 +71,32 @@ index 25b14bb..5425e3a 100644
--
1.8.3.4
From 95b6557ba475077242e35969615f961259c2ff3e 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
--- 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.16.1