summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorryoon <ryoon>2013-07-15 01:42:47 +0000
committerryoon <ryoon>2013-07-15 01:42:47 +0000
commitc8414b4cd3db9eef552a58a71b6d60ee0aa86e39 (patch)
tree3bd9d425439aa0dfea768be70ff7f6ce2dcd4b7c /devel
parentd97257bc31c5e8f38cff09a7274ab8328898cecc (diff)
downloadpkgsrc-c8414b4cd3db9eef552a58a71b6d60ee0aa86e39.tar.gz
Import editline-3.1.20130712 as devel/editline.
Based on wip/editline by reed@. 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.
Diffstat (limited to 'devel')
-rw-r--r--devel/editline/DESCR4
-rw-r--r--devel/editline/Makefile23
-rw-r--r--devel/editline/PLIST29
-rw-r--r--devel/editline/buildlink3.mk26
-rw-r--r--devel/editline/builtin.mk52
-rw-r--r--devel/editline/distinfo7
-rw-r--r--devel/editline/patches/patch-ab29
-rw-r--r--devel/editline/patches/patch-ac12
8 files changed, 182 insertions, 0 deletions
diff --git a/devel/editline/DESCR b/devel/editline/DESCR
new file mode 100644
index 00000000000..5472387eeac
--- /dev/null
+++ b/devel/editline/DESCR
@@ -0,0 +1,4 @@
+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.
diff --git a/devel/editline/Makefile b/devel/editline/Makefile
new file mode 100644
index 00000000000..0aba91d1159
--- /dev/null
+++ b/devel/editline/Makefile
@@ -0,0 +1,23 @@
+# $NetBSD: Makefile,v 1.1 2013/07/15 01:42:47 ryoon Exp $
+#
+
+DISTNAME= libedit-20130712-3.1
+PKGNAME= editline-3.1.20130712
+CATEGORIES= devel
+MASTER_SITES= http://www.thrysoee.dk/editline/
+
+MAINTAINER= ryoon@NetBSD.org
+HOMEPAGE= http://www.thrysoee.dk/editline/
+COMMENT= NetBSD Editline library (libedit) for generic line editing
+LICENSE= modified-bsd
+
+USE_LIBTOOL= yes
+GNU_CONFIGURE= yes
+USE_LANGUAGES= c c++
+USE_TOOLS+= automake autoreconf
+
+pre-configure:
+ cd ${WRKSRC} && autoreconf
+
+.include "../../mk/termcap.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/devel/editline/PLIST b/devel/editline/PLIST
new file mode 100644
index 00000000000..5287688b5fa
--- /dev/null
+++ b/devel/editline/PLIST
@@ -0,0 +1,29 @@
+@comment $NetBSD: PLIST,v 1.1 2013/07/15 01:42:47 ryoon Exp $
+include/editline/readline.h
+include/histedit.h
+lib/libedit.la
+lib/pkgconfig/libedit.pc
+man/man3/editline.3
+man/man3/el_deletestr.3
+man/man3/el_end.3
+man/man3/el_get.3
+man/man3/el_getc.3
+man/man3/el_gets.3
+man/man3/el_history.3
+man/man3/el_history_end.3
+man/man3/el_history_init.3
+man/man3/el_init.3
+man/man3/el_insertstr.3
+man/man3/el_line.3
+man/man3/el_parse.3
+man/man3/el_push.3
+man/man3/el_reset.3
+man/man3/el_resize.3
+man/man3/el_set.3
+man/man3/el_source.3
+man/man3/el_tok_end.3
+man/man3/el_tok_init.3
+man/man3/el_tok_line.3
+man/man3/el_tok_reset.3
+man/man3/el_tok_str.3
+man/man5/editrc.5
diff --git a/devel/editline/buildlink3.mk b/devel/editline/buildlink3.mk
new file mode 100644
index 00000000000..1b7092f71d3
--- /dev/null
+++ b/devel/editline/buildlink3.mk
@@ -0,0 +1,26 @@
+# $NetBSD: buildlink3.mk,v 1.1 2013/07/15 01:42:47 ryoon Exp $
+
+BUILDLINK_TREE+= editline
+
+.if !defined(EDITLINE_BUILDLINK3_MK)
+EDITLINE_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.editline+= editline>=3.0.20130712
+BUILDLINK_PKGSRCDIR.editline?= ../../devel/editline
+
+BUILDLINK_FILES.editline+= include/history.h
+BUILDLINK_FILES.editline+= include/readline.h
+
+BUILDLINK_FNAME_TRANSFORM.editline+= -e 's|include/editline/readline\.h|include/readline/history.h|g'
+BUILDLINK_FNAME_TRANSFORM.editline+= -e 's|include/editline/readline\.h|include/readline/readline.h|g'
+
+CHECK_BUILTIN.editline:= yes
+.include "../../devel/editline/builtin.mk"
+CHECK_BUILTIN.editline:= no
+
+USE_BUILTIN.termcap= yes
+
+.include "../../mk/termcap.buildlink3.mk"
+.endif # EDITLINE_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -editline
diff --git a/devel/editline/builtin.mk b/devel/editline/builtin.mk
new file mode 100644
index 00000000000..14144e01059
--- /dev/null
+++ b/devel/editline/builtin.mk
@@ -0,0 +1,52 @@
+# $NetBSD: builtin.mk,v 1.1 2013/07/15 01:42:47 ryoon Exp $
+
+BUILTIN_PKG:= editline
+
+BUILTIN_FIND_LIBS:= edit
+BUILTIN_FIND_FILES_VAR:= H_EDITLINE
+BUILTIN_FIND_FILES.H_EDITLINE= /usr/include/readline/readline.h
+
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
+.if !defined(IS_BUILTIN.editline)
+IS_BUILTIN.editline= no
+. if empty(H_EDITLINE:M__nonexistent__) && \
+ !empty(BUILTIN_LIB_FOUND.edit:M[yY][eE][sS])
+IS_BUILTIN.editline= yes
+. endif
+.endif
+MAKEVARS+= IS_BUILTIN.editline
+
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
+.if !defined(USE_BUILTIN.editline)
+. if ${PREFER.editline} == "pkgsrc"
+USE_BUILTIN.editline= no
+. else
+USE_BUILTIN.editline= ${IS_BUILTIN.editline}
+. if defined(BUILTIN_PKG.editline) && \
+ !empty(IS_BUILTIN.editline:M[yY][eE][sS])
+USE_BUILTIN.editline= yes
+. endif
+# XXX
+# XXX By default, assume that the native editline library is good enough
+# XXX to replace GNU readline if it provides the readline-compatibility
+# XXX headers.
+# XXX
+. if !empty(BUILTIN_LIB_FOUND.edit:M[yY][eE][sS]) && \
+ empty(H_EDITLINE:M__nonexistent__)
+USE_BUILTIN.editline= yes
+. endif
+MAKEVARS+= USE_BUILTIN.readline
+
+BUILDLINK_TRANSFORM+= l:history:edit:${BUILTIN_LIBNAME.termcap}
+BUILDLINK_TRANSFORM+= l:readline:edit:${BUILTIN_LIBNAME.termcap}
+.endif
+
+.endif # CHECK_BUILTIN.readline
diff --git a/devel/editline/distinfo b/devel/editline/distinfo
new file mode 100644
index 00000000000..5a42f698d3d
--- /dev/null
+++ b/devel/editline/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2013/07/15 01:42:47 ryoon Exp $
+
+SHA1 (libedit-20130712-3.1.tar.gz) = 6bb65d88244a89680cec73682093f66c01a8a9b9
+RMD160 (libedit-20130712-3.1.tar.gz) = 69f55494ebe04f9f01c3a7cde515484a1095337e
+Size (libedit-20130712-3.1.tar.gz) = 483857 bytes
+SHA1 (patch-ab) = 29ed6d0aad2a4c76ada124867cb0e3ff88b8030e
+SHA1 (patch-ac) = 71b27006acc43128ad9756e07eb79e961f6f9c94
diff --git a/devel/editline/patches/patch-ab b/devel/editline/patches/patch-ab
new file mode 100644
index 00000000000..daea283f28b
--- /dev/null
+++ b/devel/editline/patches/patch-ab
@@ -0,0 +1,29 @@
+$NetBSD: patch-ab,v 1.1 2013/07/15 01:42:47 ryoon Exp $
+
+--- acinclude.m4.orig 2005-08-28 17:26:59.000000000 +0900
++++ acinclude.m4
+@@ -65,3 +65,23 @@ AC_DEFUN([EL_GETPW_R_DRAFT],
+ AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)])
+ ])
++
++AC_DEFUN([EL_PRAGMA_WEAK],
++[
++ AC_MSG_CHECKING([if we can use C pragma weak SYM])
++ AC_RUN_IFELSE([#include <stdio.h>
++ #pragma weak ___non_existent_function___
++ extern void ___non_existent_function___(void);
++ int main(void) {
++ if (___non_existent_function___ == 0) {
++ return 0;
++ }
++ else {
++ return 1;
++ }
++ }],
++ [AC_DEFINE([HAVE_PRAGMA_WEAK], 1, [Define to 1 if we can use C pragma weak SYM.])
++ AC_MSG_RESULT(yes)],
++ [AC_MSG_RESULT(no)],
++ [AC_MSG_RESULT(cross compiling; assumed `no')])
++])
+\ No newline at end of file
diff --git a/devel/editline/patches/patch-ac b/devel/editline/patches/patch-ac
new file mode 100644
index 00000000000..2a014487887
--- /dev/null
+++ b/devel/editline/patches/patch-ac
@@ -0,0 +1,12 @@
+$NetBSD: patch-ac,v 1.1 2013/07/15 01:42:47 ryoon Exp $
+
+--- configure.ac.orig 2009-01-11 19:33:42.000000000 +0900
++++ configure.ac
+@@ -57,6 +57,7 @@ AC_C_CONST
+ AC_TYPE_PID_T
+ AC_TYPE_SIZE_T
+ AC_CHECK_TYPES([u_int32_t])
++EL_PRAGMA_WEAK
+
+ # Checks for library functions.
+ AC_FUNC_CLOSEDIR_VOID