From 8479958fd8f3f4aef37a00ebe2a734c878c528ee Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 28 Jun 2008 23:03:03 +0000 Subject: [PATCH] - Update to 1.4.3. - Remove fcntl patch (fixed upstream). - Prefix has to be set in a configure step now. - Pack the bash completion file. --- .cvsignore | 2 +- import.log | 1 + sources | 2 +- waf-1.4.2-fcntl.patch | 20 -------------------- waf-1.4.2-libdir.patch | 24 ------------------------ waf-1.4.3-libdir.patch | 24 ++++++++++++++++++++++++ waf.spec | 38 ++++++++++++++++++++++++-------------- 7 files changed, 51 insertions(+), 60 deletions(-) create mode 100644 import.log delete mode 100644 waf-1.4.2-fcntl.patch delete mode 100644 waf-1.4.2-libdir.patch create mode 100644 waf-1.4.3-libdir.patch diff --git a/.cvsignore b/.cvsignore index 1c35f5a..f5d61ac 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -waf-1.4.2.tar.bz2 +waf-1.4.3.tar.bz2 diff --git a/import.log b/import.log new file mode 100644 index 0000000..dcf12ee --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +waf-1_4_3-1_fc9:HEAD:waf-1.4.3-1.fc9.src.rpm:1214694119 diff --git a/sources b/sources index 511d5cb..9b17049 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0d0c397ee675b2df79f65b375eb8a0f8 waf-1.4.2.tar.bz2 +fb4acb46dbb612e911d7296282269743 waf-1.4.3.tar.bz2 diff --git a/waf-1.4.2-fcntl.patch b/waf-1.4.2-fcntl.patch deleted file mode 100644 index a3f2760..0000000 --- a/waf-1.4.2-fcntl.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- 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-1.4.2-libdir.patch b/waf-1.4.2-libdir.patch deleted file mode 100644 index ba2d606..0000000 --- a/waf-1.4.2-libdir.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up waf-1.4.2/waf-light.libdir waf-1.4.2/waf-light ---- waf-1.4.2/waf-light.libdir 2008-05-17 14:24:37.000000000 +0200 -+++ waf-1.4.2/waf-light 2008-05-26 08:56:47.000000000 +0200 -@@ -109,7 +109,7 @@ def find_lib(): - if w: return w - err("waf-light requires wafadmin -> export WAFDIR=/folder") - -- dir = "/lib/waf-%s-%s/" % (VERSION, REVISION) -+ dir = "/share/waf/" - for i in [INSTALL,'/usr','/usr/local','/opt']: - w = test(i+dir) - if w: return w -diff -up waf-1.4.2/wscript.libdir waf-1.4.2/wscript ---- waf-1.4.2/wscript.libdir 2008-05-17 14:24:37.000000000 +0200 -+++ waf-1.4.2/wscript 2008-05-26 08:56:47.000000000 +0200 -@@ -301,7 +301,7 @@ def install_waf(): - prefix = Params.g_options.prefix - - binpath = os.path.join(prefix, 'bin%swaf' % os.sep) -- wafadmindir = os.path.join(prefix, 'lib%swaf-%s-%s%swafadmin%s' % (os.sep, VERSION, REVISION, os.sep, os.sep)) -+ wafadmindir = os.path.join(prefix, 'share%swaf%swafadmin%s' % (os.sep, os.sep, os.sep)) - toolsdir = os.path.join(wafadmindir, 'Tools' + os.sep) - - try: os.makedirs(os.path.join(prefix, 'bin')) diff --git a/waf-1.4.3-libdir.patch b/waf-1.4.3-libdir.patch new file mode 100644 index 0000000..3824afe --- /dev/null +++ b/waf-1.4.3-libdir.patch @@ -0,0 +1,24 @@ +diff -up waf-1.4.3/waf-light.orig waf-1.4.3/waf-light +--- waf-1.4.3/waf-light.orig 2008-06-23 01:53:07.000000000 +0200 ++++ waf-1.4.3/waf-light 2008-06-28 19:04:21.000000000 +0200 +@@ -109,7 +109,7 @@ def find_lib(): + if w: return w + err("waf-light requires wafadmin -> export WAFDIR=/folder") + +- dir = "/lib/waf-%s-%s/" % (VERSION, REVISION) ++ dir = "/share/waf/" + for i in [INSTALL,'/usr','/usr/local','/opt']: + w = test(i+dir) + if w: return w +diff -up waf-1.4.3/wscript.orig waf-1.4.3/wscript +--- waf-1.4.3/wscript.orig 2008-06-23 01:53:07.000000000 +0200 ++++ waf-1.4.3/wscript 2008-06-28 19:02:00.000000000 +0200 +@@ -324,7 +324,7 @@ def build(bld): + wafadmin = bld.create_obj('py') + wafadmin.find_sources_in_dirs('wafadmin', exts=['.py']) + wafadmin.inst_var = 'PREFIX' +- wafadmin.inst_dir = os.path.join('lib', 'waf-%s-%s' % (VERSION, REVISION), 'wafadmin') ++ wafadmin.inst_dir = os.path.join('share', 'waf', 'wafadmin') + + tools = bld.create_obj('py') + tools.find_sources_in_dirs('wafadmin/Tools', exts=['.py']) diff --git a/waf.spec b/waf.spec index 4eaa78f..8e1df30 100644 --- a/waf.spec +++ b/waf.spec @@ -1,6 +1,6 @@ Name: waf -Version: 1.4.2 -Release: 2%{?dist} +Version: 1.4.3 +Release: 1%{?dist} Summary: A Python-based build system Group: Development/Tools @@ -9,8 +9,7 @@ License: BSD and Python 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 +Patch0: waf-1.4.3-libdir.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildArch: noarch @@ -34,39 +33,43 @@ Autotools, Scons, CMake or Ant. %prep %setup -q %patch0 -p1 -b .libdir -%patch1 -p1 -b .fcntl %build +./waf-light configure --prefix=%{_prefix} ./waf-light --make-waf --strip %install -rm -rf $RPM_BUILD_ROOT +%{__rm} -rf $RPM_BUILD_ROOT # the install target wants an acknowledgement -echo y | ./waf install --prefix=%{_prefix} --destdir=$RPM_BUILD_ROOT +echo y | ./waf install --destdir=$RPM_BUILD_ROOT # remove shebangs from all scripts in wafadmin find $RPM_BUILD_ROOT%{_datadir}/waf/wafadmin -name '*.py' \ - -exec sed -i '1{/^#!/d}' {} \; + -exec %{__sed} -i '1{/^#!/d}' {} \; # fix waf script shebang line -sed -i "1c#! /usr/bin/python" $RPM_BUILD_ROOT%{_bindir}/waf +%{__sed} -i "1c#! /usr/bin/python" $RPM_BUILD_ROOT%{_bindir}/waf # fix EOL -sed -i 's|\r$||g' utils/amtool.py +%{__sed} -i 's|\r$||g' utils/amtool.py # remove x-bits from everything going to doc -find demos utils -type f -exec chmod 0644 {} \; +find demos utils -type f -exec %{__chmod} 0644 {} \; # remove zero-length files -rm demos/gnome/src/hello.h -rm demos/simple_scenarios/local_tool/uh.coin +%{__rm} demos/gnome/src/hello.h +%{__rm} demos/simple_scenarios/local_tool/uh.coin + +# bash completion +%{__install} -D -p -m 0644 utils/waf-completion.bash \ + %{buildroot}%{_sysconfdir}/bash_completion.d//waf-completion.bash %clean -rm -rf $RPM_BUILD_ROOT +%{__rm} -rf $RPM_BUILD_ROOT %files @@ -74,9 +77,16 @@ rm -rf $RPM_BUILD_ROOT %doc README TODO ChangeLog demos doc/waf.pdf utils %{_bindir}/waf %{_datadir}/waf +%{_sysconfdir}/bash_completion.d %changelog +* Sat Jun 28 2008 Thomas Moschny - 1.4.3-1 +- Update to 1.4.3. +- Remove fcntl patch (fixed upstream). +- Prefix has to be set in a configure step now. +- Pack the bash completion file. + * Mon May 26 2008 Thomas Moschny - 1.4.2-2 - Patch: stdout might not be a terminal.