forked from pool/prboom-plus
Compare commits
5 Commits
Author | SHA256 | Date | |
---|---|---|---|
a4a2c607b7 | |||
64c06799f6 | |||
8184f8cc04 | |||
|
0d721ace2b | ||
bb05919db7 |
81
gcc14.diff
Normal file
81
gcc14.diff
Normal file
@@ -0,0 +1,81 @@
|
||||
|
||||
GLU uses a pre-C89 feature (functions with unspecified arguments);
|
||||
that feature's syntax has new meaning in C23. POSIX systems have
|
||||
C language extensions (for dlsym) and we can exploit that to get
|
||||
GLU programs building again.
|
||||
|
||||
prboom2/src/gl_preprocess.c:497:41: error: passing argument 3 of ‘gluTessCallback’ from incompatible pointer type [-Wincompatible-pointer-types]
|
||||
497 | gluTessCallback(tess, GLU_TESS_BEGIN, ntessBegin);
|
||||
prboom2/src/gl_preprocess.c:498:42: error: passing argument 3 of ‘gluTessCallback’ from incompatible pointer type [-Wincompatible-pointer-types]
|
||||
498 | gluTessCallback(tess, GLU_TESS_VERTEX, ntessVertex);
|
||||
prboom2/src/gl_preprocess.c:499:41: error: passing argument 3 of ‘gluTessCallback’ from incompatible pointer type [-Wincompatible-pointer-types]
|
||||
499 | gluTessCallback(tess, GLU_TESS_ERROR, ntessError);
|
||||
prboom2/src/gl_preprocess.c:500:43: error: passing argument 3 of ‘gluTessCallback’ from incompatible pointer type [-Wincompatible-pointer-types]
|
||||
500 | gluTessCallback(tess, GLU_TESS_COMBINE, ntessCombine);
|
||||
|
||||
Just signedness/constness:
|
||||
|
||||
prboom2/src/gl_shader.c:149:40: error: passing argument 3 of ‘ReadLump’ from incompatible pointer type [-Wincompatible-pointer-types]
|
||||
149 | vp_size = ReadLump(filename, vpname, &vp_data);
|
||||
prboom2/src/gl_shader.c:84:81: note: expected ‘unsigned char **’ but argument is of type ‘char **’
|
||||
prboom2/src/gl_shader.c:165:51: error: passing argument 3 of ‘GLEXT_glShaderSourceARB’ from incompatible pointer type [-Wincompatible-pointer-types]
|
||||
165 | GLEXT_glShaderSourceARB(shader->hVertProg, 1, &vp_data, &vp_size);
|
||||
prboom2/src/gl_shader.c:166:51: error: passing argument 3 of ‘GLEXT_glShaderSourceARB’ from incompatible pointer type [-Wincompatible-pointer-types]
|
||||
166 | GLEXT_glShaderSourceARB(shader->hFragProg, 1, &fp_data, &fp_size);
|
||||
|
||||
---
|
||||
prboom2/src/gl_preprocess.c | 8 ++++----
|
||||
prboom2/src/gl_shader.c | 12 ++++++++----
|
||||
2 files changed, 12 insertions(+), 8 deletions(-)
|
||||
|
||||
Index: prboom2/src/gl_preprocess.c
|
||||
===================================================================
|
||||
--- prboom2/src/gl_preprocess.c.orig
|
||||
+++ prboom2/src/gl_preprocess.c
|
||||
@@ -494,10 +494,10 @@ static void gld_PrecalculateSector(int n
|
||||
return;
|
||||
}
|
||||
// set callbacks
|
||||
- gluTessCallback(tess, GLU_TESS_BEGIN, ntessBegin);
|
||||
- gluTessCallback(tess, GLU_TESS_VERTEX, ntessVertex);
|
||||
- gluTessCallback(tess, GLU_TESS_ERROR, ntessError);
|
||||
- gluTessCallback(tess, GLU_TESS_COMBINE, ntessCombine);
|
||||
+ gluTessCallback(tess, GLU_TESS_BEGIN, (_GLUfuncptr)(void *)ntessBegin);
|
||||
+ gluTessCallback(tess, GLU_TESS_VERTEX, (_GLUfuncptr)(void *)ntessVertex);
|
||||
+ gluTessCallback(tess, GLU_TESS_ERROR, (_GLUfuncptr)(void *)ntessError);
|
||||
+ gluTessCallback(tess, GLU_TESS_COMBINE, (_GLUfuncptr)(void *)ntessCombine);
|
||||
gluTessCallback(tess, GLU_TESS_END, ntessEnd);
|
||||
if (levelinfo) fprintf(levelinfo, "sector %i, %i lines in sector\n", num, sectors[num].linecount);
|
||||
// remove any line which has both sides in the same sector (i.e. Doom2 Map01 Sector 1)
|
||||
Index: prboom2/src/gl_shader.c
|
||||
===================================================================
|
||||
--- prboom2/src/gl_shader.c.orig
|
||||
+++ prboom2/src/gl_shader.c
|
||||
@@ -146,10 +146,14 @@ static GLShader* gld_LoadShader(const ch
|
||||
filename = malloc(MAX(vp_fnlen, fp_fnlen) + 1);
|
||||
|
||||
sprintf(filename, "%s/shaders/%s.txt", I_DoomExeDir(), vpname);
|
||||
- vp_size = ReadLump(filename, vpname, &vp_data);
|
||||
+ unsigned char *xyz = NULL;
|
||||
+ vp_size = ReadLump(filename, vpname, &xyz);
|
||||
+ vp_data = (char *)xyz;
|
||||
|
||||
sprintf(filename, "%s/shaders/%s.txt", I_DoomExeDir(), fpname);
|
||||
- fp_size = ReadLump(filename, fpname, &fp_data);
|
||||
+ xyz = NULL;
|
||||
+ fp_size = ReadLump(filename, fpname, &xyz);
|
||||
+ fp_data = (char *)xyz;
|
||||
|
||||
if (vp_data && fp_data)
|
||||
{
|
||||
@@ -158,8 +162,8 @@ static GLShader* gld_LoadShader(const ch
|
||||
shader->hVertProg = GLEXT_glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB);
|
||||
shader->hFragProg = GLEXT_glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB);
|
||||
|
||||
- GLEXT_glShaderSourceARB(shader->hVertProg, 1, &vp_data, &vp_size);
|
||||
- GLEXT_glShaderSourceARB(shader->hFragProg, 1, &fp_data, &fp_size);
|
||||
+ GLEXT_glShaderSourceARB(shader->hVertProg, 1, (const char **)&vp_data, &vp_size);
|
||||
+ GLEXT_glShaderSourceARB(shader->hFragProg, 1, (const char **)&fp_data, &fp_size);
|
||||
|
||||
GLEXT_glCompileShaderARB(shader->hVertProg);
|
||||
GLEXT_glCompileShaderARB(shader->hFragProg);
|
@@ -1,3 +1,21 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 25 09:08:35 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Build with CFLAGS=-std=gnu11 to resolve FTBFS.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 20 21:26:43 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Deactivate libpcre integration. This disables the command line
|
||||
option `-auto`, which was used for for autoloading WADs according
|
||||
to the LMP demo file name.
|
||||
- Make build recipe POSIX sh compatible.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 3 00:28:07 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Add gcc14.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 9 16:25:32 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package prboom-plus
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -23,26 +23,25 @@ Summary: DOOM source port with demo compatibility
|
||||
License: GPL-2.0-or-later
|
||||
Group: Amusements/Games/3D/Shoot
|
||||
URL: http://prboom-plus.sf.net/
|
||||
|
||||
#Git-Clone: https://github.com/coelckers/prboom-plus
|
||||
Source: https://github.com/coelckers/prboom-plus/archive/refs/tags/v%version.tar.gz
|
||||
Patch1: prboom-nodatetime.diff
|
||||
Patch3: prboom-hbar-all.diff
|
||||
Patch4: prboom-hbar-gradient.diff
|
||||
Patch5: gcc14.diff
|
||||
BuildRequires: Mesa-devel
|
||||
BuildRequires: c++_compiler
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fluidsynth-devel
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: libvorbis-devel
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: portmidi-devel
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: pkgconfig(SDL2_image)
|
||||
BuildRequires: pkgconfig(SDL2_mixer)
|
||||
BuildRequires: pkgconfig(SDL2_net)
|
||||
BuildRequires: pkgconfig(fluidsynth)
|
||||
BuildRequires: pkgconfig(portmidi)
|
||||
BuildRequires: pkgconfig(sdl2)
|
||||
BuildRequires: pkgconfig(vorbis)
|
||||
Suggests: freedoom
|
||||
Provides: prboom = 2.6um
|
||||
Obsoletes: prboom <= 2.6
|
||||
@@ -66,14 +65,14 @@ PrBoom+ is a conservative Doom source port. It features:
|
||||
%autosetup -p0
|
||||
|
||||
%build
|
||||
pushd prboom2/
|
||||
cd prboom2/
|
||||
export CFLAGS="%optflags -std=gnu11"
|
||||
%cmake -DDOOMWADDIR="%_datadir/doom" -DPRBOOMDATADIR="%_datadir/doom"
|
||||
%cmake_build
|
||||
popd
|
||||
|
||||
%install
|
||||
s="$PWD"
|
||||
pushd prboom2/
|
||||
cd prboom2/
|
||||
%cmake_install
|
||||
# convenience symlink
|
||||
b="%buildroot"
|
||||
@@ -81,10 +80,9 @@ ln -s prboom-plus "$b/%_bindir/prboom"
|
||||
install -Dm0644 ICONS/prboom-plus.svg "$b/%_datadir/icons/hicolor/scalable/apps/prboom-plus.svg"
|
||||
install -Dm0644 ICONS/prboom-plus.desktop "$b/%_datadir/applications/prboom-plus.desktop"
|
||||
install -Dm0644 ICONS/prboom-plus.bash "$b/%_datadir/bash-completion/completions/prboom-plus.bash"
|
||||
popd
|
||||
# TW switched doc location in %%cmake
|
||||
(cd "%buildroot"; find "./%_datadir/doc" -type d -name prboom-plus | cut -b2-) >"$s/doc.files"
|
||||
ls -al "$s/doc.files"
|
||||
cd "%buildroot"
|
||||
find "./%_datadir/doc" -type d -name prboom-plus | cut -b2- >"$s/doc.files"
|
||||
|
||||
%if 0%{?suse_version} && 0%{?suse_version} < 1550
|
||||
%post
|
||||
|
Reference in New Issue
Block a user