Compare commits

..

2 commits

Author SHA1 Message Date
Thomas Moschny
c44aba130e Update to 2.0.20. 2020-04-14 13:05:15 +02:00
Thomas Moschny
6faedc38ac Revert "Make waf Python3-only (#1753963)." 2019-11-28 18:43:41 +01:00
7 changed files with 198 additions and 191 deletions

View file

@ -1,19 +1,20 @@
#! /bin/bash
set -euxo pipefail
version=2.1.9
version=2.0.20
prerel=
src=waf-${version}${prerel}.tar.bz2
dst=${src%.tar.bz2}.stripped.tar.bz2
readarray -t files <<-EOF
waf-${version}/docs/sphinx/_images/waf-64x64.png
waf-${version}/docs/slides/presentation/gfx/waflogo.svg
EOF
rm -f ${dst} ${dst%.bz2}
cp -av ${src} ${dst}
# tar's "--delete option has been reported to work properly when tar
# acts as a filter from stdin to stdout."
bzip2 -cd "${src}" | tar --delete "${files[@]}" | bzip2 -c > "${dst}"
touch -m -r "${src}" "${dst}"
bzip2 -d ${dst}
tar --delete --file=${dst%.bz2} \
waf-${version}/docs/sphinx/_images/waf-64x64.png \
waf-${version}/docs/slides/presentation/gfx/waflogo.svg
touch -m -r ${src} ${dst%.bz2}
bzip2 ${dst%.bz2}

View file

@ -1 +1 @@
SHA512 (waf-2.1.9.stripped.tar.bz2) = 51df87254b4826247c36f86ac8df4a2dcb47322dc6747a63f4f2fb78962136d52add1d6089a65d76ff89c800f52715c14991e71216f82419e0733a5914523e05
SHA512 (waf-2.0.20.stripped.tar.bz2) = 21f61dc7ce6cd96d818caea28d9add9afbd60396e1fb72cf79ec94b451b11bae0275e99c180f084973688ee19f525d59cddf567f600d55403c88ecfd63c42ca7

View file

@ -1,7 +1,7 @@
diff -up waf-2.0.18/docs/sphinx/conf.py.orig waf-2.0.18/docs/sphinx/conf.py
--- waf-2.0.18/docs/sphinx/conf.py.orig 2019-04-20 19:06:49.000000000 +0200
+++ waf-2.0.18/docs/sphinx/conf.py 2019-10-05 17:58:58.380982949 +0200
@@ -428,7 +428,7 @@ else:
diff -up waf-1.6.9/docs/sphinx/conf.py.orig waf-1.6.9/docs/sphinx/conf.py
--- waf-1.6.9/docs/sphinx/conf.py.orig 2011-11-20 15:51:43.000000000 +0100
+++ waf-1.6.9/docs/sphinx/conf.py 2011-11-26 14:27:33.996165116 +0100
@@ -415,7 +415,7 @@ html_theme = 'default'
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.

13
waf-1.8.11-libdir.patch Normal file
View file

@ -0,0 +1,13 @@
diff -up waf-1.8.11/waf-light.orig waf-1.8.11/waf-light
--- waf-1.8.11/waf-light.orig 2015-06-20 22:24:00.000000000 +0200
+++ waf-1.8.11/waf-light 2015-06-22 20:23:07.171667528 +0200
@@ -149,6 +149,9 @@ def find_lib():
w = test(i + '/lib/' + dirname)
if w: return w
+ w = test('/usr/share/%s' % WAF)
+ if w: return w
+
#waf-local
dir = join(base, (sys.platform != 'win32' and '.' or '') + dirname)
w = test(dir)

View file

@ -1,6 +1,6 @@
diff -up waf-2.0.18/docs/sphinx/wscript.orig waf-2.0.18/docs/sphinx/wscript
--- waf-2.0.18/docs/sphinx/wscript.orig 2019-04-20 19:06:49.000000000 +0200
+++ waf-2.0.18/docs/sphinx/wscript 2019-10-05 18:00:54.822911036 +0200
diff -up waf-1.8.11/docs/sphinx/wscript.orig waf-1.8.11/docs/sphinx/wscript
--- waf-1.8.11/docs/sphinx/wscript.orig 2015-06-11 18:11:04.000000000 +0200
+++ waf-1.8.11/docs/sphinx/wscript 2015-06-22 18:36:02.078701412 +0200
@@ -19,7 +19,6 @@ def configure(cfg):
cfg.find_program('convert', var='CONVERT')
cfg.load('daemon', tooldir=['../../playground/daemon/'])

View file

@ -1,13 +0,0 @@
diff -up waf-2.0.18/waf-light.orig waf-2.0.18/waf-light
--- waf-2.0.18/waf-light.orig 2019-07-14 10:41:10.000000000 +0200
+++ waf-2.0.18/waf-light 2019-10-05 17:55:42.254788427 +0200
@@ -152,6 +152,9 @@ def find_lib():
w = test(i + '/lib/' + dirname)
if w: return w
+ w = test('/usr/share/%s' % WAF)
+ if w: return w
+
#waf-local
dir = join(base, (sys.platform != 'win32' and '.' or '') + dirname)
w = test(dir)

324
waf.spec
View file

@ -1,74 +1,121 @@
Name: waf
Version: 2.1.9
Release: 1%{?dist}
Summary: A Python-based build system
# The entire source code is BSD apart from pproc.py (taken from Python 2.5)
# Automatically converted from old format: BSD and Python - review is highly recommended.
License: LicenseRef-Callaway-BSD AND LicenseRef-Callaway-Python
URL: https://waf.io/
# Original tarfile can be found at
# https://waf.io/waf-%%{version}.tar.bz2
# We remove waf logos, licensed CC BY-NC
Source: waf-%{version}.stripped.tar.bz2
Source1: unpack_wafdir.py
# also search for waflib in /usr/share/waf
Patch0: waf-2.0.18-libdir.patch
# do not try to use the (removed) waf logos
Patch1: waf-2.0.18-logo.patch
# do not add -W when running sphinx-build
Patch2: waf-2.0.18-sphinx-no-W.patch
%if 0%{?fedora}
%global with_python3 1
%endif
%if 0%{?with_python3}
# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
%endif # with_python3
# Enable building without html docs (e.g. in case no recent sphinx is
# available)
%bcond_without docs
%global with_docs 1
# Priorities for the alternatives system
%global waf_py3_priority 30
%global waf_py2_priority 20
Name: waf
Version: 2.0.20
Release: 1%{?dist}
Summary: A Python-based build system
# The entire source code is BSD apart from pproc.py (taken from Python 2.5)
License: BSD and Python
URL: https://waf.io/
# Original tarfile can be found at
# https://waf.io/waf-%%{version}.tar.bz2 or
# We remove:
# - docs/book, licensed CC BY-NC-ND
# - Waf logos, licensed CC BY-NC
Source: waf-%{version}.stripped.tar.bz2
Source1: unpack_wafdir.py
Patch0: waf-1.8.11-libdir.patch
Patch1: waf-1.6.9-logo.patch
Patch2: waf-1.8.11-sphinx-no-W.patch
BuildArch: noarch
BuildRequires: python2-devel
%if 0%{?with_python3}
BuildRequires: python3-devel
%if %{with docs}
%endif # with_python3
%if 0%{?with_docs}
%if 0%{?fedora} || 0%{?rhel} >= 7
BuildRequires: python3-sphinx
%else
BuildRequires: python-sphinx10
%endif
BuildRequires: graphviz
BuildRequires: ImageMagick
%endif # with docs
# waf-2.0.18-2 in F32 the first python3-only version (i.e. not having
# a -python3 subpackage). Do not hardcode that as Obsoletes: though,
# to be able to roll out e.g. a 2.0.19 for older Fedora branches, but
# maintain upgradability
Provides: %{name}-python3 = %{version}-%{release}
Obsoletes: %{name}-python3 < %{version}-%{release}
%if "%{?python3_version}" != ""
# Seems like automatic ABI dependency is not detected since the files
# are going to a non-standard location
Requires: python(abi) = %{python3_version}
%endif # with_docs
%if "%{?python2_version}" != ""
# Seems like automatic ABI dependency is not detected since the files are
# going to a non-standard location
Requires: python(abi) = %{python2_version}
%endif
# alternatives
Requires(posttrans): %{_sbindir}/alternatives
Requires(preun): %{_sbindir}/alternatives
# the demo suite contains a perl module, which draws in unwanted
# provides and requires
%global __requires_exclude_from ^%{_docdir}/.*$
%global __provides_exclude_from ^%{_docdir}/.*$
%global __requires_exclude_from %{_docdir}
%global __provides_exclude_from %{_docdir}
# for EPEL, we need the old filters
%global __perl_provides %{nil}
%global __perl_requires %{nil}
%global _description %{expand:
%description
Waf is a Python-based framework for configuring, compiling and
installing applications. It is a replacement for other tools such as
Autotools, Scons, CMake or Ant.}
%description %_description
Autotools, Scons, CMake or Ant.
%if %{with docs}
%if 0%{?with_python3}
%package -n %{name}-python3
Summary: Python3 support for %{name}
%if "%{?python3_version}" != ""
Requires: python(abi) = %{python3_version}
%endif
%description -n %{name}-python3
Waf is a Python-based framework for configuring, compiling and
installing applications. It is a replacement for other tools such as
Autotools, Scons, CMake or Ant.
This package contains the Python 3 version of %{name}.
%endif # with_python3
%if 0%{?with_docs}
%package -n %{name}-doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
# obsolete the previous docs subpackage - guideline specifies -doc
# since: Fedora 18, RHEL 7 (mark the provides/obsoletes RHEL only after
# we no longer need to provide upgrade paths from affected Fedora releases)
Provides: %{name}-docs = %{version}-%{release}
Obsoletes: %{name}-docs < 1.6.11-2
%description -n %{name}-doc %_description
%description -n %{name}-doc
Waf is a Python-based framework for configuring, compiling and
installing applications. It is a replacement for other tools such as
Autotools, Scons, CMake or Ant.
This package contains the HTML documentation for %{name}.
%endif # with docs
%endif # with_docs
%prep
%autosetup -p1
%setup -q
# also search for waflib in /usr/share/waf
%patch0 -p1
# do not try to use the (removed) waf logos
%patch1 -p1
# do not add -W when running sphinx-build
%patch2 -p1
%build
@ -79,171 +126,129 @@ for f in waflib/extras/*.py ; do
extras="${extras:+$extras,}$f" ;
fi
done
%{__python3} ./waf-light --make-waf --strip --tools="$extras"
%{__python2} ./waf-light --make-waf --strip --tools="$extras"
%if %{with docs}
%if 0%{?with_docs}
# build html docs
export WAFDIR=$(pwd)
pushd docs/sphinx
%{__python3} ../../waf -v configure build
%if ! ( 0%{?fedora} || 0%{?rhel} >= 7 )
export SPHINX_BUILD=sphinx-1.0-build
%endif
%{__python2} ../../waf -v configure build
popd
%endif # with docs
%endif # with_docs
%install
%{__python3} %{S:1} _temp
%{__python2} %{S:1} _temp
pushd _temp
find . -name '*.py' -printf '%%P\0' |
xargs -0 -I{} install -m 0644 -p -D {} %{buildroot}%{_datadir}/waf/{}
popd
%if 0%{?with_python3}
%{__python3} %{S:1} _temp3
pushd _temp3
find . -name '*.py' -printf '%%P\0' |
xargs -0 -I{} install -m 0644 -p -D {} %{buildroot}%{_datadir}/waf3/{}
popd
%endif # with_python3
# install the frontend
install -m 0755 -p -D waf-light %{buildroot}%{_bindir}/waf
ln -s waf %{buildroot}%{_bindir}/waf-3
ln -s waf %{buildroot}%{_bindir}/waf-%{python3_version}
install -m 0755 -p -D waf-light %{buildroot}%{_bindir}/waf-%{python2_version}
ln -s waf-%{python2_version} %{buildroot}%{_bindir}/waf-2
%if 0%{?with_python3}
install -m 0755 -p -D waf-light %{buildroot}%{_bindir}/waf-%{python3_version}
ln -s waf-%{python3_version} %{buildroot}%{_bindir}/waf-3
%endif # with_python3
# alternatives-controlled
touch %{buildroot}%{_bindir}/waf
# remove shebangs from and fix EOL for all scripts in wafadmin
find %{buildroot}%{_datadir}/ -name '*.py' \
-exec sed -i -e '1{/^#!/d}' -e 's|\r$||g' {} \;
# fix waf script shebang line
sed -i "1c#! %{__python3}" %{buildroot}%{_bindir}/waf
sed -i "1c#! %{__python2}" %{buildroot}%{_bindir}/waf-%{python2_version}
%if 0%{?with_python3}
sed -i "1c#! %{__python3}" %{buildroot}%{_bindir}/waf-%{python3_version}
%endif # with_python3
# remove x-bits from everything going to doc
find demos utils -type f -exec chmod 0644 {} \;
# fix shebang lines in the demos
find demos \( -name '*.py' -o -name '*.py.in' -o -name 'wscript' -o -name 'wscript_build' \) \
mkdir demos_py2 ; cp -a demos demos_py2
find demos_py2 \( -name '*.py' -o -name 'wscript' -o -name 'wscript_build' \) \
-exec sed -e '1{/^#!/d}' -e '1i#!%{__python2}' -i {} \;
%if 0%{?with_python3}
mkdir demos_py3 ; cp -a demos demos_py3
find demos_py3 \( -name '*.py' -o -name 'wscript' -o -name 'wscript_build' \) \
-exec sed -e '1{/^#!/d}' -e '1i#!%{__python3}' -i {} \;
%endif # with_python3
# remove hidden file
rm -f docs/sphinx/build/html/.buildinfo
%if 0%{?with_python3}
# do byte compilation
%py_byte_compile %{__python2} %{buildroot}%{_datadir}/waf
%py_byte_compile %{__python3} %{buildroot}%{_datadir}/waf3
%endif # with_python3
%posttrans
%{_sbindir}/alternatives --install %{_bindir}/waf \
waf %{_bindir}/waf-2 %{waf_py2_priority} || :
%preun
%{_sbindir}/alternatives --remove \
waf %{_bindir}/waf-2 || :
%files
%doc README.md ChangeLog demos
%doc README.md ChangeLog demos_py2/demos
%ghost %attr(0755,-,-) %{_bindir}/waf
%{_bindir}/waf-%{python2_version}
%{_bindir}/waf-2
%{_datadir}/waf
%if 0%{?with_python3}
%posttrans -n %{name}-python3
%{_sbindir}/alternatives --install %{_bindir}/waf \
waf %{_bindir}/waf-3 %{waf_py3_priority} || :
%preun -n %{name}-python3
%{_sbindir}/alternatives --remove \
waf %{_bindir}/waf-3 || :
%files -n %{name}-python3
%doc README.md ChangeLog demos_py3/demos
%ghost %attr(0755,-,-) %{_bindir}/waf
%{_bindir}/waf-%{python3_version}
%{_bindir}/waf-3
%{_bindir}/waf
%{_datadir}/waf3
%endif # with_python3
%if %{with docs}
%if 0%{?with_docs}
%files -n %{name}-doc
%doc docs/sphinx/build/html
%endif # with docs
%endif # with_docs
%changelog
* Sat Nov 15 2025 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.9-1
- Update to 2.1.9.
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 2.1.6-4
- Rebuilt for Python 3.14.0rc3 bytecode
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 2.1.6-3
- Rebuilt for Python 3.14.0rc2 bytecode
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Fri Jun 20 2025 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.6-1
- Update to 2.1.6.
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 2.1.5-2
- Rebuilt for Python 3.14
* Sun Mar 9 2025 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.5-1
- Update to 2.1.5.
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Sep 7 2024 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.2-1
- Update to 2.1.2.
* Wed Sep 04 2024 Miroslav Suchý <msuchy@redhat.com> - 2.0.27-4
- convert license to SPDX
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.27-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 2.0.27-2
- Rebuilt for Python 3.13
* Thu Apr 4 2024 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.27-1
- Update to 2.0.27.
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.26-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Oct 22 2023 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.26-1
- Update to 2.0.26.
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.25-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 2.0.25-3
- Rebuilt for Python 3.12
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.25-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jan 5 2023 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.25-1
- Update to 2.0.25.
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.24-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.0.24-2
- Rebuilt for Python 3.11
* Sat May 28 2022 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.24-1
- Update to 2.0.24.
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.23-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Dec 22 2021 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.23-1
- Update to 2.0.23.
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.22-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.0.22-2
- Rebuilt for Python 3.10
* Tue Feb 2 2021 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.22-1
- Update to 2.0.22.
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.21-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Nov 16 2020 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.21-1
- Update to 2.0.21.
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.20-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 2.0.20-2
- Rebuilt for Python 3.9
* Tue Apr 14 2020 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.20-1
- Update to 2.0.20.
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.19-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Nov 28 2019 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.19-1
* Thu Nov 28 2019 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.19-1.1
- Update to 2.0.19.
* Tue Oct 8 2019 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.18-2
- Make waf Python3-only (#1753963).
- Spec file modernization and cleanups.
* Sat Oct 5 2019 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.18-1
- Update to 2.0.18.
@ -692,3 +697,4 @@ rm -f docs/sphinx/build/html/.buildinfo
* Sun Jan 20 2008 Michel Salim <michel.sylvan@gmail.com> - 1.3.1-1
- Initial Fedora package