diff options
-rw-r--r-- | devel/rlwrap/Makefile | 19 | ||||
-rw-r--r-- | devel/rlwrap/files/patch-src::ptytty.c | 29 |
2 files changed, 31 insertions, 17 deletions
diff --git a/devel/rlwrap/Makefile b/devel/rlwrap/Makefile index 56c7672d5985..c7f0e9c88f09 100644 --- a/devel/rlwrap/Makefile +++ b/devel/rlwrap/Makefile @@ -8,6 +8,7 @@ PORTNAME= rlwrap PORTVERSION= 0.28 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://utopia.knoware.nl/~hlub/uck/rlwrap/ @@ -15,22 +16,10 @@ MAINTAINER= laszlof@FreeBSD.org COMMENT= Readline wrapper USE_GETOPT_LONG= yes -GNU_CONFIGURE= yes +GNU_CONFIGURE= yes CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} -CONFIGURE_ENV+= ptyttylib_cv_ptys=BSD LDFLAGS=-lutil +CONFIGURE_ENV+= ptyttylib_cv_ptys=BSD LDFLAGS=-lutil MAN1= rlwrap.1 -.include <bsd.port.pre.mk> - -.if ${OSVERSION} < 500018 -# This port requires readline 4.2 or newer, which is only available -# in the base system in FreeBSD 5.x. -BUILD_DEPENDS+= ${PREFIX}/lib/libreadline.so.5:${PORTSDIR}/devel/readline -RUN_DEPENDS+= ${BUILD_DEPENDS} -# Make sure the dynamic linker does not pick up -# the older libreadline library from the base system. -LDFLAGS+= -rpath ${PREFIX}/lib -.endif - -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/devel/rlwrap/files/patch-src::ptytty.c b/devel/rlwrap/files/patch-src::ptytty.c index 4b5e79a1d68d..f8b1c0d69474 100644 --- a/devel/rlwrap/files/patch-src::ptytty.c +++ b/devel/rlwrap/files/patch-src::ptytty.c @@ -1,5 +1,5 @@ ---- src/ptytty.c.orig Mon Oct 31 16:01:11 2005 -+++ src/ptytty.c Mon Oct 31 16:01:57 2005 +--- src/ptytty.c.orig 2005-10-17 09:36:46.000000000 +0200 ++++ src/ptytty.c 2007-09-27 14:12:26.000000000 +0200 @@ -41,7 +41,7 @@ #ifdef HAVE_SYS_IOCTL_H # include <sys/ioctl.h> @@ -9,3 +9,28 @@ # include <sys/stropts.h> /* for I_PUSH */ #endif +@@ -159,11 +159,19 @@ + char pty_name[] = "/dev/pty??"; + char tty_name[] = "/dev/tty??"; + +-# ifndef PTYCHAR1 +-# define PTYCHAR1 "pqrstuvwxyz" +-# endif +-# ifndef PTYCHAR2 +-# define PTYCHAR2 "0123456789abcdef" ++# ifdef __FreeBSD__ ++/* Auto-detected pty names do not work well with devfs! */ ++# undef PTYCHAR1 ++# define PTYCHAR1 "pqrsPQRS" ++# undef PTYCHAR2 ++# define PTYCHAR2 "0123456789abcdefghijklmnopqrstuv" ++# else ++# ifndef PTYCHAR1 ++# define PTYCHAR1 "pqrstuvwxyz" ++# endif ++# ifndef PTYCHAR2 ++# define PTYCHAR2 "0123456789abcdef" ++# endif + # endif + for (c1 = PTYCHAR1; *c1; c1++) { + pty_name[(sizeof(pty_name) - 3)] = |