chocolate-doom-2.2.1

OBS-URL: https://build.opensuse.org/package/show/games/chocolate-doom?expand=0&rev=20
This commit is contained in:
Jan Engelhardt 2015-11-07 10:28:03 +00:00 committed by Git OBS Bridge
parent 2918ed1e9b
commit 93faf7c0f2
9 changed files with 59 additions and 212 deletions

View File

@ -2,25 +2,28 @@ From: Jan Engelhardt <jengelh@inai.de>
Date: 2013-05-02 09:45:54.544886176 +0200
Upstream: maybe - this patch is quite specific to openSUSE
Make sure we always scan /usr paths for IWADs too, even if
XDG_DATA_DIRS is set.
prboom-plus and doomsday (in openSUSE) look in /usr/share/doom for
IWADs, and so should chocolate-doom.
---
src/d_iwad.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
src/d_iwad.c | 4 ++++
1 file changed, 4 insertions(+)
Index: chocolate-doom-1.7.0/src/d_iwad.c
Index: chocolate-doom-2.2.1/src/d_iwad.c
===================================================================
--- chocolate-doom-1.7.0.orig/src/d_iwad.c
+++ chocolate-doom-1.7.0/src/d_iwad.c
@@ -556,8 +556,9 @@ static void BuildIWADDirList(void)
// Standard places where IWAD files are installed under Unix.
- AddIWADDir("/usr/share/games/doom");
AddIWADDir("/usr/local/share/games/doom");
+ AddIWADDir("/usr/share/games/doom");
+ AddIWADDir("/usr/share/doom");
#endif
--- chocolate-doom-2.2.1.orig/src/d_iwad.c
+++ chocolate-doom-2.2.1/src/d_iwad.c
@@ -633,6 +633,10 @@ static void AddXdgDirs(void)
// source ports is /usr/share/games/doom - we support this through the
// XDG_DATA_DIRS mechanism, through which it can be overridden.
AddIWADPath(env, "/games/doom");
+
+ env = "/usr/local/share:/usr/share";
+ AddIWADPath(env, "/games/doom");
+ AddIWADPath(env, "/doom");
}
//

View File

@ -1,43 +0,0 @@
From 51ab62f6fb06b42c80c98ea71ab29d208d10e422 Mon Sep 17 00:00:00 2001
From: Fabian Greffrath <fabian@greffrath.com>
Date: Tue, 17 Feb 2015 12:00:04 +0100
Subject: [PATCH] setup: fix "control reaches end of non-void function"
compiler warning
Actually, it is impossible to reach the end of these two functions
without return()ing earlier from one of the switch() statements'
branches. But since the compiler cannot know this and warns about it,
and since this warning can be escalated into an error in later
compiler versions, silence it by return()ing a dummy value at the end
of each function.
Fixes #508
---
src/setup/txt_joyaxis.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/setup/txt_joyaxis.c b/src/setup/txt_joyaxis.c
index 4747a4f..5e59b9f 100644
--- a/src/setup/txt_joyaxis.c
+++ b/src/setup/txt_joyaxis.c
@@ -63,6 +63,8 @@ static char *CalibrationLabel(txt_joystick_axis_t *joystick_axis)
"right, and press the button.";
}
}
+
+ return NULL;
}
static void SetCalibrationLabel(txt_joystick_axis_t *joystick_axis)
@@ -265,6 +267,8 @@ static int NextCalibrateStage(txt_joystick_axis_t *joystick_axis)
case CONFIG_STAGE2:
return CONFIG_CENTER;
}
+
+ return -1;
}
static int EventCallback(SDL_Event *event, TXT_UNCAST_ARG(joystick_axis))
--
2.1.4

View File

@ -1,123 +0,0 @@
From dcc41ce5c432a8641cdd278cc3ffb4eeb5fd5d8a Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Tue, 21 Apr 2015 09:28:15 +0200
Subject: [PATCH] build: avoid code breaking the aliasing regularly Upstream:
no
Just use libcrypto already.
aes_prng.c: In function 'AES_SetKey':
aes_prng.c:693:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
*((uint32_t*)tk[j]) = *((uint32_t*)k[j]);
---
configure.ac | 1 +
src/Makefile.am | 6 +++---
src/aes_prng.c | 18 +++++++++---------
3 files changed, 13 insertions(+), 12 deletions(-)
Index: chocolate-doom-2.1.0/configure.ac
===================================================================
--- chocolate-doom-2.1.0.orig/configure.ac
+++ chocolate-doom-2.1.0/configure.ac
@@ -55,6 +55,7 @@ LDFLAGS="$LDFLAGS $SDL_LIBS"
AC_SDL_MAIN_WORKAROUND([
+ PKG_CHECK_MODULES([crypto], [libcrypto >= 0.9.7])
# Check for SDL_mixer.
AC_CHECK_LIB(SDL_mixer,Mix_LoadMUS,[
Index: chocolate-doom-2.1.0/src/Makefile.am
===================================================================
--- chocolate-doom-2.1.0.orig/src/Makefile.am
+++ chocolate-doom-2.1.0/src/Makefile.am
@@ -18,10 +18,10 @@ SETUP_BINARIES = @PROGRAM_PREFIX@doom-se
execgames_SCRIPTS = $(SETUP_BINARIES)
-AM_CFLAGS = -I$(top_builddir)/textscreen \
+AM_CPPFLAGS = -I$(top_builddir)/textscreen \
-I$(top_builddir)/opl \
-I$(top_builddir)/pcsound \
- @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@
+ @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@ ${crypto_CFLAGS}
# Common source files used by absolutely everything:
@@ -150,7 +150,7 @@ EXTRA_LIBS =
@LDFLAGS@ \
@SDL_LIBS@ \
@SDLMIXER_LIBS@ \
- @SDLNET_LIBS@
+ @SDLNET_LIBS@ ${crypto_LIBS}
if HAVE_WINDRES
@PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES_WITH_DEH) resource.rc
Index: chocolate-doom-2.1.0/src/aes_prng.c
===================================================================
--- chocolate-doom-2.1.0.orig/src/aes_prng.c
+++ chocolate-doom-2.1.0/src/aes_prng.c
@@ -64,7 +64,9 @@
#include "aes_prng.h"
#include "doomtype.h"
#include "i_system.h"
+#include <openssl/rand.h>
+#ifdef AESPRNG
#define MAXKC (256/32)
#define MAXROUNDS 14
@@ -929,10 +931,11 @@ static char *AES_SelfTest(void)
return NULL;
}
+#endif /* AESPRNG */
#ifndef TEST
-
static boolean prng_enabled = false;
+#ifdef AESPRNG
static RIJNDAEL_context prng_context;
static uint32_t prng_input_counter;
static uint32_t prng_values[4];
@@ -992,6 +995,7 @@ static void PRNG_Generate(void)
prng_value_index = 0;
}
+#endif /* AESPRNG */
// Read a random 32-bit integer from the PRNG.
@@ -1004,14 +1008,7 @@ unsigned int PRNG_Random(void)
return 0;
}
- if (prng_value_index >= 4)
- {
- PRNG_Generate();
- }
-
- result = prng_values[prng_value_index];
- ++prng_value_index;
-
+ RAND_pseudo_bytes((unsigned char *)&result, sizeof(result));
return result;
}
@@ -1020,6 +1017,7 @@ unsigned int PRNG_Random(void)
int main(int argc, char *argv[])
{
+#ifdef AESPRNG
char *errormsg;
errormsg = AES_SelfTest();
@@ -1034,6 +1032,8 @@ int main(int argc, char *argv[])
fprintf(stderr, "AES self test failed: %s\n", errormsg);
return 1;
}
+#endif
+ return 0;
}
#endif

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:629305e7f328659f3e93e89b93adc9da4e99b5a351e51ceb749dcf3e3da8bcd3
size 2129632

View File

@ -1,18 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: GPGTools - http://gpgtools.org
iQIcBAABCAAGBQJURzKyAAoJEPbC7pwjNUNE1E4P/2LzWIquIlC/CNlpdHpswo24
SO5JAZdWeENgIjJqaNBYCUnW1OsCTjgWXMp58F2rS7oo2tJnJ3Ezujdb847n+VkE
92CXSU6dsfJKHRdt1JzRq+YYgDWBbQQkAW+/RPsWMiZUfqVtRtVWf2xxBpt0uQAh
psRvGzmUCPo8bAO0ZxxEO1lvjSC7DDCL8Co7O+luXSRt0Wz0qx+QCkwRnrvJuufL
0nhHYUHawqdq3pexmqo/wfsairD8EKN9+xpfze3pbVLqlQoezzxSFYkI9y8CmMOZ
PD45Trti73OTVre9LLOdjnIFfmDK322t5uvMfwFbbY0KyTwvMtbQYLceJJZ8V4La
/T1Bl4p/noLGtSeIaGTMwVB1bRX7uSSK+oQXfEXtkP285aIWPXnoVz0zF+h3yz2N
c2CmuX62a+zaq/2CSw5aFhV8Stj0CHO0yVxNcmfr15ogV2AQqCz8DZFZkev0GeSw
wseSO2EWQdxERYlALqSzYyusGaz3IPmbv3d+5ZLvgSQDoPuuBk1oB64vktnEds/u
vEClUxE99eXqIKy++ajyosAPwTYdkU0zOqgRb6kZ06RgZI02mtodTswdzNj9jcwh
QuSYZnWufdQKHWbxLmbNeH40n0zSJFZgmYP4naKnm1M1kaICxEcKiTa1/2w/a+Nj
BB9T7CBU3kf3ZRcPrLDP
=hVjh
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ad11e2871667c6fa0658abf2dcba0cd9b26fbd651ee8df55adfdc18ad8fd674a
size 2127538

View File

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
iQIcBAABCAAGBQJV8jh/AAoJEPbC7pwjNUNEfX8P/18kvHoYwXlguTUbDmhGnVf4
MLKBAR1Wr6LbDYVzSaq/fSU0JqZC0BYeFq/TUJUzVVmjaRytfJVc5Ik28SCXSTZn
8x3jxrlWbSL17infZapPalICPbWY/Fky9TDW7nYRy8KZyjnWGkctvgjywd/FmPMF
9bZHmJeR6l74nrXdrWHNX/kDNA8sH9nfriDEyxxnl8Dnlde+w+acbD68boIcZ4Qy
7nfRr0Mhz3SDZ3qgLr6RUbo+S43Y6kChaeyBUuvWd6P4enZjV08kUkSoPlLURkHv
7w6LRUW1V9b2MuUqU9zG1gPoHK16OVBQ5aLTjJMW/HeyEwZTMVOFGrVbJYgE7Q3m
FA2E37hpH9evPAB1T+r65xeds4CObWLJUpMvwRxxx+nkUg9VSyVwbNyo/nfLbPQM
RiNC3wOi3jOavNfjU19+0Cod7K4bp7iXJmUGXkRIxTYPKfczBMj0ze3ymYWF7v3q
7LFdIA59qh+GCFN1VFPrOXeF5UYt/8Endn28pOheuCn/OnvP4JRH/Dqf3jb/JYm0
1vF2g4RlYxnYIvXpHMGC1Zk6780D2kHNmRAhpuNmF1HidyjgwgNKT0U8CbQVFbrS
R4r6dvoUvDNi/iuVxuD/jDOmyVaKI0LXT2bNRt5xrHEjxq7G75F4B7RflflkEN3F
jQWwy+BjG3G6wbXDa5Ng
=klKm
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Sat Nov 7 10:04:03 UTC 2015 - jengelh@inai.de
- Update to new upstream release 2.2.1
* The Hexen four level demo IWAD is now supported.
* The Doom reload hack has been added back.
* OPL music playback has been improved in a number of ways to
match the behavior of Vanilla Doom's DMX library much more
closely. OPL3 playback is also now supported.
- Drop chdoom-nonvoid.diff (included upstream),
drop chdoom-prng.diff (PRNG impl. was switched)
-------------------------------------------------------------------
Sat Mar 28 22:16:09 UTC 2015 - jengelh@inai.de

View File

@ -17,9 +17,9 @@
Name: chocolate-doom
Version: 2.1
Version: 2.2.1
Release: 0
%define rversion 2.1.0
%define rversion 2.2.1
Summary: Conservative DOOM/Heretic/Hexen/Strife source port
License: GPL-2.0+
Group: Amusements/Games/3D/Shoot
@ -31,8 +31,6 @@ Source: http://www.chocolate-doom.org/downloads/%rversion/%name-%rversio
Source2: http://www.chocolate-doom.org/downloads/%rversion/%name-%rversion.tar.gz.asc
Source3: %name.keyring
Patch1: chdoom-iwaddir.diff
Patch2: chdoom-nonvoid.diff
Patch3: chdoom-prng.diff
Patch4: chdoom-date.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
@ -66,7 +64,7 @@ Chocolate Doom's aims are:
%prep
%setup -Tqb0 -n %name-%rversion
%patch -P 1 -P 2 -P 3 -P 4 -p1
%patch -P 1 -P 4 -p1
%build
autoreconf -fi
@ -75,21 +73,22 @@ make %{?_smp_mflags};
%install
b="%buildroot";
make install DESTDIR="$b" iconsdir="%_datadir/icons/hicolor/64x64/apps" \
docdir="%_docdir/%name";
mkdir -p "$b/%_bindir";
mv "$b/%_prefix/games"/* "$b/%_bindir/";
%make_install iconsdir="%_datadir/icons/hicolor/64x64/apps" \
docdir="%_docdir/%name"
mkdir -p "$b/%_bindir"
mv "$b/%_prefix/games"/* "$b/%_bindir/"
rm -f "$b/%_docdir/%name/INSTALL"
%suse_update_desktop_file -r chocolate-setup chocolate-setup Game ActionGame
%fdupes %buildroot/%_prefix
%post
echo "INFO: %name: The global IWAD directory is %_datadir/doom.";
echo "INFO: %name: The global IWAD directory is %_datadir/doom."
%files
%defattr(-,root,root)
%_bindir/chocolate-*
%_mandir/man*/*
%_datadir/appdata/*.xml
%_datadir/applications/*
%_datadir/icons/*
%_docdir/chocolate-*/