From 0721e601a4a9ff7e27d394c15182f0bd20e01b18 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: May 26 2008 08:03:06 +0000 Subject: Patch: stdout might not be a terminal. --- diff --git a/waf-1.4.2-fcntl.patch b/waf-1.4.2-fcntl.patch new file mode 100644 index 0000000..a3f2760 --- /dev/null +++ b/waf-1.4.2-fcntl.patch @@ -0,0 +1,20 @@ +--- waf-1.4.2/wafadmin/Utils.py 2008-05-16 17:43:19.000000000 +0200 ++++ waf-1.4.2.fcntl/wafadmin/Utils.py 2008-05-26 09:23:19.000000000 +0200 +@@ -154,10 +154,13 @@ except ImportError: + return 55 + else: + def get_term_cols(): +- dummy_lines, cols = struct.unpack("HHHH", \ +- fcntl.ioctl(sys.stdout.fileno(),termios.TIOCGWINSZ , \ +- struct.pack("HHHH", 0, 0, 0, 0)))[:2] +- return cols ++ try: ++ dummy_lines, cols = struct.unpack("HHHH", \ ++ fcntl.ioctl(sys.stdout.fileno(),termios.TIOCGWINSZ , \ ++ struct.pack("HHHH", 0, 0, 0, 0)))[:2] ++ return cols ++ except IOError: ++ return 55 + + def progress_line(state, total, col1, col2): + n = len(str(total)) diff --git a/waf.spec b/waf.spec index 2d0aced..4eaa78f 100644 --- a/waf.spec +++ b/waf.spec @@ -1,6 +1,6 @@ Name: waf Version: 1.4.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A Python-based build system Group: Development/Tools @@ -10,6 +10,7 @@ URL: http://code.google.com/p/waf/ Source0: http://waf.googlecode.com/files/waf-%{version}.tar.bz2 # use _datadir instead of /usr/lib Patch0: waf-1.4.2-libdir.patch +Patch1: waf-1.4.2-fcntl.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildArch: noarch @@ -33,6 +34,7 @@ Autotools, Scons, CMake or Ant. %prep %setup -q %patch0 -p1 -b .libdir +%patch1 -p1 -b .fcntl %build @@ -75,6 +77,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon May 26 2008 Thomas Moschny - 1.4.2-2 +- Patch: stdout might not be a terminal. + * Sat May 17 2008 Thomas Moschny - 1.4.2-1 - Update to 1.4.2. - Remove shebang lines from files in wafadmin after installation, not