File mingw64-scummvm.spec of Package mingw64-scummvm
#
# spec file for package mingw64-scummvm
#
# Copyright (c) 2025, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define realname scummvm
Name: mingw64-%{realname}
Version: 2.9.1
Release: 0
Summary: Interpreter for several adventure games
License: GPL-3.0-or-later
Group: Amusements/Games/Other
URL: https://www.scummvm.org/
Source: https://www.scummvm.org/frs/scummvm/%{version}/%{realname}-%{version}.tar.xz
BuildRequires: mingw64-cross-gcc-c++
BuildRequires: mingw64-cross-pkg-config
BuildRequires: mingw64-libSDL2-devel
%_mingw64_package_header_debug
BuildArch: noarch
%description
ScummVM is an interpreter that will play graphic adventure games written for
LucasArts' SCUMM virtual machine (such as Day of the Tentacle and
Monkey Island), Sierra's AGI adventures (such as early King's Quest and
Space Quest games), Adventure Soft's Simon the Sorcerer 1, 2 and Feeble Files,
Revolution Software's Beneath a Steel Sky and Broken Sword 1, 2 and 2.5,
Interactive Binary Illusions' Flight of the Amazon Queen,
Coktel Vision's Gobliiins, Wyrmkeep's Inherit the Earth, Westwood's
Legend of Kyrandia, and various others.
%_mingw64_debug_package
%prep
%autosetup -p1 -n %{realname}-%{version}
%build
%define _lto_cflags %{nil}
export PATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin/:$PATH
export CC="/usr/bin/x86_64-w64-mingw32-gcc"
export CXX="/usr/bin/x86_64-w64-mingw32-c++"
export AS="/usr/bin/x86_64-w64-mingw32-as"
export AR="/usr/bin/x86_64-w64-mingw32-ar"
export LD="/usr/bin/x86_64-w64-mingw32-ld"
export WINDRES="x86_64-w64-mingw32-windres"
export PKG_CONFIG_LIBDIR="/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig/"
export SDL_CONFIG="sdl2-config"
#
export CXXFLAGS="%{optflags}"
./configure \
--host=mingw64 \
--backend=sdl \
--enable-verbose-build \
--prefix=%{_mingw64_prefix} \
--bindir=%{_mingw64_bindir} \
--libdir=%{_mingw64_libdir} \
--mandir=%{_mingw64_mandir} \
--docdir=%{_mingw64_docdir} \
--datarootdir=%{_mingw64_datadir}/scummvm/ \
--datadir=%{_mingw64_datadir}/scummvm/scummvm/
%{_mingw64_make} %{?_smp_mflags}
%install
%{_mingw64_make} DESTDIR=%{buildroot} install
# HACK
install -d %{buildroot}/%{_mingw64_libdir}/TEMP
mv -v %{buildroot}/%{_mingw64_datadir}/* %{buildroot}/%{_mingw64_libdir}/TEMP/
install -d %{buildroot}/%{_mingw64_datadir}/scummvm/
mv -v %{buildroot}/%{_mingw64_libdir}/TEMP/* %{buildroot}/%{_mingw64_datadir}/scummvm/
%files
%license COPYING*
%{_mingw64_bindir}/scummvm.exe
%{_mingw64_datadir}/scummvm
#
%changelog