From 169976ba16ad1f267d8ad08b4bc2b34825d06d09 Mon Sep 17 00:00:00 2001 From: Björn Esser Date: Feb 23 2020 11:38:30 +0000 Subject: Add patch from upstreamed PR to add compatibility for RPM's configure macro --- diff --git a/scummvm-tools-2.1.0-CONFIGURE-Ignore-options-valid-for-Autotools-configure.patch b/scummvm-tools-2.1.0-CONFIGURE-Ignore-options-valid-for-Autotools-configure.patch new file mode 100644 index 0000000..7712c4a --- /dev/null +++ b/scummvm-tools-2.1.0-CONFIGURE-Ignore-options-valid-for-Autotools-configure.patch @@ -0,0 +1,41 @@ +From a310afb0a810b9927430457c04d4775817bd70a6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= +Date: Sun, 23 Feb 2020 12:02:19 +0100 +Subject: [PATCH] CONFIGURE: Ignore options valid for Autotools configure + +RPM-based distributions come with a configure macro, that sets up the +whole build environment. In order to be able to use this macro, some +options, which are valid for the configure script generated by GNU +Autotools, should not error-out when preparing the build stage. + +Backported (and slightly modified) from scummvm/scummvm@826b7bfe7 +--- + configure | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/configure b/configure +index 08653663..5910f57e 100755 +--- a/configure ++++ b/configure +@@ -429,6 +429,21 @@ done # for parm in ... + + for ac_option in $@; do + case "$ac_option" in ++ # Silently ignore options valid for Autotools configure. ++ --build=*) ;; ++ --host=*) ;; ++ --exec-prefix=*) ;; ++ --program-prefix=*) ;; ++ --sbindir=*) ;; ++ --sysconfdir=*) ;; ++ --includedir=*) ;; ++ --libexecdir=*) ;; ++ --localstatedir=*) ;; ++ --sharedstatedir=*) ;; ++ --infodir=*) ;; ++ --disable-dependency-tracking) ;; ++ --enable-dependency-tracking) ;; ++ # End of ignored options. + --enable-vorbis) _vorbis=yes ;; + --disable-vorbis) _vorbis=no ;; + --enable-tremor) _tremor=yes ;; diff --git a/scummvm-tools.spec b/scummvm-tools.spec index ae7e331..607143b 100644 --- a/scummvm-tools.spec +++ b/scummvm-tools.spec @@ -1,3 +1,7 @@ +# Url to upstream GitHub repo. +%global git_url https://github.com/scummvm/%{name} + + Name: scummvm-tools Version: 2.1.0 Release: 3%{?dist} @@ -7,6 +11,8 @@ URL: http://www.scummvm.org Source0: http://www.scummvm.org/frs/%{name}/%{version}/%{name}-%{version}.tar.bz2 Source1: %{name}.desktop +# Add compatibility for RPM's configure macro. +Patch0: %{git_url}/pull/23.patch#/%{name}-2.1.0-CONFIGURE-Ignore-options-valid-for-Autotools-configure.patch BuildRequires: gcc-c++ BuildRequires: wxGTK3-devel, libvorbis-devel, flac-devel, desktop-file-utils BuildRequires: zlib-devel bzip2-devel libmad-devel @@ -31,15 +37,7 @@ These tools are most useful to developers. %autosetup -p 1 %build -# Update the various config.guess to upstream release for aarch64/ppc64le support -find ./ -name config.guess -exec cp /usr/lib/rpm/config.guess {} ';' -%configure || : - -# No rpm configure because scummvm's configure isn't a real configure and thus -# doesn't understand some of the options %%configure passes. This includes -# -libdir, so rpmlint's complaints should be ignored. -./configure --prefix=%{_prefix} --bindir=%{_bindir} --mandir=%{_mandir} \ - --datadir=%{_datadir} --enable-verbose-build +%configure --enable-verbose-build %make_build %install @@ -65,6 +63,7 @@ desktop-file-install \ * Sun Feb 23 2020 Björn Esser - 2.1.0-3 - Use %%autosetup macro - Drop unneeded old patch +- Add patch from upstreamed PR to add compatibility for RPM's configure macro * Thu Jan 30 2020 Fedora Release Engineering - 2.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild