File raze.spec of Package raze

#
# spec file for package raze
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2021-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 https://bugs.opensuse.org/
#


%define _lto_cflags %{nil}
Name:           raze
Version:        1.11.0
Release:        0
Summary:        A EDuke32 source port with graphic and modding extensions
License:        GPL-3.0-only
Group:          Amusements/Games/3D/Shoot
URL:            https://github.com/ZDoom/Raze
#Git-Clone:     https://github.com/ZDoom/Raze.git
Source:         https://github.com/ZDoom/Raze/archive/refs/tags/%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  discord-rpc-devel
BuildRequires:  pkgconfig
BuildRequires:  zmusic-devel
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(libjpeg)
BuildRequires:  pkgconfig(libwebp)
BuildRequires:  pkgconfig(sdl2)
BuildRequires:  pkgconfig(vpx)
%if 0%{?sle_version} >= 150400 && 0%{?sle_version} < 160000 && 0%{?is_opensuse}
BuildRequires:  gcc11
BuildRequires:  gcc11-c++
%else
BuildRequires:  gcc-c++
%endif

%description
Raze, a source port of EDuke32 implementing several systems as found
in the GZDoom source port. It combines  EDuke32, PCExhumed, NBlood,
and RedNukem in a single package, delivered as 5 separate game modules,
amongst various stability and renderer improvements.

The main features of Raze are:
 * Polymost is used as the primary renderer, significantly rewritten
   and seperated from OpenGL, utilizing a new texture manager.
   Polymost is used in this capacity to generate polygons and sending
   them off to the backend, which is OpenGL 3.3 with the option to
   use OpenGL 4.5 features. This ensures that new renderer features
   can be added to the same backend, but where a different renderer
   other than Polymost can be used.
 * GZDoom's post-processing effects framework is incorporated,
   allowing effects such as bloom and faking increased color ranges
   with dithering to be possible.
 * A replaced and revamped file system, based on the WAD manager used
   in GZDoom.
 * ZMusic from GZDoom is used as music system
 * The menu code from GZDoom is used as a generic system across all
   supported games.
 * Games are in in their own modules and do not interact with eachother.
   Renderer, sound system and input are used universally across the
   titles.
 * Controller support is included, using the existing ZDoom controller
   code.
 * Multiplayer and networking however have a different implementation
   per game, and thus this was left as-is.
 * OSD and configuration maintenance replaced with ZDoom's console and
   config code.

Note:
Game data must be placed in ~/.config/raze .

%prep
%setup -q -n Raze-%{version}
%autopatch -p1

%build
%if 0%{?sle_version} >= 150400 && 0%{?sle_version} < 160000 && 0%{?is_opensuse}
export CC="gcc-11"
export CXX="g++-11"
%endif
%cmake \
  -DCMAKE_SHARED_LINKER_FLAGS="" \
  -DCMAKE_EXE_LINKER_FLAGS="" \
  -DCMAKE_MODULE_LINKER_FLAGS="" \
  -DZMUSIC_INCLUDE_DIR="%{_includedir}" \
  -DZMUSIC_LIBRARIES="%{_libdir}/libzmusic.so" \
  -DINSTALL_PK3_PATH="%{_datadir}/raze" \
  -DINSTALL_RPATH:STRING="NO"
%cmake_build

%install
%cmake_install

%files
%license package/common/{buildlic.txt,gpl-2.0.txt}
%doc AUTHORS.md README.md
%{_bindir}/raze
%{_datadir}/raze

%changelog
openSUSE Build Service is sponsored by