Adding libedit(aka editline) to the port tree.

Patch is fairly small and has been submitted to the upstream maintainer.
This commit is contained in:
Chris Roberts
2009-10-29 21:54:50 +00:00
parent dd613372e0
commit 62a6c620ab
3 changed files with 87 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
DESCRIPTION="libedit - A BSD licensed replacement for the GNU readline library."
HOMEPAGE="http://www.thrysoee.dk/editline/"
SRC_URI="http://www.thrysoee.dk/editline/libedit-20090923-3.0.tar.gz"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD {
cd libedit-20090923-3.0
./configure --prefix=/boot/common
make
}
INSTALL {
cd libedit-20090923-3.0
make install
}

View File

@@ -0,0 +1,5 @@
Package: libedit
Version: 20090923
Copyright: 1992-2009, The NetBSD Foundation, Inc.
License: BSD (3-clause)
URL: http://www.thrysoee.dk/editline/

View File

@@ -0,0 +1,66 @@
diff -ur libedit-20090923-3.0/examples/fileman.c libedit-20090923-3.0-haiku/examples/fileman.c
--- libedit-20090923-3.0/examples/fileman.c 2008-07-12 02:41:43.000000000 -0600
+++ libedit-20090923-3.0-haiku/examples/fileman.c 2009-10-29 15:35:57.000000000 -0600
@@ -11,7 +11,11 @@
#include <sys/types.h>
#include <sys/file.h>
#include <sys/stat.h>
+#if defined(__HAIKU__)
+#include <errno.h>
+#else
#include <sys/errno.h>
+#endif
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
diff -ur libedit-20090923-3.0/src/editline/readline.h libedit-20090923-3.0-haiku/src/editline/readline.h
--- libedit-20090923-3.0/src/editline/readline.h 2009-09-23 15:04:26.000000000 -0600
+++ libedit-20090923-3.0-haiku/src/editline/readline.h 2009-10-29 15:35:17.000000000 -0600
@@ -75,7 +75,7 @@
#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 -ur libedit-20090923-3.0/src/el.c libedit-20090923-3.0-haiku/src/el.c
--- libedit-20090923-3.0/src/el.c 2009-09-23 15:04:26.000000000 -0600
+++ libedit-20090923-3.0-haiku/src/el.c 2009-10-29 15:30:46.000000000 -0600
@@ -41,10 +41,6 @@
#endif
#endif /* not lint && not SCCSID */
-#ifndef MAXPATHLEN
-#define MAXPATHLEN 4096
-#endif
-
/*
* el.c: EditLine interface functions
*/
@@ -56,6 +52,10 @@
#include <ctype.h>
#include "el.h"
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 4096
+#endif
+
/* el_init():
* Initialize editline and set default parameters.
*/
diff -ur libedit-20090923-3.0/src/vis.c libedit-20090923-3.0-haiku/src/vis.c
--- libedit-20090923-3.0/src/vis.c 2009-09-23 15:04:26.000000000 -0600
+++ libedit-20090923-3.0-haiku/src/vis.c 2009-10-29 15:34:45.000000000 -0600
@@ -65,6 +65,10 @@
#include <vis.h>
#include <stdlib.h>
+#if defined(__HAIKU__)
+#include <stdint.h>
+#endif
+
#ifdef __weak_alias
__weak_alias(strsvis,_strsvis)
__weak_alias(strsvisx,_strsvisx)