summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam>2001-05-17 20:28:18 +0000
committerjlam <jlam>2001-05-17 20:28:18 +0000
commit8091b93b3e908e7b277dac18a893aadc77cba0b5 (patch)
tree0fd7fe6fcb8ea0dcae9c80a19812488a2e8f17ae
parent4b0dd0aca29a8c719d545323a4f3049ab79f3d23 (diff)
downloadpkgsrc-8091b93b3e908e7b277dac18a893aadc77cba0b5.tar.gz
Use devel/readline/Makefile.readline to check for libedit readline
emulation.
-rw-r--r--devel/cmdline/Makefile16
-rw-r--r--devel/cmdline/distinfo4
-rw-r--r--devel/cmdline/patches/patch-bg29
3 files changed, 18 insertions, 31 deletions
diff --git a/devel/cmdline/Makefile b/devel/cmdline/Makefile
index c83d17add12..9387411973a 100644
--- a/devel/cmdline/Makefile
+++ b/devel/cmdline/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2001/02/16 14:38:20 wiz Exp $
+# $NetBSD: Makefile,v 1.4 2001/05/17 20:28:18 jlam Exp $
DISTNAME= CmdLine
PKGNAME= cmdline-${PKG_VERS}
@@ -16,17 +16,15 @@ DIST_SUBDIR= cmdline-${DIST_VERS}
USE_LIBTOOL= # defined
NO_CONFIGURE= # defined
-.if exists(/usr/include/readline.h)
-MOREUSRDEFS+= -DHAVE_READLINE_H
-MOREUSRLIBS+= -ledit -ltermcap
-.else
-DEPENDS+= readline-*:../../devel/readline
-MOREUSRDEFS+= -DHAVE_READLINE_READLINE_H
-MOREUSRLIBS+= ${LDFLAGS} -lreadline -ltermcap
-.endif
+.include "../../devel/readline/Makefile.readline"
+
+MOREUSRDEFS= -I${WRKINCDIR}/readline
+MOREUSRLIBS= -L${WRKLIBDIR} -lreadline -ltermcap
MAKE_ENV+= OPT="${CXXFLAGS}"
MAKE_ENV+= MOREUSRDEFS="${MOREUSRDEFS}"
MAKE_ENV+= MOREUSRLIBS="${MOREUSRLIBS}"
+pre-build: link-readline-headers link-readline-libs
+
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/cmdline/distinfo b/devel/cmdline/distinfo
index b4213df0422..05b2faaf2ee 100644
--- a/devel/cmdline/distinfo
+++ b/devel/cmdline/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2001/04/23 09:15:09 skrll Exp $
+$NetBSD: distinfo,v 1.4 2001/05/17 20:28:18 jlam Exp $
SHA1 (cmdline-1.04/CmdLine.tar.gz) = 9d2bebc7faf8e47d69fd272367e1a4051bb81e13
Size (cmdline-1.04/CmdLine.tar.gz) = 97602 bytes
@@ -34,7 +34,7 @@ SHA1 (patch-bc) = bacf35667b07ba5b3efdbfaed5e1a4e8edadd277
SHA1 (patch-bd) = e04f4128a9c878e270e5ad5f466d0b4bb50ec7ea
SHA1 (patch-be) = 79f8538cdeb8cf85f5696ddf32acd1c77b2cca0a
SHA1 (patch-bf) = 0d6f0cef2adc998e6314fbe759339d6f6abc9af9
-SHA1 (patch-bg) = 5486a89035d1a9757d8cc99c127cea33c2dc56f7
+SHA1 (patch-bg) = 8572f5193e937885971c775cb257634e30fa7a76
SHA1 (patch-bh) = 24a2379a499966c8d3340f489e80a5f4dc2a80df
SHA1 (patch-bi) = 0d4f8df93636b6320c0928fb8134801fd8894560
SHA1 (patch-bj) = f9607d23393417a1f7e34f6a5fb3004b6c19402b
diff --git a/devel/cmdline/patches/patch-bg b/devel/cmdline/patches/patch-bg
index c8acdaf2509..cbd557c620e 100644
--- a/devel/cmdline/patches/patch-bg
+++ b/devel/cmdline/patches/patch-bg
@@ -1,8 +1,8 @@
-$NetBSD: patch-bg,v 1.1.1.1 2000/08/25 16:15:54 jlam Exp $
+$NetBSD: patch-bg,v 1.2 2001/05/17 20:28:19 jlam Exp $
--- src/lib/private.c.orig Thu Jan 2 13:33:34 1997
+++ src/lib/private.c
-@@ -18,20 +18,29 @@
+@@ -18,14 +18,19 @@
//
// 03/03/93 Brad Appleton <bradapp@enteract.com>
// - Added exit_handler() and quit() member-functions to CmdLine
@@ -28,18 +28,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2000/08/25 16:15:54 jlam Exp $
extern "C" {
int isatty(int fd);
-
- #ifdef GNU_READLINE
--# include <readline.h>
-+# ifdef HAVE_READLINE_H
-+# include <readline.h>
-+# elif HAVE_READLINE_READLINE_H
-+# include <readline/readline.h>
-+# endif
- #endif
-
- }
-@@ -48,8 +57,14 @@
+@@ -48,8 +53,14 @@
#include "cmdline.h"
#include "states.h"
@@ -55,7 +44,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2000/08/25 16:15:54 jlam Exp $
// Need a portable version of tolower
//
-@@ -236,7 +251,7 @@
+@@ -236,7 +247,7 @@
// ^FUNCTION: CmdLine::prompt_user - prompt the user for a missing argument
//
// ^SYNOPSIS:
@@ -64,7 +53,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2000/08/25 16:15:54 jlam Exp $
//
// ^PARAMETERS:
// CmdArg * cmdarg;
-@@ -274,7 +289,7 @@
+@@ -274,7 +285,7 @@
// - if an invalid value was given return ARG_MISSING
// - else return 0
//-^^----
@@ -73,7 +62,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2000/08/25 16:15:54 jlam Exp $
CmdLine::prompt_user(CmdArg * cmdarg)
{
// dont prompt if cin or cerr is not interactive
-@@ -316,7 +331,7 @@
+@@ -316,7 +327,7 @@
// try to handle the value we read (remember - buf is temporary)
if (! errs) {
const char * arg = buf;
@@ -82,7 +71,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2000/08/25 16:15:54 jlam Exp $
cmd_flags |= TEMP;
errs = handle_arg(cmdarg, arg);
if (errs) {
-@@ -387,7 +402,7 @@
+@@ -387,7 +398,7 @@
// ^FUNCTION: CmdLine::missing_args - check for missing required arguments
//
// ^SYNOPSIS:
@@ -91,7 +80,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2000/08/25 16:15:54 jlam Exp $
//
// ^PARAMETERS:
//
-@@ -424,7 +439,7 @@
+@@ -424,7 +435,7 @@
// endfor
// return the current cmd-status
//-^^----
@@ -100,7 +89,7 @@ $NetBSD: patch-bg,v 1.1.1.1 2000/08/25 16:15:54 jlam Exp $
CmdLine::missing_args(void)
{
char buf[256];
-@@ -649,3 +664,5 @@
+@@ -649,3 +660,5 @@
} //for list_iter
return last_pos_list ;
}