SHA256
1
0
forked from pool/cdogs-sdl

Accepting request 838761 from home:susnux:branches:games

Fix tumbleweed build and update

OBS-URL: https://build.opensuse.org/request/show/838761
OBS-URL: https://build.opensuse.org/package/show/games/cdogs-sdl?expand=0&rev=21
This commit is contained in:
Matthias Mailänder 2020-10-01 16:05:06 +00:00 committed by Git OBS Bridge
parent fe577e9e01
commit a4235ecf46
7 changed files with 85 additions and 27 deletions

23
cdogs-gLog.patch Normal file
View File

@ -0,0 +1,23 @@
diff -Nur cdogs-sdl-0.9.0/src/cdogs/log.c new/src/cdogs/log.c
--- cdogs-sdl-0.9.0/src/cdogs/log.c 2020-09-16 15:27:30.000000000 +0200
+++ new/src/cdogs/log.c 2020-09-30 13:06:55.179642290 +0200
@@ -32,6 +32,7 @@
#include "rlutil/rlutil.h"
#include "utils.h"
+FILE *gLogFile;
typedef struct
{
diff -Nur cdogs-sdl-0.9.0/src/cdogs/log.h new/src/cdogs/log.h
--- cdogs-sdl-0.9.0/src/cdogs/log.h 2020-09-16 15:27:30.000000000 +0200
+++ new/src/cdogs/log.h 2020-09-30 13:06:34.435491593 +0200
@@ -60,7 +60,7 @@
const char *LogLevelName(const LogLevel l);
LogLevel StrLogLevel(const char *s);
-FILE *gLogFile;
+extern FILE *gLogFile;
void LogInit(void);
void LogOpenFile(const char *filename);
void LogTerminate(void);

View File

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

3
cdogs-sdl-0.9.0.tar.gz Normal file
View File

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

View File

@ -1,15 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 295c8d2..84fb093 100644
index e506aaa..9c14ce4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -252,12 +252,12 @@ INSTALL(FILES
@@ -227,12 +227,12 @@ INSTALL(FILES
${CMAKE_SOURCE_DIR}/README.md
DESTINATION ${DATA_INSTALL_DIR})
IF(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
- INSTALL(FILES ${CMAKE_SOURCE_DIR}/build/linux/io.github.cxong.cdogs-sdl.desktop DESTINATION ${INSTALL_PREFIX}/share/applications)
- INSTALL(FILES ${CMAKE_SOURCE_DIR}/build/linux/io.github.cxong.cdogs-sdl.appdata.xml DESTINATION ${INSTALL_PREFIX}/share/appdata)
+ INSTALL(FILES ${CMAKE_SOURCE_DIR}/build/linux/io.github.cxong.cdogs-sdl.desktop DESTINATION ${INSTALL_PREFIX}/share/applications/ RENAME cdogs-sdl.desktop)
+ INSTALL(FILES ${CMAKE_SOURCE_DIR}/build/linux/io.github.cxong.cdogs-sdl.appdata.xml DESTINATION ${INSTALL_PREFIX}/share/appdata/ RENAME cdogs-sdl.appdata.xml)
- INSTALL(FILES ${CMAKE_SOURCE_DIR}/build/linux/io.github.cxong.cdogs-sdl.appdata.xml DESTINATION ${INSTALL_PREFIX}/share/metainfo)
+ INSTALL(FILES ${CMAKE_SOURCE_DIR}/build/linux/io.github.cxong.cdogs-sdl.desktop DESTINATION ${INSTALL_PREFIX}/share/applications RENAME cdogs-sdl.desktop)
+ INSTALL(FILES ${CMAKE_SOURCE_DIR}/build/linux/io.github.cxong.cdogs-sdl.appdata.xml DESTINATION ${INSTALL_PREFIX}/share/metainfo RENAME cdogs-sdl.appdata.xml)
foreach(RES 16 22 32 48 128)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/build/linux/cdogs-icon.${RES}.png
DESTINATION ${INSTALL_PREFIX}/share/icons/hicolor/${RES}x${RES}/apps

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Wed Sep 30 11:12:45 UTC 2020 - Ferdinand Thiessen <rpm@fthiessen.de>
- Update to 0.9.0:
* Feature complete Doom campaign
Game
* Add feet colors
* Add new hairs/hats: helmet, donut, hazmat
* Add AI wake sounds #651
* Fix sound spam at start of maps #605
* Improve weapon selection by disabling menus if there are none available #628
* Improve pause menu with background overlay #283
Editor
* Add level warp, multiple exits #451
* Add static pickups #644
* Add player template editing in editor #495
* Add option to skip weapon selection screen #647
* Add option for keeping picked up guns across missions #573
* Add option for ammo persistence #350
* Fix numpad insert/delete in editor #353
- Added nanopb.patch from nanopb upstream
- Added cdogs-gLog.patch to fix build with new gcc
- Rebased cdogs-sdl-fix-desktop-and-appdata.patch
- Spec cleanup
-------------------------------------------------------------------
Mon May 25 17:43:22 UTC 2020 - Martin Hauke <mardnh@gmx.de>

View File

@ -17,26 +17,33 @@
Name: cdogs-sdl
Version: 0.8.0
Version: 0.9.0
Release: 0
Summary: Classic overhead run-and-gun game
License: GPL-2.0-only AND BSD-2-Clause AND CC-BY-3.0 AND CC-BY-SA-3.0
Group: Amusements/Games/Action/Shoot
URL: http://cxong.github.io/cdogs-sdl
URL: https://cxong.github.io/cdogs-sdl
Source: https://github.com/cxong/cdogs-sdl/archive/%{version}/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE cdogs-sdl-fix-desktop-and-appdata.patch mardnh@gmx.de -- Fix desktop/appdata filenames.
Patch0: cdogs-sdl-fix-desktop-and-appdata.patch
# PATCH-FIX-UPSTREAM nanopb.patch -- https://github.com/nanopb/nanopb/issues/521
Patch1: nanopb.patch
# PATCH-FIX-UPSTREAM cdogs-gLog.patch -- https://github.com/cxong/cdogs-sdl/issues/658
Patch2: cdogs-gLog.patch
BuildRequires: cmake >= 3.12
BuildRequires: dos2unix
BuildRequires: enet-devel
BuildRequires: fdupes
BuildRequires: hicolor-icon-theme
BuildRequires: pkgconfig
BuildRequires: python3-protobuf
BuildRequires: python3-setuptools
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(SDL2_image)
BuildRequires: pkgconfig(SDL2_mixer)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(physfs)
BuildRequires: pkgconfig(protobuf)
BuildRequires: pkgconfig(sdl2)
%description
@ -47,41 +54,32 @@ from up to 11 weapons, and try over 100 user-created campaigns. Have fun!
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
sed -i 's|env python|python3|' src/proto/nanopb/generator/{protoc,nanopb_generator.py}
# use system enet
rm -rf src/cdogs/enet
dos2unix doc/original_readme.txt
#dos2unix doc/original_readme.txt
# disable -Werror (aborts build on mere warnings)
sed 's| -Werror||' -i CMakeLists.txt
#sed 's| -Werror||' -i CMakeLists.txt
%build
%cmake -DCDOGS_DATA_DIR=%{_datadir}/%{name}/ -DUSE_SHARED_ENET=ON
make %{?_smp_mflags}
%cmake_build
%install
%cmake_install
%fdupes %{buildroot}%{_datadir}
%if 0%{?suse_version} < 1330
%post
%desktop_database_post
%icon_theme_cache_post
%endif
%if 0%{?suse_version} < 1330
%postun
%desktop_database_postun
%icon_theme_cache_postun
%endif
%files
%{_datadir}/applications/%{name}.desktop
%{_bindir}/%{name}*
%{_datadir}/%{name}/
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%dir %{_datadir}/appdata/
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/metainfo/%{name}.appdata.xml
%changelog

12
nanopb.patch Normal file
View File

@ -0,0 +1,12 @@
diff -Nur cdogs-sdl-0.9.0/src/proto/nanopb/generator/nanopb_generator.py new/src/proto/nanopb/generator/nanopb_generator.py
--- cdogs-sdl-0.9.0/src/proto/nanopb/generator/nanopb_generator.py 2020-09-16 15:27:30.000000000 +0200
+++ new/src/proto/nanopb/generator/nanopb_generator.py 2020-09-30 12:35:40.026179442 +0200
@@ -1928,7 +1928,7 @@
for fdesc in fdescs.values():
results = process_file(fdesc.name, fdesc, options, other_files)
- base_dir = options.output_dir or ''
+ base_dir = options.output_dir or '.'
to_write = [
(os.path.join(base_dir, results['headername']), results['headerdata']),
(os.path.join(base_dir, results['sourcename']), results['sourcedata']),