diff --git a/0001-build-use-python3-exclusively.patch b/0001-build-use-python3-exclusively.patch new file mode 100644 index 0000000..d45d5cb --- /dev/null +++ b/0001-build-use-python3-exclusively.patch @@ -0,0 +1,89 @@ +From b291e003c04431557c7369c12f2febd1aa233109 Mon Sep 17 00:00:00 2001 +From: Fabian Greffrath +Date: Fri, 27 Nov 2020 09:17:04 +0100 +Subject: [PATCH] build: use python3 exclusively + +Python 2 is deprecated and is going to be removed from Linux +distributions in the short term [1,2]. Thus, (parts of) the build +process will fail on current systems like e.g. Debian unstable. + +The /bin/python binary is not going to exist anymore. The canonical +name for the Python 3 binary is, you guess it, /bin/python3. So, let's +just use this during our build process and go future proof. + +Fixes #1158. + +[1] https://wiki.debian.org/Python#Python_in_Debian +[2] https://wiki.debian.org/Python/2Removal +--- + configure.ac | 2 +- + data/convert-icon | 2 +- + man/docgen | 2 +- + man/simplecpp | 2 +- + pkg/win32/cp-with-libs | 2 +- + textscreen/fonts/convert-font | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +Index: chocolate-doom-3.0.1/configure.ac +=================================================================== +--- chocolate-doom-3.0.1.orig/configure.ac ++++ chocolate-doom-3.0.1/configure.ac +@@ -16,7 +16,7 @@ orig_CFLAGS="$CFLAGS" + + AC_PROG_CC + AC_PROG_RANLIB +-AC_CHECK_PROG(HAVE_PYTHON, python, true, false) ++AC_CHECK_PROG(HAVE_PYTHON, python3, true, false) + + OPT_LEVEL=2 + +Index: chocolate-doom-3.0.1/data/convert-icon +=================================================================== +--- chocolate-doom-3.0.1.orig/data/convert-icon ++++ chocolate-doom-3.0.1/data/convert-icon +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Copyright(C) 2005-2014 Simon Howard + # +Index: chocolate-doom-3.0.1/man/docgen +=================================================================== +--- chocolate-doom-3.0.1.orig/man/docgen ++++ chocolate-doom-3.0.1/man/docgen +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Chocolate Doom self-documentation tool. This works similar to javadoc + # or doxygen, but documents command line parameters and configuration +Index: chocolate-doom-3.0.1/man/simplecpp +=================================================================== +--- chocolate-doom-3.0.1.orig/man/simplecpp ++++ chocolate-doom-3.0.1/man/simplecpp +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 + # Contributors to the Freedoom project. All rights reserved. +Index: chocolate-doom-3.0.1/pkg/win32/cp-with-libs +=================================================================== +--- chocolate-doom-3.0.1.orig/pkg/win32/cp-with-libs ++++ chocolate-doom-3.0.1/pkg/win32/cp-with-libs +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Copyright(C) 2016 Simon Howard + # +Index: chocolate-doom-3.0.1/textscreen/fonts/convert-font +=================================================================== +--- chocolate-doom-3.0.1.orig/textscreen/fonts/convert-font ++++ chocolate-doom-3.0.1/textscreen/fonts/convert-font +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Copyright(C) 2016 Simon Howard + # diff --git a/chocolate-doom.changes b/chocolate-doom.changes index 8f368f3..e7b6dca 100644 --- a/chocolate-doom.changes +++ b/chocolate-doom.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Jun 26 09:13:01 UTC 2021 - Jan Engelhardt + +- Add 0001-build-use-python3-exclusively.patch so we can build + without python2. + ------------------------------------------------------------------- Wed Jul 1 15:43:07 UTC 2020 - Jan Engelhardt diff --git a/chocolate-doom.spec b/chocolate-doom.spec index 8982f8d..076a612 100644 --- a/chocolate-doom.spec +++ b/chocolate-doom.spec @@ -1,7 +1,7 @@ # # spec file for package chocolate-doom # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,10 +29,12 @@ Source: http://www.chocolate-doom.org/downloads/%version/%name-%version. Source2: http://www.chocolate-doom.org/downloads/%version/%name-%version.tar.gz.asc Source3: %name.keyring Patch1: chdoom-iwaddir.diff +Patch2: 0001-build-use-python3-exclusively.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: fdupes -BuildRequires: python +BuildRequires: python3-Pillow +BuildRequires: python3-base BuildRequires: update-desktop-files BuildRequires: pkgconfig(SDL2_mixer) >= 2.0.0 BuildRequires: pkgconfig(SDL2_net) >= 2.0.0 @@ -64,13 +66,12 @@ Supplements: packageand(chocolate-doom:bash-completion) Additions for bash-completion to support chocolate-doom. %prep -%setup -Tqb0 -%patch -P 1 -p1 +%autosetup -p1 %build autoreconf -fi %configure CFLAGS="%optflags -fcommon" -make %{?_smp_mflags} +%make_build %install b="%buildroot"