diff options
author | jkim <jkim@FreeBSD.org> | 2010-07-20 06:05:22 +0800 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-07-20 06:05:22 +0800 |
commit | 49fe9048fe666377b4e7d9036be8d372ec5b4345 (patch) | |
tree | f1f53dd11154568d1c359348cfcaf9418d4ef513 /misc | |
parent | d493f15092980f9d7e03d78e8bd150feddda0de6 (diff) | |
download | freebsd-ports-gnome-49fe9048fe666377b4e7d9036be8d372ec5b4345.tar.gz freebsd-ports-gnome-49fe9048fe666377b4e7d9036be8d372ec5b4345.tar.zst freebsd-ports-gnome-49fe9048fe666377b4e7d9036be8d372ec5b4345.zip |
Remove a horrid hack to convert termios.TIOCSWINSZ to a signed integer.
All Python interpreters in the ports do not need this hack any more.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/py-pexpect/Makefile | 1 | ||||
-rw-r--r-- | misc/py-pexpect/files/patch-pexpect.py | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/misc/py-pexpect/Makefile b/misc/py-pexpect/Makefile index 41ecb6c8cc7f..3f8efeda4187 100644 --- a/misc/py-pexpect/Makefile +++ b/misc/py-pexpect/Makefile @@ -8,6 +8,7 @@ PORTNAME= pexpect PORTVERSION= 2.4 +PORTREVISION= 1 CATEGORIES= misc python MASTER_SITES= CHEESESHOP \ http://dryice.name/computer/FreeBSD/distfiles/ diff --git a/misc/py-pexpect/files/patch-pexpect.py b/misc/py-pexpect/files/patch-pexpect.py new file mode 100644 index 000000000000..c7b56520c47f --- /dev/null +++ b/misc/py-pexpect/files/patch-pexpect.py @@ -0,0 +1,21 @@ +--- pexpect.py.orig 2008-08-18 18:27:05.000000000 -0400 ++++ pexpect.py 2010-06-24 15:15:26.000000000 -0400 +@@ -1437,17 +1437,7 @@ + applications like vi or curses -- applications that respond to the + SIGWINCH signal. """ + +- # Check for buggy platforms. Some Python versions on some platforms +- # (notably OSF1 Alpha and RedHat 7.1) truncate the value for +- # termios.TIOCSWINSZ. It is not clear why this happens. +- # These platforms don't seem to handle the signed int very well; +- # yet other platforms like OpenBSD have a large negative value for +- # TIOCSWINSZ and they don't have a truncate problem. +- # Newer versions of Linux have totally different values for TIOCSWINSZ. +- # Note that this fix is a hack. +- TIOCSWINSZ = getattr(termios, 'TIOCSWINSZ', -2146929561) +- if TIOCSWINSZ == 2148037735L: # L is not required in Python >= 2.2. +- TIOCSWINSZ = -2146929561 # Same bits, but with sign. ++ TIOCSWINSZ = getattr(termios, 'TIOCSWINSZ', 2148037735L) + # Note, assume ws_xpixel and ws_ypixel are zero. + s = struct.pack('HHHH', r, c, 0, 0) + fcntl.ioctl(self.fileno(), TIOCSWINSZ, s) |