diff options
author | Erwin Lansing <erwin@FreeBSD.org> | 2009-02-02 19:24:49 +0000 |
---|---|---|
committer | Erwin Lansing <erwin@FreeBSD.org> | 2009-02-02 19:24:49 +0000 |
commit | 57eda18a6ce92cccd0a42c2257adb201acf03da1 (patch) | |
tree | 8cd858213ef59891c193d3acfc8090f5756a003c /devel/p5-IO-Tty | |
parent | b0ff3937f1382b43c72907be42c9240d9a5f4244 (diff) |
Notes
Diffstat (limited to 'devel/p5-IO-Tty')
-rw-r--r-- | devel/p5-IO-Tty/Makefile | 1 | ||||
-rw-r--r-- | devel/p5-IO-Tty/files/patch-Makefile.PL | 39 | ||||
-rw-r--r-- | devel/p5-IO-Tty/files/patch-Tty.xs | 21 |
3 files changed, 61 insertions, 0 deletions
diff --git a/devel/p5-IO-Tty/Makefile b/devel/p5-IO-Tty/Makefile index 0b4d1d5aa33e..98ae0a51bb3f 100644 --- a/devel/p5-IO-Tty/Makefile +++ b/devel/p5-IO-Tty/Makefile @@ -7,6 +7,7 @@ PORTNAME= IO-Tty PORTVERSION= 1.07 +PORTREVISION= 1 CATEGORIES= devel perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- diff --git a/devel/p5-IO-Tty/files/patch-Makefile.PL b/devel/p5-IO-Tty/files/patch-Makefile.PL new file mode 100644 index 000000000000..2afbacdb2b19 --- /dev/null +++ b/devel/p5-IO-Tty/files/patch-Makefile.PL @@ -0,0 +1,39 @@ +--- Makefile.PL ++++ Makefile.PL +@@ -95,16 +95,17 @@ + + # checking for various functions + +-my %funcs = (ttyname => "", +- openpty => "-lutil", +- _getpty => "", +- strlcpy => "", +- sigaction => "", +- grantpt => "", +- unlockpt => "", +- getpt => "", +- ptsname => "", +- ptsname_r => "", ++my %funcs = (ttyname => "", ++ openpty => "-lutil", ++ _getpty => "", ++ strlcpy => "", ++ sigaction => "", ++ grantpt => "", ++ unlockpt => "", ++ getpt => "", ++ posix_openpt => "", ++ ptsname => "", ++ ptsname_r => "", + ); + + foreach my $f (sort keys %funcs) { +@@ -290,7 +291,7 @@ + msg => "WARNING! Neither ptsname() nor ptsname_r() could be found,\n so we cannot use a high-level interface like openpty().\n", + }, + { +- defines => [qw"-DHAVE_DEV_PTMX -DHAVE_DEV_PTYM_CLONE -DHAVE_DEV_PTC -DHAVE_DEV_PTMX_BSD -DHAVE__GETPTY -DHAVE_OPENPTY -DHAVE_GETPT"], ++ defines => [qw"-DHAVE_DEV_PTMX -DHAVE_DEV_PTYM_CLONE -DHAVE_DEV_PTC -DHAVE_DEV_PTMX_BSD -DHAVE__GETPTY -DHAVE_OPENPTY -DHAVE_GETPT -DHAVE_POSIX_OPENPT"], + msg => "No high-level lib or clone device has been found, we will use BSD-style ptys.\n", + }, + ) { diff --git a/devel/p5-IO-Tty/files/patch-Tty.xs b/devel/p5-IO-Tty/files/patch-Tty.xs new file mode 100644 index 000000000000..12fc5e668819 --- /dev/null +++ b/devel/p5-IO-Tty/files/patch-Tty.xs @@ -0,0 +1,21 @@ +--- Tty.xs ++++ Tty.xs +@@ -453,6 +453,18 @@ + #if defined(HAVE_PTSNAME) || defined(HAVE_PTSNAME_R) + /* we don't need to try these if we don't have a way to get the pty names */ + ++#if defined(HAVE_POSIX_OPENPT) ++#if PTY_DEBUG ++ if (print_debug) ++ fprintf(stderr, "trying posix_openpt()...\n"); ++#endif ++ *ptyfd = posix_openpt(O_RDWR|O_NOCTTY); ++ if (*ptyfd >= 0 && open_slave(ptyfd, ttyfd, namebuf, namebuflen)) ++ break; /* got one */ ++ if (PL_dowarn) ++ warn("pty_allocate(nonfatal): posix_openpt(): %.100s", strerror(errno)); ++#endif /* defined(HAVE_POSIX_OPENPT) */ ++ + #if defined(HAVE_GETPT) + /* glibc defines this */ + #if PTY_DEBUG |