summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Swanson2017-08-26 14:49:08 -0700
committerMike Swanson2017-08-26 14:58:21 -0700
commitc3d7bf13209f076a455eae343e515570fbc723a3 (patch)
tree57d48405ea0d8bb07d6b360bf959850323d386cc
parent0412e49c1c8ff3f85e96b204038ab801f02cdf0b (diff)
downloadaur-c3d7bf13209f076a455eae343e515570fbc723a3.tar.gz
Update to a git snapshot
Builds with GCC 7.1.1 and some other libraries, via patches from Debian
-rw-r--r--.SRCINFO30
-rw-r--r--0001-Patch-from-Debian-803857-to-support-ffmpeg-2.9.patch42
-rw-r--r--20-reproducible.patch70
-rw-r--r--30-init-sdl2.patch98
-rw-r--r--40-libpng16.patch75
-rw-r--r--50-system-rapidjson.patch152
-rw-r--r--60-spelling-errors.patch394
-rw-r--r--70-disable-hdr-by-default.patch20
-rw-r--r--80-gcc7.patch221
-rw-r--r--PKGBUILD53
-rw-r--r--rbdoom-3-bfg.desktop1
11 files changed, 1089 insertions, 67 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e2e3cd1eb211..445b0cb979d6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,30 +1,44 @@
# Generated by mksrcinfo v8
-# Thu Aug 11 07:44:36 UTC 2016
+# Sat Aug 26 21:58:01 UTC 2017
pkgbase = rbdoom-3-bfg
pkgdesc = Doom 3 BFG source code (Robert Beckebans repo).
- pkgver = 1.0.3
- pkgrel = 5
+ pkgver = 1.1.0preview3.r98.e5b3c697
+ pkgrel = 1
url = https://github.com/RobertBeckebans/RBDOOM-3-BFG
arch = i686
arch = x86_64
groups = games
license = GPL3
makedepends = cmake
+ makedepends = rapidjson
makedepends = zip
depends = doom3bfg-data
depends = ffmpeg
depends = glew
+ depends = libpng
depends = openal
depends = sdl2
optdepends = alsa-plugins: pulseaudio-support
optdepends = libpulse: pulseaudio support
conflicts = rbdoom3-bfg-git
- source = https://github.com/RobertBeckebans/RBDOOM-3-BFG/archive/1.0.3.tar.gz
+ source = https://github.com/RobertBeckebans/RBDOOM-3-BFG/archive/e5b3c697d23b9a90c654181162fe476c8c4f90d9.tar.gz
source = rbdoom-3-bfg.desktop
- source = 0001-Patch-from-Debian-803857-to-support-ffmpeg-2.9.patch
- sha256sums = 961182e741529c0a3634f1892d067b724ddd800cca936522c1d70415789e6bfb
- sha256sums = b05a261bd2fd4c1a32788d68397c98e17008d0636bc948edad51d2ebe29f5a8a
- sha256sums = 1815f68da09bb67abc560fc1ef8e57a572d5b33b919102dc95d80e3369162929
+ source = 20-reproducible.patch
+ source = 30-init-sdl2.patch
+ source = 40-libpng16.patch
+ source = 50-system-rapidjson.patch
+ source = 60-spelling-errors.patch
+ source = 70-disable-hdr-by-default.patch
+ source = 80-gcc7.patch
+ sha512sums = 3773935aa7684dca0e1f310f8c23afc61000d5bb9e579361df9113c0be12e5e1f5b5af4719461a0b6868ddb47a7e84d812b494a14e8993a0cf3f5d60a3094a8a
+ sha512sums = f1a74a79c369bec1c371eb74f7e8c415b4d1993fae995b0e476eb7c7e3b0a42dfb8ee5ae1f2e960c1443603f36abe37409ffeac0c29fd085ef5045388ff905f8
+ sha512sums = db8c51b9bcdb35e81bdc8c5a0ba2575060948ed2fb9837f92cfb9ff73b5f709d8f0909b12cc7715d72dad91cf79d769fd27817c8442bf642af967b1d237974fd
+ sha512sums = c60b508f5f5c3e19a0ef2431b3d2119b405e8f610356a98c931c16a53ac1b319c485ebe9d454b884a6d66829573377e3f94220bc50dc70efde45c9312f172859
+ sha512sums = efd74dacb3cdd28b7d78b348e884de0e23170908504f32f1dad2ded81c49a1c7e3b0f80da4fca96c14e52c4aeb2c4591a5877ada81ea2fcd3ab9e59b78d3989e
+ sha512sums = f7ca60ca455be6cfc7a1367edc3850a97b701e3f3d34ebe67d7f8a2b5412d5006fc7554712147cba450d7de0b4fab18a4eb292ca88272dc4ecc3a9462428bc16
+ sha512sums = bc1f8bf5ae2025d776080ec41496a16c3e09b1737d4f1c1f76bddb48f97a394dda3ba1f6e08ac8c5d8731a4acc5212a43f90daf41ba7d0f50f8dba5dc18b1069
+ sha512sums = 6cdf1650709a85cc96a57bc1e6fa127fa6b25ac980984a9f60f77daf4a761589a41eaff61fd7ca9946218a20edd835f4fb28d9844cbac8e6b28769ff149e6dec
+ sha512sums = 884ac7ae61b780042b012bbc1d702260533768edc466572dd6b35568966e1d837d7d6a43e77e7b1f7405b71871d55971d3d236df19f59110b8fa39e18b5b4b9f
pkgname = rbdoom-3-bfg
diff --git a/0001-Patch-from-Debian-803857-to-support-ffmpeg-2.9.patch b/0001-Patch-from-Debian-803857-to-support-ffmpeg-2.9.patch
deleted file mode 100644
index 11041a66ee3f..000000000000
--- a/0001-Patch-from-Debian-803857-to-support-ffmpeg-2.9.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 42d4d7c7c00389532bf57e91d9c2df15457d0269 Mon Sep 17 00:00:00 2001
-From: y2keeth <y2keeth@yahoo.com>
-Date: Sat, 7 Nov 2015 12:02:59 -0500
-Subject: [PATCH] Patch from Debian #803857 to support ffmpeg 2.9
-
----
- neo/renderer/Cinematic.cpp | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/neo/renderer/Cinematic.cpp b/neo/renderer/Cinematic.cpp
-index a9a35a6..3865d0d 100644
---- a/neo/renderer/Cinematic.cpp
-+++ b/neo/renderer/Cinematic.cpp
-@@ -439,8 +439,8 @@ idCinematicLocal::~idCinematicLocal()
-
- // RB: TODO double check this. It seems we have different versions of ffmpeg on Kubuntu 13.10 and the win32 development files
- #if defined(_WIN32) || defined(_WIN64)
-- avcodec_free_frame( &frame );
-- avcodec_free_frame( &frame2 );
-+ av_frame_free( &frame );
-+ av_frame_free( &frame2 );
- #else
- av_freep( &frame );
- av_freep( &frame2 );
-@@ -557,12 +557,12 @@ bool idCinematicLocal::InitFromFFMPEGFile( const char* qpath, bool amilooping )
- framePos = -1;
- common->Printf( "Loaded FFMPEG file: '%s', looping=%d%dx%d, %f FPS, %f sec\n", qpath, looping, CIN_WIDTH, CIN_HEIGHT, frameRate, durationSec );
- image = ( byte* )Mem_Alloc( CIN_WIDTH * CIN_HEIGHT * 4 * 2, TAG_CINEMATIC );
-- avpicture_fill( ( AVPicture* )frame2, image, PIX_FMT_BGR32, CIN_WIDTH, CIN_HEIGHT );
-+ avpicture_fill( ( AVPicture* )frame2, image, AV_PIX_FMT_BGR32, CIN_WIDTH, CIN_HEIGHT );
- if( img_convert_ctx )
- {
- sws_freeContext( img_convert_ctx );
- }
-- img_convert_ctx = sws_getContext( dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt, CIN_WIDTH, CIN_HEIGHT, PIX_FMT_BGR32, SWS_BICUBIC, NULL, NULL, NULL );
-+ img_convert_ctx = sws_getContext( dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt, CIN_WIDTH, CIN_HEIGHT, AV_PIX_FMT_BGR32, SWS_BICUBIC, NULL, NULL, NULL );
- status = FMV_PLAY;
-
- startTime = 0;
---
-2.7.1
-
diff --git a/20-reproducible.patch b/20-reproducible.patch
new file mode 100644
index 000000000000..f74b78d623ba
--- /dev/null
+++ b/20-reproducible.patch
@@ -0,0 +1,70 @@
+Description: Make rbdoom3bfg reproducible
+ by removing the usages of __TIME__ and __DATE__
+Author: Tobias Frost <tobi@debian.org>
+Forwarded: https://github.com/RobertBeckebans/RBDOOM-3-BFG/pull/250
+Last-Update: 2015-11-02
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/neo/framework/Common.cpp
++++ b/neo/framework/Common.cpp
+@@ -59,7 +59,7 @@
+ {
+ version_s()
+ {
+- sprintf( string, "%s.%d%s %s %s %s", ENGINE_VERSION, BUILD_NUMBER, BUILD_DEBUG, BUILD_STRING, __DATE__, __TIME__ );
++ sprintf( string, "%s.%d%s %s", ENGINE_VERSION, BUILD_NUMBER, BUILD_DEBUG, BUILD_STRING );
+ }
+ char string[256];
+ } version;
+--- a/neo/d3xp/Game_local.cpp
++++ b/neo/d3xp/Game_local.cpp
+@@ -317,7 +317,6 @@
+
+ Printf( "--------- Initializing Game ----------\n" );
+ Printf( "gamename: %s\n", GAME_VERSION );
+- Printf( "gamedate: %s\n", __DATE__ );
+
+ // register game specific decl types
+ declManager->RegisterDeclType( "model", DECL_MODELDEF, idDeclAllocator<idDeclModelDef> );
+--- a/neo/d3xp/gamesys/SysCvar.cpp
++++ b/neo/d3xp/gamesys/SysCvar.cpp
+@@ -43,14 +43,13 @@
+ */
+
+ struct gameVersion_s {
+- gameVersion_s() { sprintf( string, "%s.%d%s %s %s %s", ENGINE_VERSION, BUILD_NUMBER, BUILD_DEBUG, BUILD_STRING, __DATE__, __TIME__ ); }
++ gameVersion_s() { sprintf( string, "%s.%d%s %s", ENGINE_VERSION, BUILD_NUMBER, BUILD_DEBUG, BUILD_STRING ); }
+ char string[256];
+ } gameVersion;
+
+
+ // noset vars
+ idCVar gamename( "gamename", GAME_VERSION, CVAR_GAME | CVAR_ROM, "" );
+-idCVar gamedate( "gamedate", __DATE__, CVAR_GAME | CVAR_ROM, "" );
+
+ idCVar si_map( "si_map", "-1", CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_INTEGER, "default map choice for profile" );
+ idCVar si_mode( "si_mode", "-1", CVAR_GAME | CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_INTEGER, "default mode choice for profile", -1, GAME_COUNT - 1 );
+--- a/neo/idlib/Parser.cpp
++++ b/neo/idlib/Parser.cpp
+@@ -796,8 +796,8 @@
+
+ CONSOLE_COMMAND( TestPreprocessorMacros, "check analyze warning", 0 )
+ {
+- idLib::Printf( "%s : %s\n", __DATE__, PreProcessorDate().c_str() );
+- idLib::Printf( "%s : %s\n", __TIME__, PreProcessorTime().c_str() );
++ idLib::Printf( "%s\n", PreProcessorDate().c_str() );
++ idLib::Printf( "%s\n", PreProcessorTime().c_str() );
+ }
+
+ /*
+--- a/neo/framework/Console.cpp
++++ b/neo/framework/Console.cpp
+@@ -1189,7 +1189,7 @@
+
+ // RB begin
+ //idStr version = va( "%s.%i.%i", ENGINE_VERSION, BUILD_NUMBER, BUILD_NUMBER_MINOR );
+- idStr version = va( "%s %s %s %s", ENGINE_VERSION, BUILD_STRING, __DATE__, __TIME__ );
++ idStr version = va( "%s %s", ENGINE_VERSION, BUILD_STRING);
+ //idStr version = com_version.GetString();
+ // RB end
+
diff --git a/30-init-sdl2.patch b/30-init-sdl2.patch
new file mode 100644
index 000000000000..df6cd657f7cd
--- /dev/null
+++ b/30-init-sdl2.patch
@@ -0,0 +1,98 @@
+Description: Fix SDL2 initialistion
+ SDL_GL_* should only be called after the window created.
+ Also, SDL_GL_MakeCurrent seems necessary.
+Author: Tobias Frost <tobi@debian.org>
+Forwarded: https://github.com/RobertBeckeba06/RBDOOM-3-BFG/issues/205
+Forwarded: https://github.com/RobertBeckebans/RBDOOM-3-BFG/pull/251
+Last-Update: 2014-12-06
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/neo/sys/sdl/sdl_glimp.cpp
++++ b/neo/sys/sdl/sdl_glimp.cpp
+@@ -49,15 +49,7 @@
+ idCVar r_waylandcompat( "r_waylandcompat", "0", CVAR_SYSTEM | CVAR_NOCHEAT | CVAR_ARCHIVE, "wayland compatible framebuffer" );
+
+ // RB: only relevant if using SDL 2.0
+-#if defined(__APPLE__)
+-// only core profile is supported on OS X
+-idCVar r_useOpenGL32( "r_useOpenGL32", "2", CVAR_INTEGER, "0 = OpenGL 3.x, 1 = OpenGL 3.2 compatibility profile, 2 = OpenGL 3.2 core profile", 0, 2 );
+-#elif defined(__linux__)
+-// Linux open source drivers suck
+-idCVar r_useOpenGL32( "r_useOpenGL32", "0", CVAR_INTEGER, "0 = OpenGL 3.x, 1 = OpenGL 3.2 compatibility profile, 2 = OpenGL 3.2 core profile", 0, 2 );
+-#else
+-idCVar r_useOpenGL32( "r_useOpenGL32", "1", CVAR_INTEGER, "0 = OpenGL 3.x, 1 = OpenGL 3.2 compatibility profile, 2 = OpenGL 3.2 core profile", 0, 2 );
+-#endif
++idCVar r_useOpenGL32( "r_useOpenGL32", "1", CVAR_INTEGER, "0 = OpenGL 2.0, 1 = OpenGL 3.2 compatibility profile, 2 = OpenGL 3.2 core profile", 0, 2 );
+ // RB end
+
+ static bool grabbed = false;
+@@ -195,28 +187,6 @@
+
+ #if SDL_VERSION_ATLEAST(2, 0, 0)
+
+- // RB begin
+- if( r_useOpenGL32.GetInteger() > 0 )
+- {
+- glConfig.driverType = GLDRV_OPENGL32_COMPATIBILITY_PROFILE;
+-
+- SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION, 3 );
+- SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION, 2 );
+-
+- if( r_debugContext.GetBool() )
+- {
+- SDL_GL_SetAttribute( SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG );
+- }
+- }
+-
+- if( r_useOpenGL32.GetInteger() > 1 )
+- {
+- glConfig.driverType = GLDRV_OPENGL32_CORE_PROFILE;
+-
+- SDL_GL_SetAttribute( SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE );
+- }
+- // RB end
+-
+ // DG: set display num for fullscreen
+ int windowPos = SDL_WINDOWPOS_UNDEFINED;
+ if( parms.fullScreen > 0 )
+@@ -246,8 +216,6 @@
+ parms.width, parms.height, flags );
+ // DG end
+
+- context = SDL_GL_CreateContext( window );
+-
+ if( !window )
+ {
+ common->DPrintf( "Couldn't set GL mode %d/%d/%d: %s",
+@@ -255,6 +223,31 @@
+ continue;
+ }
+
++ context = SDL_GL_CreateContext( window );
++ SDL_GL_MakeCurrent(window, context);
++
++ // RB begin
++ if( r_useOpenGL32.GetInteger() > 0 )
++ {
++ glConfig.driverType = GLDRV_OPENGL32_COMPATIBILITY_PROFILE;
++
++ SDL_GL_SetAttribute( SDL_GL_CONTEXT_MAJOR_VERSION, 3 );
++ SDL_GL_SetAttribute( SDL_GL_CONTEXT_MINOR_VERSION, 2 );
++
++ if( r_debugContext.GetBool() )
++ {
++ SDL_GL_SetAttribute( SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_DEBUG_FLAG );
++ }
++ }
++
++ if( r_useOpenGL32.GetInteger() > 1 )
++ {
++ glConfig.driverType = GLDRV_OPENGL32_CORE_PROFILE;
++
++ SDL_GL_SetAttribute( SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE );
++ }
++ // RB end
++
+ if( SDL_GL_SetSwapInterval( r_swapInterval.GetInteger() ) < 0 )
+ common->Warning( "SDL_GL_SWAP_CONTROL not supported" );
+
diff --git a/40-libpng16.patch b/40-libpng16.patch
new file mode 100644
index 000000000000..c8ad60d3720d
--- /dev/null
+++ b/40-libpng16.patch
@@ -0,0 +1,75 @@
+Description: Patch for libpng1.6's changed API
+Author: Tobias Frost <tobi@debian.org>
+Forwarded: https://github.com/RobertBeckebans/RBDOOM-3-BFG/pull/293
+Last-Update: 2016-02-01
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/neo/renderer/Image_files.cpp
++++ b/neo/renderer/Image_files.cpp
+@@ -621,6 +621,7 @@
+
+ extern "C"
+ {
++#include <string.h>
+ #include <png.h>
+
+
+@@ -636,9 +637,12 @@
+
+ static void png_ReadData( png_structp pngPtr, png_bytep data, png_size_t length )
+ {
+- memcpy( data, ( byte* )pngPtr->io_ptr, length );
+-
+- pngPtr->io_ptr = ( ( byte* ) pngPtr->io_ptr ) + length;
++
++ // There is a get_io_ptr but not a set_io_ptr.. Therefore we need some tmp storage here.
++ byte **ioptr = (byte **)png_get_io_ptr(pngPtr);
++
++ memcpy( data, *ioptr, length );
++ *ioptr += length;
+ }
+
+ }
+@@ -651,6 +655,7 @@
+ static void LoadPNG( const char* filename, unsigned char** pic, int* width, int* height, ID_TIME_T* timestamp )
+ {
+ byte* fbuffer;
++ byte* readptr;
+
+ if( !pic )
+ {
+@@ -683,7 +688,8 @@
+ common->Error( "LoadPNG( %s ): png_create_info_struct failed", filename );
+ }
+
+- png_set_read_fn( pngPtr, fbuffer, png_ReadData );
++ readptr = fbuffer;
++ png_set_read_fn( pngPtr, &readptr, png_ReadData );
+
+ png_set_sig_bytes( pngPtr, 0 );
+
+@@ -770,10 +776,11 @@
+ static int png_compressedSize = 0;
+ static void png_WriteData( png_structp pngPtr, png_bytep data, png_size_t length )
+ {
+- memcpy( ( byte* )pngPtr->io_ptr, data, length );
+-
+- pngPtr->io_ptr = ( ( byte* ) pngPtr->io_ptr ) + length;
++ byte **ioptr = (byte**)png_get_io_ptr(pngPtr);
++
++ memcpy( *ioptr, data, length );
+
++ *ioptr += length;
+ png_compressedSize += length;
+ }
+
+@@ -802,7 +809,8 @@
+
+ png_compressedSize = 0;
+ byte* buffer = ( byte* ) Mem_Alloc( width * height * bytesPerPixel, TAG_TEMP );
+- png_set_write_fn( pngPtr, buffer, png_WriteData, png_FlushData );
++ byte* ioptr = buffer;
++ png_set_write_fn( pngPtr, &ioptr, png_WriteData, png_FlushData );
+
+ if( bytesPerPixel == 4 )
+ {
diff --git a/50-system-rapidjson.patch b/50-system-rapidjson.patch
new file mode 100644
index 000000000000..8706236bba5b
--- /dev/null
+++ b/50-system-rapidjson.patch
@@ -0,0 +1,152 @@
+Description: Patch to be able to use Debian's rapidjson
+ This patch adds the CMake-snippet and the necessary changes to be able to
+ compile with the pacakged rapidjson.
+Author: Tobias Frost <tobi@debian.org>
+Forwarded: https://github.com/RobertBeckebans/RBDOOM-3-BFG/pull/351
+Last-Update: 2016-10-11
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/neo/CMakeLists.txt
++++ b/neo/CMakeLists.txt
+@@ -41,6 +41,9 @@
+
+ option(USE_SYSTEM_LIBGLEW
+ "Use the system libglew instead of the bundled one" OFF)
++
++option(USE_SYSTEM_RAPIDJSON
++ "Use the system rapidjson instead of the bundled one" OFF)
+
+ set(CPU_TYPE "" CACHE STRING "When set, passes this string as CPU-ID which will be embedded into the binary.")
+
+@@ -273,6 +276,17 @@
+ add_definitions(-DGLEW_STATIC)
+ endif (GLEW_FOUND)
+
++if(USE_SYSTEM_RAPIDJSON)
++find_package(rapidjson REQUIRED)
++endif(USE_SYSTEM_RAPIDJSON)
++
++if (RAPIDJSON_FOUND)
++ include_directories("${RAPIDJSON_INCLUDE_DIRS}")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RAPIDJSON_CXX_FLAGS}")
++else (RAPIDJSON_FOUND)
++ include_directories("libs/rapidjson/include")
++endif (RAPIDJSON_FOUND)
++
+ add_subdirectory(idlib)
+
+ file(GLOB AAS_INCLUDES aas/*.h)
+--- /dev/null
++++ b/neo/cmake/Findrapidjson.cmake
+@@ -0,0 +1,97 @@
++# Copyright (c) 2011 Milo Yip (miloyip@gmail.com)
++# Copyright (c) 2013 Rafal Jeczalik (rjeczalik@gmail.com)
++# Distributed under the MIT License (see license.txt file)
++
++# -----------------------------------------------------------------------------------
++#
++# Finds the rapidjson library
++#
++# -----------------------------------------------------------------------------------
++#
++# Variables used by this module, they can change the default behaviour.
++# Those variables need to be either set before calling find_package
++# or exported as environment variables before running CMake:
++#
++# RAPIDJSON_INCLUDEDIR - Set custom include path, useful when rapidjson headers are
++# outside system paths
++# RAPIDJSON_USE_SSE2 - Configure rapidjson to take advantage of SSE2 capabilities
++# RAPIDJSON_USE_SSE42 - Configure rapidjson to take advantage of SSE4.2 capabilities
++#
++# -----------------------------------------------------------------------------------
++#
++# Variables defined by this module:
++#
++# RAPIDJSON_FOUND - True if rapidjson was found
++# RAPIDJSON_INCLUDE_DIRS - Path to rapidjson include directory
++# RAPIDJSON_CXX_FLAGS - Extra C++ flags required for compilation with rapidjson
++#
++# -----------------------------------------------------------------------------------
++#
++# Example usage:
++#
++# set(RAPIDJSON_USE_SSE2 ON)
++# set(RAPIDJSON_INCLUDEDIR "/opt/github.com/rjeczalik/rapidjson/include")
++#
++# find_package(rapidjson REQUIRED)
++#
++# include_directories("${RAPIDJSON_INCLUDE_DIRS}")
++# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RAPIDJSON_CXX_FLAGS}")
++# add_executable(foo foo.cc)
++#
++# -----------------------------------------------------------------------------------
++
++foreach(opt RAPIDJSON_INCLUDEDIR RAPIDJSON_USE_SSE2 RAPIDJSON_USE_SSE42)
++ if(${opt} AND DEFINED ENV{${opt}} AND NOT ${opt} STREQUAL "$ENV{${opt}}")
++ message(WARNING "Conflicting ${opt} values: ignoring environment variable and using CMake cache entry.")
++ elseif(DEFINED ENV{${opt}} AND NOT ${opt})
++ set(${opt} "$ENV{${opt}}")
++ endif()
++endforeach()
++
++find_path(
++ RAPIDJSON_INCLUDE_DIRS
++ NAMES rapidjson/rapidjson.h
++ PATHS ${RAPIDJSON_INCLUDEDIR}
++ DOC "Include directory for the rapidjson library."
++)
++
++mark_as_advanced(RAPIDJSON_INCLUDE_DIRS)
++
++if(RAPIDJSON_INCLUDE_DIRS)
++ set(RAPIDJSON_FOUND TRUE)
++endif()
++
++mark_as_advanced(RAPIDJSON_FOUND)
++
++if(RAPIDJSON_USE_SSE42)
++ set(RAPIDJSON_CXX_FLAGS "-DRAPIDJSON_SSE42")
++ if(MSVC)
++ set(RAPIDJSON_CXX_FLAGS "${RAPIDJSON_CXX_FLAGS} /arch:SSE4.2")
++ else()
++ set(RAPIDJSON_CXX_FLAGS "${RAPIDJSON_CXX_FLAGS} -msse4.2")
++ endif()
++else()
++ if(RAPIDJSON_USE_SSE2)
++ set(RAPIDJSON_CXX_FLAGS "-DRAPIDJSON_SSE2")
++ if(MSVC)
++ set(RAPIDJSON_CXX_FLAGS "${RAPIDJSON_CXX_FLAGS} /arch:SSE2")
++ else()
++ set(RAPIDJSON_CXX_FLAGS "${RAPIDJSON_CXX_FLAGS} -msse2")
++ endif()
++ endif()
++endif()
++
++mark_as_advanced(RAPIDJSON_CXX_FLAGS)
++
++if(RAPIDJSON_FOUND)
++ if(NOT rapidjson_FIND_QUIETLY)
++ message(STATUS "Found rapidjson header files in ${RAPIDJSON_INCLUDE_DIRS}")
++ if(DEFINED RAPIDJSON_CXX_FLAGS)
++ message(STATUS "Found rapidjson C++ extra compilation flags: ${RAPIDJSON_CXX_FLAGS}")
++ endif()
++ endif()
++elseif(rapidjson_FIND_REQUIRED)
++ message(FATAL_ERROR "Could not find rapidjson")
++else()
++ message(STATUS "Optional package rapidjson was not found")
++endif()
+--- a/neo/idlib/precompiled.h
++++ b/neo/idlib/precompiled.h
+@@ -105,7 +105,10 @@
+ #include "../ui/UserInterface.h"
+
+ // RB: required for SWF extensions
+-#include "../libs/rapidjson/include/rapidjson/document.h"
++//#include "../libs/rapidjson/include/rapidjson/document.h"
++#include "rapidjson/document.h"
++
++
+
+ #include "../swf/SWF.h"
+
diff --git a/60-spelling-errors.patch b/60-spelling-errors.patch
new file mode 100644
index 000000000000..4f96e23290b4
--- /dev/null
+++ b/60-spelling-errors.patch
@@ -0,0 +1,394 @@
+Description: Fix several spelling errors found by lintian
+Author: Tobias Frost <tobi@debian.org>
+Forwarded: <URL|no|not-needed, useless if you have a Bug field, optional>
+Last-Update: 2016-10-15
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/base/renderprogs/SMAA.inc
++++ b/base/renderprogs/SMAA.inc
+@@ -228,14 +228,14 @@
+ * - DX10.1: D3D10_STANDARD_MULTISAMPLE_PATTERN or
+ * - DX11: D3D11_STANDARD_MULTISAMPLE_PATTERN
+ *
+- * This allows to ensure that the subsample order matches the table in
++ * This allows one to ensure that the subsample order matches the table in
+ * @SUBSAMPLE_INDICES.
+ *
+ * (*) In the case of DX10, we refer the reader to:
+ * - SMAA::detectMSAAOrder and
+ * - SMAA::msaaReorder
+ *
+- * These functions allow to match the standard multisample patterns by
++ * These functions allow one to match the standard multisample patterns by
+ * detecting the subsample order for a specific GPU, and reordering
+ * them appropriately.
+ *
+@@ -326,8 +326,8 @@
+ * performance.
+ *
+ * Range: [0, 0.5]
+- * 0.1 is a reasonable value, and allows to catch most visible edges.
+- * 0.05 is a rather overkill value, that allows to catch 'em all.
++ * 0.1 is a reasonable value, and allows one to catch most visible edges.
++ * 0.05 is a rather overkill value, that allows one to catch 'em all.
+ *
+ * If temporal supersampling is used, 0.2 could be a reasonable value, as low
+ * contrast edges are properly filtered by just 2x.
+@@ -390,7 +390,7 @@
+ * If there is an neighbor edge that has SMAA_LOCAL_CONTRAST_FACTOR times
+ * bigger contrast than current edge, current edge will be discarded.
+ *
+- * This allows to eliminate spurious crossing edges, and is based on the fact
++ * This allows one to eliminate spurious crossing edges, and is based on the fact
+ * that, if there is too much contrast in a direction, that will hide
+ * perceptually contrast in the other neighbors.
+ */
+@@ -399,7 +399,7 @@
+ #endif
+
+ /**
+- * Predicated thresholding allows to better preserve texture details and to
++ * Predicated thresholding allows one to better preserve texture details and to
+ * improve performance, by decreasing the number of detected edges using an
+ * additional buffer like the light accumulation buffer, object ids or even the
+ * depth buffer (the depth buffer usage may be limited to indoor or short range
+@@ -446,7 +446,7 @@
+ #endif
+
+ /**
+- * Temporal reprojection allows to remove ghosting artifacts when using
++ * Temporal reprojection allows one to remove ghosting artifacts when using
+ * temporal supersampling. We use the CryEngine 3 method which also introduces
+ * velocity weighting. This feature is of extreme importance for totally
+ * removing ghosting. More information here:
+@@ -461,7 +461,7 @@
+ #endif
+
+ /**
+- * SMAA_REPROJECTION_WEIGHT_SCALE controls the velocity weighting. It allows to
++ * SMAA_REPROJECTION_WEIGHT_SCALE controls the velocity weighting. It allows one to
+ * remove ghosting trails behind the moving object, which are not removed by
+ * just using reprojection. Using low values will exhibit ghosting, while using
+ * high values will disable temporal supersampling under motion.
+@@ -869,7 +869,7 @@
+ }
+
+ /**
+- * These functions allows to perform diagonal pattern searches.
++ * These functions allows one to perform diagonal pattern searches.
+ */
+ float2 SMAASearchDiag1(SMAATexture2D(edgesTex), float2 texcoord, float2 dir, out float2 e) {
+ dir.y = API_V_DIR(dir.y);
+@@ -1204,7 +1204,7 @@
+ coords.z = SMAASearchXRight(SMAATexturePass2D(edgesTex), SMAATexturePass2D(searchTex), offset[0].zw, offset[2].y);
+ d.y = coords.z;
+
+- // We want the distances to be in pixel units (doing this here allow to
++ // We want the distances to be in pixel units (doing this here allows one to
+ // better interleave arithmetic and memory accesses):
+ d = abs(round(mad(SMAA_RT_METRICS.zz, d, -pixcoord.xx)));
+
+--- a/doomclassic/doom/p_enemy.cpp
++++ b/doomclassic/doom/p_enemy.cpp
+@@ -1452,7 +1452,7 @@
+ currentthinker = currentthinker->next;
+ }
+
+- // if there are allready 20 skulls on the level,
++ // if there are already 20 skulls on the level,
+ // don't spit another one
+ if (count > 20)
+ return;
+--- a/doomclassic/doom/p_pspr.cpp
++++ b/doomclassic/doom/p_pspr.cpp
+@@ -358,7 +358,7 @@
+ if (player->pendingweapon != wp_nochange || !player->health)
+ {
+ // change weapon
+- // (pending weapon should allready be validated)
++ // (pending weapon should already be validated)
+ newstate = (statenum_t)weaponinfo[player->readyweapon].downstate;
+ P_SetPsprite (player, ps_weapon, newstate);
+ return;
+--- a/doomclassic/doom/p_sight.cpp
++++ b/doomclassic/doom/p_sight.cpp
+@@ -165,7 +165,7 @@
+ {
+ line = seg->linedef;
+
+- // allready checked other side?
++ // already checked other side?
+ if (line->validcount == ::g->validcount)
+ continue;
+
+--- a/doomclassic/doom/structs.h
++++ b/doomclassic/doom/structs.h
+@@ -358,7 +358,7 @@
+ typedef struct
+ {
+ // Block origin (allways UL),
+- // which has allready accounted
++ // which has already accounted
+ // for the internal origin of the patch.
+ int originx;
+ int originy;
+--- a/neo/d3xp/gamesys/Class.h
++++ b/neo/d3xp/gamesys/Class.h
+@@ -216,7 +216,7 @@
+ ( idEventFunc<idClass> * )nameofclass::eventCallbacks, nameofclass::CreateInstance, ( void ( idClass::* )() )&nameofclass::Spawn, \
+ ( void ( idClass::* )( idSaveGame * ) const )&nameofclass::Save, ( void ( idClass::* )( idRestoreGame * ) )&nameofclass::Restore ); \
+ idClass *nameofclass::CreateInstance() { \
+- gameLocal.Error( "Cannot instanciate abstract class %s.", #nameofclass ); \
++ gameLocal.Error( "Cannot instantiate abstract class %s.", #nameofclass ); \
+ return NULL; \
+ } \
+ idTypeInfo *nameofclass::GetType() const { \
+--- a/neo/d3xp/gamesys/SysCvar.cpp
++++ b/neo/d3xp/gamesys/SysCvar.cpp
+@@ -104,8 +104,8 @@
+
+
+ idCVar g_showPVS( "g_showPVS", "0", CVAR_GAME | CVAR_INTEGER, "", 0, 2 );
+-idCVar g_showTargets( "g_showTargets", "0", CVAR_GAME | CVAR_BOOL, "draws entities and thier targets. hidden entities are drawn grey." );
+-idCVar g_showTriggers( "g_showTriggers", "0", CVAR_GAME | CVAR_BOOL, "draws trigger entities (orange) and thier targets (green). disabled triggers are drawn grey." );
++idCVar g_showTargets( "g_showTargets", "0", CVAR_GAME | CVAR_BOOL, "draws entities and their targets. hidden entities are drawn grey." );
++idCVar g_showTriggers( "g_showTriggers", "0", CVAR_GAME | CVAR_BOOL, "draws trigger entities (orange) and their targets (green). disabled triggers are drawn grey." );
+ idCVar g_showCollisionWorld( "g_showCollisionWorld", "0", CVAR_GAME | CVAR_BOOL, "" );
+ idCVar g_showCollisionModels( "g_showCollisionModels", "0", CVAR_GAME | CVAR_BOOL, "" );
+ idCVar g_showCollisionTraces( "g_showCollisionTraces", "0", CVAR_GAME | CVAR_BOOL, "" );
+--- a/neo/framework/Common.cpp
++++ b/neo/framework/Common.cpp
+@@ -68,9 +68,9 @@
+ idCVar com_forceGenericSIMD( "com_forceGenericSIMD", "0", CVAR_BOOL | CVAR_SYSTEM | CVAR_NOCHEAT, "force generic platform independent SIMD" );
+
+ #ifdef ID_RETAIL
+-idCVar com_allowConsole( "com_allowConsole", "0", CVAR_BOOL | CVAR_SYSTEM | CVAR_INIT, "allow toggling console with the tilde key" );
++idCVar com_allowConsole( "com_allowConsole", "0", CVAR_BOOL | CVAR_SYSTEM | CVAR_INIT, "allows one toggling console with the tilde key" );
+ #else
+-idCVar com_allowConsole( "com_allowConsole", "1", CVAR_BOOL | CVAR_SYSTEM | CVAR_INIT, "allow toggling console with the tilde key" );
++idCVar com_allowConsole( "com_allowConsole", "1", CVAR_BOOL | CVAR_SYSTEM | CVAR_INIT, "allows one toggling console with the tilde key" );
+ #endif
+
+ idCVar com_developer( "developer", "0", CVAR_BOOL | CVAR_SYSTEM | CVAR_NOCHEAT, "developer mode" );
+--- a/neo/framework/Common_printf.cpp
++++ b/neo/framework/Common_printf.cpp
+@@ -36,7 +36,7 @@
+ idCVar com_timestampPrints( "com_timestampPrints", "0", CVAR_SYSTEM, "print time with each console print, 1 = msec, 2 = sec", 0, 2, idCmdSystem::ArgCompletion_Integer<0, 2> );
+
+ #ifndef ID_RETAIL
+-idCVar com_printFilter( "com_printFilter", "", CVAR_SYSTEM, "only print lines that contain this, add multiple filters with a ; delimeter" );
++idCVar com_printFilter( "com_printFilter", "", CVAR_SYSTEM, "only print lines that contain this, add multiple filters with a ; delimiter" );
+ #endif
+
+ /*
+--- a/neo/renderer/RenderProgs_embedded.h
++++ b/neo/renderer/RenderProgs_embedded.h
+@@ -465,7 +465,7 @@
+ " * half-rate linear filtering on GCN.\n"
+ " *\n"
+ " * If SMAA is applied to 64-bit color buffers, switching to point filtering\n"
+- " * when accesing them will increase the performance. Search for\n"
++ " * when accessing them will increase the performance. Search for\n"
+ " * 'SMAASamplePoint' to see which textures may benefit from point\n"
+ " * filtering, and where (which is basically the color input in the edge\n"
+ " * detection and resolve passes).\n"
+@@ -580,14 +580,14 @@
+ " * - DX10.1: D3D10_STANDARD_MULTISAMPLE_PATTERN or\n"
+ " * - DX11: D3D11_STANDARD_MULTISAMPLE_PATTERN\n"
+ " *\n"
+- " * This allows to ensure that the subsample order matches the table in\n"
++ " * This allows one to ensure that the subsample order matches the table in\n"
+ " * @SUBSAMPLE_INDICES.\n"
+ " *\n"
+ " * (*) In the case of DX10, we refer the reader to:\n"
+ " * - SMAA::detectMSAAOrder and\n"
+ " * - SMAA::msaaReorder\n"
+ " *\n"
+- " * These functions allow to match the standard multisample patterns by\n"
++ " * These functions allow one to match the standard multisample patterns by\n"
+ " * detecting the subsample order for a specific GPU, and reordering\n"
+ " * them appropriately.\n"
+ " *\n"
+@@ -678,8 +678,8 @@
+ " * performance. \n"
+ " *\n"
+ " * Range: [0, 0.5]\n"
+- " * 0.1 is a reasonable value, and allows to catch most visible edges.\n"
+- " * 0.05 is a rather overkill value, that allows to catch 'em all.\n"
++ " * 0.1 is a reasonable value, and allows one to catch most visible edges.\n"
++ " * 0.05 is a rather overkill value, that allows one to catch 'em all.\n"
+ " *\n"
+ " * If temporal supersampling is used, 0.2 could be a reasonable value, as low\n"
+ " * contrast edges are properly filtered by just 2x.\n"
+@@ -742,7 +742,7 @@
+ " * If there is an neighbor edge that has SMAA_LOCAL_CONTRAST_FACTOR times\n"
+ " * bigger contrast than current edge, current edge will be discarded.\n"
+ " *\n"
+- " * This allows to eliminate spurious crossing edges, and is based on the fact\n"
++ " * This allows one to eliminate spurious crossing edges, and is based on the fact\n"
+ " * that, if there is too much contrast in a direction, that will hide\n"
+ " * perceptually contrast in the other neighbors.\n"
+ " */\n"
+@@ -751,7 +751,7 @@
+ "#endif\n"
+ "\n"
+ "/**\n"
+- " * Predicated thresholding allows to better preserve texture details and to\n"
++ " * Predicated thresholding allows one to better preserve texture details and to\n"
+ " * improve performance, by decreasing the number of detected edges using an\n"
+ " * additional buffer like the light accumulation buffer, object ids or even the\n"
+ " * depth buffer (the depth buffer usage may be limited to indoor or short range\n"
+@@ -798,7 +798,7 @@
+ "#endif\n"
+ "\n"
+ "/**\n"
+- " * Temporal reprojection allows to remove ghosting artifacts when using\n"
++ " * Temporal reprojection allows one to remove ghosting artifacts when using\n"
+ " * temporal supersampling. We use the CryEngine 3 method which also introduces\n"
+ " * velocity weighting. This feature is of extreme importance for totally\n"
+ " * removing ghosting. More information here:\n"
+@@ -813,7 +813,7 @@
+ "#endif\n"
+ "\n"
+ "/**\n"
+- " * SMAA_REPROJECTION_WEIGHT_SCALE controls the velocity weighting. It allows to\n"
++ " * SMAA_REPROJECTION_WEIGHT_SCALE controls the velocity weighting. It allows one to\n"
+ " * remove ghosting trails behind the moving object, which are not removed by\n"
+ " * just using reprojection. Using low values will exhibit ghosting, while using\n"
+ " * high values will disable temporal supersampling under motion.\n"
+@@ -1195,7 +1195,7 @@
+ "#if !defined(SMAA_DISABLE_DIAG_DETECTION)\n"
+ "\n"
+ "/**\n"
+- " * Allows to decode two binary values from a bilinear-filtered access.\n"
++ " * Allows one to decode two binary values from a bilinear-filtered access.\n"
+ " */\n"
+ "float2 SMAADecodeDiagBilinearAccess(float2 e) {\n"
+ " // Bilinear access for fetching 'e' have a 0.25 offset, and we are\n"
+@@ -1221,7 +1221,7 @@
+ "}\n"
+ "\n"
+ "/**\n"
+- " * These functions allows to perform diagonal pattern searches.\n"
++ " * These functions allows one to perform diagonal pattern searches.\n"
+ " */\n"
+ "float2 SMAASearchDiag1(SMAATexture2D(edgesTex), float2 texcoord, float2 dir, out float2 e) {\n"
+ " dir.y = API_V_DIR(dir.y);\n"
+@@ -1357,7 +1357,7 @@
+ "// Horizontal/Vertical Search Functions\n"
+ "\n"
+ "/**\n"
+- " * This allows to determine how much length should we add in the last step\n"
++ " * This allows one to determine how much length should we add in the last step\n"
+ " * of the searches. It takes the bilinearly interpolated edge (see \n"
+ " * @PSEUDO_GATHER4), and adds 0, 1 or 2, depending on which edges and\n"
+ " * crossing edges are active.\n"
+@@ -1392,7 +1392,7 @@
+ " * @PSEUDO_GATHER4\n"
+ " * This texcoord has been offset by (-0.25, -0.125) in the vertex shader to\n"
+ " * sample between edge, thus fetching four edges in a row.\n"
+- " * Sampling with different offsets in each direction allows to disambiguate\n"
++ " * Sampling with different offsets in each direction allows one to disambiguate\n"
+ " * which edges are active from the four fetched ones.\n"
+ " */\n"
+ " float2 e = float2(0.0, 1.0);\n"
+@@ -1556,7 +1556,7 @@
+ " coords.z = SMAASearchXRight(SMAATexturePass2D(edgesTex), SMAATexturePass2D(searchTex), offset[0].zw, offset[2].y);\n"
+ " d.y = coords.z;\n"
+ "\n"
+- " // We want the distances to be in pixel units (doing this here allow to\n"
++ " // We want the distances to be in pixel units (doing this here allows one to\n"
+ " // better interleave arithmetic and memory accesses):\n"
+ " d = abs(round(mad(SMAA_RT_METRICS.zz, d, -pixcoord.xx)));\n"
+ "\n"
+@@ -10542,7 +10542,7 @@
+ "\n"
+ "Doom 3 BFG Edition GPL Source Code\n"
+ "Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. \n"
+- "Coypright (C) 2014 Robert Beckebans\n"
++ "Copyright (C) 2014 Robert Beckebans\n"
+ "\n"
+ "This file is part of the Doom 3 BFG Edition GPL Source Code (\"Doom 3 BFG Edition Source Code\"). \n"
+ "\n"
+@@ -12320,7 +12320,7 @@
+ " float L = ( 1.0 - exp( -Yr * exposure ) );\n"
+ " color.rgb *= L;\n"
+ " \n"
+- " // Kodak filmic tone mappping, includes gamma correction\n"
++ " // Kodak filmic tone mapping, includes gamma correction\n"
+ " //float3 rgb = max( float3( 0 ), color.rgb - float3( 0.004 ) );\n"
+ " //color.rgb = rgb * ( float3( 0.5 ) + 6.2 * rgb ) / ( float3( 0.06 ) + rgb * ( float3( 1.7 ) + 6.2 * rgb ) );\n"
+ " \n"
+--- a/neo/sys/sys_lobby_snapshot.cpp
++++ b/neo/sys/sys_lobby_snapshot.cpp
+@@ -35,7 +35,7 @@
+
+ idCVar net_peer_throttle_mode( "net_peer_throttle_mode", "0", CVAR_INTEGER, "= 0 off, 1 = enable fixed, 2 = absolute, 3 = both" );
+
+-idCVar net_peer_throttle_minSnapSeq( "net_peer_throttle_minSnapSeq", "150", CVAR_INTEGER, "Minumum number of snapshot exchanges before throttling can be triggered" );
++idCVar net_peer_throttle_minSnapSeq( "net_peer_throttle_minSnapSeq", "150", CVAR_INTEGER, "Minimum number of snapshot exchanges before throttling can be triggered" );
+
+ idCVar net_peer_throttle_bps_peer_threshold_pct( "net_peer_throttle_bps_peer_threshold_pct", "0.60", CVAR_FLOAT, "Min reported incoming bps % of sent from host that a peer must maintain before throttling kicks in" );
+ idCVar net_peer_throttle_bps_host_threshold( "net_peer_throttle_bps_host_threshold", "1024", CVAR_FLOAT, "Min outgoing bps of host for bps based throttling to be considered" );
+--- a/neo/tools/compilers/aas/BrushBSP.cpp
++++ b/neo/tools/compilers/aas/BrushBSP.cpp
+@@ -87,7 +87,7 @@
+ {
+ if( nodes[0] || nodes[1] )
+ {
+- common->Error( "AddToNode: allready included" );
++ common->Error( "AddToNode: already included" );
+ }
+
+ assert( front && back );
+--- a/neo/tools/compilers/dmap/portals.cpp
++++ b/neo/tools/compilers/dmap/portals.cpp
+@@ -111,7 +111,7 @@
+ {
+ if( p->nodes[0] || p->nodes[1] )
+ {
+- common->Error( "AddPortalToNode: allready included" );
++ common->Error( "AddPortalToNode: already included" );
+ }
+
+ p->nodes[0] = front;
+@@ -877,7 +877,7 @@
+
+ if( node->area != -1 )
+ {
+- return; // allready got it
++ return; // already got it
+ }
+ if( node->opaque )
+ {
+@@ -939,7 +939,7 @@
+
+ if( node->area != -1 )
+ {
+- return; // allready got it
++ return; // already got it
+ }
+
+ c_areaFloods = 0;
+--- a/neo/ui/GuiScript.cpp
++++ b/neo/ui/GuiScript.cpp
+@@ -426,7 +426,7 @@
+
+ if( handler == NULL )
+ {
+- src->Error( "Uknown script call %s", token.c_str() );
++ src->Error( "Unknown script call %s", token.c_str() );
+ }
+ // now read parms til ;
+ // all parms are read as idWinStr's but will be fixed up later
+--- a/README.txt
++++ b/README.txt
+@@ -324,7 +324,7 @@
+ r_useHDR [0 or 1] - Use High Dynamic Range lighting
+
+ r_hdrAutoExposure [0 or 1] - Adaptive tonemapping with HDR
+- This allows to have very bright or very dark scenes but the camera will adopt to it so the scene won't loose details
++ This allows on to have very bright or very dark scenes but the camera will adopt to it so the scene won't loose details
+
+ r_exposure [0 .. 1] - Default 0.5, Controls brightness and affects HDR exposure key
+ This is what you change in the video brightness options
diff --git a/70-disable-hdr-by-default.patch b/70-disable-hdr-by-default.patch
new file mode 100644
index 000000000000..8d0ea8958118
--- /dev/null
+++ b/70-disable-hdr-by-default.patch
@@ -0,0 +1,20 @@
+Description: Change default to disable HDR rendering
+ Sometimes with HDR and SSAO enabled, there will be black sticking artifacts.
+ This patch sets the default for HDR to "off"
+ See the upstream bug for detail.
+Author: Tobias Frost <tobi@debian.org>
+Bug: https://github.com/RobertBeckebans/RBDOOM-3-BFG/issues/308
+Last-Update: 2016-10-15
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/neo/renderer/RenderSystem_init.cpp
++++ b/neo/renderer/RenderSystem_init.cpp
+@@ -252,7 +252,7 @@
+ idCVar r_shadowMapSunDepthBiasScale( "r_shadowMapSunDepthBiasScale", "0.999991", CVAR_RENDERER | CVAR_FLOAT, "shadowmap bias to fight shadow acne for cascaded shadow mapping with parallel lights" );
+
+ // RB: HDR parameters
+-idCVar r_useHDR( "r_useHDR", "1", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_BOOL, "use high dynamic range rendering" );
++idCVar r_useHDR( "r_useHDR", "0", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_BOOL, "use high dynamic range rendering" );
+ idCVar r_hdrAutoExposure( "r_hdrAutoExposure", "1", CVAR_RENDERER | CVAR_BOOL, "EXPENSIVE: enables adapative HDR tone mapping otherwise the exposure is derived by r_exposure" );
+ idCVar r_hdrMinLuminance( "r_hdrMinLuminance", "0.005", CVAR_RENDERER | CVAR_FLOAT, "" );
+ idCVar r_hdrMaxLuminance( "r_hdrMaxLuminance", "300", CVAR_RENDERER | CVAR_FLOAT, "" );
diff --git a/80-gcc7.patch b/80-gcc7.patch
new file mode 100644
index 000000000000..6ea6cf786e95
--- /dev/null
+++ b/80-gcc7.patch
@@ -0,0 +1,221 @@
+diff --git a/doomclassic/doom/st_stuff.cpp b/doomclassic/doom/st_stuff.cpp
+index 481ec82..baeaf01 100644
+--- a/doomclassic/doom/st_stuff.cpp
++++ b/doomclassic/doom/st_stuff.cpp
+@@ -968,7 +968,7 @@ void ST_loadGraphics(void)
+ int j;
+ int facenum;
+
+- char namebuf[9];
++ char namebuf[11];
+
+ // Load the numbers, tall and short
+ for (i=0;i<10;i++)
+diff --git a/doomclassic/doom/wi_stuff.cpp b/doomclassic/doom/wi_stuff.cpp
+index 47837cf..cec5156 100644
+--- a/doomclassic/doom/wi_stuff.cpp
++++ b/doomclassic/doom/wi_stuff.cpp
+@@ -1503,16 +1503,17 @@ void WI_loadData(void)
+ {
+ int i;
+ int j;
+- char name[9];
++ char name[20];
+ anim_t* a;
+
+- if (::g->gamemode == commercial)
++ if (::g->gamemode == commercial) {
+ strcpy(name, "INTERPIC");
+ // DHM - Nerve :: Use our background image
+ //strcpy(name, "DMENUPIC");
+- else
+- sprintf(name, "WIMAP%d", ::g->wbs->epsd);
+-
++ } else {
++ snprintf(name, 20, "WIMAP%d", ::g->wbs->epsd);
++ name[19] = 0;
++ }
+ if ( ::g->gamemode == retail )
+ {
+ if (::g->wbs->epsd == 3)
+@@ -1542,7 +1543,8 @@ void WI_loadData(void)
+ ::g->lnames = (patch_t **) DoomLib::Z_Malloc(sizeof(patch_t*) * ::g->NUMCMAPS, PU_LEVEL_SHARED, 0);
+ for (i=0 ; i < ::g->NUMCMAPS ; i++)
+ {
+- sprintf(name, "CWILV%2.2d", i);
++ snprintf(name, 20, "CWILV%2.2d", i);
++ name[19] = 0;
+ ::g->lnames[i] = (patch_t*)W_CacheLumpName(name, PU_LEVEL_SHARED);
+ }
+ }
+@@ -1551,7 +1553,8 @@ void WI_loadData(void)
+ ::g->lnames = (patch_t **) DoomLib::Z_Malloc(sizeof(patch_t*) * ( NUMMAPS ), PU_LEVEL_SHARED, 0);
+ for (i=0 ; i<NUMMAPS ; i++)
+ {
+- sprintf(name, "WILV%d%d", ::g->wbs->epsd, i);
++ snprintf(name, 20, "WILV%d%d", ::g->wbs->epsd, i);
++ name[19] = 0;
+ ::g->lnames[i] = (patch_t*)W_CacheLumpName(name, PU_LEVEL_SHARED);
+ }
+
+@@ -1575,7 +1578,8 @@ void WI_loadData(void)
+ if (::g->wbs->epsd != 1 || j != 8)
+ {
+ // animations
+- sprintf(name, "WIA%d%.2d%.2d", ::g->wbs->epsd, j, i);
++ snprintf(name, 20, "WIA%d%.2d%.2d", ::g->wbs->epsd, j, i);
++ name[19] = 0;
+ a->p[i] = (patch_t*)W_CacheLumpName(name, PU_LEVEL_SHARED);
+ }
+ else
+@@ -1594,7 +1598,7 @@ void WI_loadData(void)
+ for (i=0;i<10;i++)
+ {
+ // numbers 0-9
+- sprintf(name, "WINUM%d", i);
++ snprintf(name, 10, "WINUM%d", i); name[9] = 0;
+ ::g->num[i] = (patch_t*)W_CacheLumpName(name, PU_LEVEL_SHARED);
+ }
+
+@@ -1651,11 +1655,11 @@ void WI_loadData(void)
+ for (i=0 ; i<MAXPLAYERS ; i++)
+ {
+ // "1,2,3,4"
+- sprintf(name, "STPB%d", i);
++ snprintf(name, 10, "STPB%d", i); name[9] = 0;
+ ::g->wistuff_p[i] = (patch_t*)W_CacheLumpName(name, PU_LEVEL_SHARED);
+
+ // "1,2,3,4"
+- sprintf(name, "WIBP%d", i+1);
++ snprintf(name, 10, "WIBP%d", i+1); name[9] = 0;
+ ::g->wistuff_bp[i] = (patch_t*)W_CacheLumpName(name, PU_LEVEL_SHARED);
+ }
+
+diff --git a/neo/d3xp/MultiplayerGame.cpp b/neo/d3xp/MultiplayerGame.cpp
+index a14c6da..4780f95 100644
+--- a/neo/d3xp/MultiplayerGame.cpp
++++ b/neo/d3xp/MultiplayerGame.cpp
+@@ -631,7 +631,8 @@ idMultiplayerGame::GameTime
+ const char* idMultiplayerGame::GameTime()
+ {
+ static char buff[16];
+- int m, s, t, ms;
++ unsigned int m, s, t;
++ int ms;
+
+ if( gameState == COUNTDOWN )
+ {
+@@ -653,7 +654,9 @@ const char* idMultiplayerGame::GameTime()
+ }
+ else
+ {
+- sprintf( buff, "WMP %i", s );
++ snprintf( buff, 16, "WMP %i", s );
++ buff[15] = 0;
++
+ }
+ }
+ else
+@@ -678,7 +681,8 @@ const char* idMultiplayerGame::GameTime()
+ t = s / 10;
+ s -= t * 10;
+
+- sprintf( buff, "%i:%i%i", m, t, s );
++ snprintf( buff, 16, "%i:%i%i", m, t, s );
++ buff[15] = 0;
+ }
+ return &buff[0];
+ }
+diff --git a/neo/idlib/StrStatic.h b/neo/idlib/StrStatic.h
+index 4fdb52d..63c930f 100644
+--- a/neo/idlib/StrStatic.h
++++ b/neo/idlib/StrStatic.h
+@@ -97,7 +97,7 @@ public:
+ {
+ buffer[ 0 ] = '\0';
+ SetStaticBuffer( buffer, _size_ );
+- idStr::operator=( b );
++ idStr::operator=( idStr(b) );
+ }
+
+ ID_INLINE explicit idStrStatic( const char c ) :
+@@ -105,7 +105,7 @@ public:
+ {
+ buffer[ 0 ] = '\0';
+ SetStaticBuffer( buffer, _size_ );
+- idStr::operator=( c );
++ idStr::operator=( idStr(c) );
+ }
+
+ ID_INLINE explicit idStrStatic( const int i ) :
+@@ -113,7 +113,7 @@ public:
+ {
+ buffer[ 0 ] = '\0';
+ SetStaticBuffer( buffer, _size_ );
+- idStr::operator=( i );
++ idStr::operator=( idStr(i) );
+ }
+
+ ID_INLINE explicit idStrStatic( const unsigned u ) :
+@@ -121,7 +121,7 @@ public:
+ {
+ buffer[ 0 ] = '\0';
+ SetStaticBuffer( buffer, _size_ );
+- idStr::operator=( u );
++ idStr::operator=( idStr(u) );
+ }
+
+ ID_INLINE explicit idStrStatic( const float f ) :
+@@ -129,7 +129,7 @@ public:
+ {
+ buffer[ 0 ] = '\0';
+ SetStaticBuffer( buffer, _size_ );
+- idStr::operator=( f );
++ idStr::operator=( idStr(f) );
+ }
+
+ private:
+diff --git a/neo/tools/compilers/dmap/dmap.cpp b/neo/tools/compilers/dmap/dmap.cpp
+index 655e881..03c5831 100644
+--- a/neo/tools/compilers/dmap/dmap.cpp
++++ b/neo/tools/compilers/dmap/dmap.cpp
+@@ -34,6 +34,10 @@ If you have questions concerning this license or the applicable additional terms
+
+ dmapGlobals_t dmapGlobals;
+
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
+ /*
+ ============
+ ProcessModel
+@@ -243,7 +247,7 @@ void Dmap( const idCmdArgs& args )
+ {
+ int i;
+ int start, end;
+- char path[1024];
++ char path[PATH_MAX];
+ idStr passedName;
+ bool leaked = false;
+ bool noCM = false;
+@@ -390,7 +394,8 @@ void Dmap( const idCmdArgs& args )
+ // if this isn't a regioned map, delete the last saved region map
+ if( passedName.Right( 4 ) != ".reg" )
+ {
+- sprintf( path, "%s.reg", dmapGlobals.mapFileBase );
++ snprintf( path, PATH_MAX, "%s.reg", dmapGlobals.mapFileBase );
++ path[PATH_MAX-1] = 0;
+ fileSystem->RemoveFile( path );
+ }
+ else
+@@ -402,7 +407,8 @@ void Dmap( const idCmdArgs& args )
+ passedName = stripped;
+
+ // delete any old line leak files
+- sprintf( path, "%s.lin", dmapGlobals.mapFileBase );
++ snprintf( path, PATH_MAX, "%s.lin", dmapGlobals.mapFileBase );
++ path[PATH_MAX-1] = 0;
+ fileSystem->RemoveFile( path );
+
+ // delete any old generated binary proc files
diff --git a/PKGBUILD b/PKGBUILD
index d279262dca11..e3f1788ee27e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,27 +2,40 @@
# Based on the rbdoom3-bfg-git package by M0Rf30
pkgname=rbdoom-3-bfg
-pkgver=1.0.3
-pkgrel=5
+_commit=e5b3c697d23b9a90c654181162fe476c8c4f90d9
+pkgver=1.1.0preview3.r98.e5b3c697
+pkgrel=1
pkgdesc="Doom 3 BFG source code (Robert Beckebans repo)."
arch=('i686' 'x86_64')
url="https://github.com/RobertBeckebans/RBDOOM-3-BFG"
license=('GPL3')
groups=('games')
-depends=(doom3bfg-data ffmpeg glew openal sdl2)
-makedepends=('cmake' 'zip')
+depends=(doom3bfg-data ffmpeg glew libpng openal sdl2)
+makedepends=(cmake rapidjson zip)
conflicts=('rbdoom3-bfg-git')
optdepends=('alsa-plugins: pulseaudio-support'
'libpulse: pulseaudio support')
-source=("https://github.com/RobertBeckebans/RBDOOM-3-BFG/archive/${pkgver}.tar.gz"
+source=("https://github.com/RobertBeckebans/RBDOOM-3-BFG/archive/${_commit}.tar.gz"
'rbdoom-3-bfg.desktop'
- '0001-Patch-from-Debian-803857-to-support-ffmpeg-2.9.patch')
-sha256sums=('961182e741529c0a3634f1892d067b724ddd800cca936522c1d70415789e6bfb'
- 'b05a261bd2fd4c1a32788d68397c98e17008d0636bc948edad51d2ebe29f5a8a'
- '1815f68da09bb67abc560fc1ef8e57a572d5b33b919102dc95d80e3369162929')
+ 20-reproducible.patch
+ 30-init-sdl2.patch
+ 40-libpng16.patch
+ 50-system-rapidjson.patch
+ 60-spelling-errors.patch
+ 70-disable-hdr-by-default.patch
+ 80-gcc7.patch)
+sha512sums=('3773935aa7684dca0e1f310f8c23afc61000d5bb9e579361df9113c0be12e5e1f5b5af4719461a0b6868ddb47a7e84d812b494a14e8993a0cf3f5d60a3094a8a'
+ 'f1a74a79c369bec1c371eb74f7e8c415b4d1993fae995b0e476eb7c7e3b0a42dfb8ee5ae1f2e960c1443603f36abe37409ffeac0c29fd085ef5045388ff905f8'
+ 'db8c51b9bcdb35e81bdc8c5a0ba2575060948ed2fb9837f92cfb9ff73b5f709d8f0909b12cc7715d72dad91cf79d769fd27817c8442bf642af967b1d237974fd'
+ 'c60b508f5f5c3e19a0ef2431b3d2119b405e8f610356a98c931c16a53ac1b319c485ebe9d454b884a6d66829573377e3f94220bc50dc70efde45c9312f172859'
+ 'efd74dacb3cdd28b7d78b348e884de0e23170908504f32f1dad2ded81c49a1c7e3b0f80da4fca96c14e52c4aeb2c4591a5877ada81ea2fcd3ab9e59b78d3989e'
+ 'f7ca60ca455be6cfc7a1367edc3850a97b701e3f3d34ebe67d7f8a2b5412d5006fc7554712147cba450d7de0b4fab18a4eb292ca88272dc4ecc3a9462428bc16'
+ 'bc1f8bf5ae2025d776080ec41496a16c3e09b1737d4f1c1f76bddb48f97a394dda3ba1f6e08ac8c5d8731a4acc5212a43f90daf41ba7d0f50f8dba5dc18b1069'
+ '6cdf1650709a85cc96a57bc1e6fa127fa6b25ac980984a9f60f77daf4a761589a41eaff61fd7ca9946218a20edd835f4fb28d9844cbac8e6b28769ff149e6dec'
+ '884ac7ae61b780042b012bbc1d702260533768edc466572dd6b35568966e1d837d7d6a43e77e7b1f7405b71871d55971d3d236df19f59110b8fa39e18b5b4b9f')
prepare() {
- cd "$srcdir/RBDOOM-3-BFG-$pkgver"
+ cd "$srcdir/RBDOOM-3-BFG-$_commit"
for patch in ../*.patch; do
if [ ! -f "$patch" ]; then
@@ -34,18 +47,26 @@ prepare() {
}
build() {
- mkdir "RBDOOM-3-BFG-$pkgver/build"
- cd "RBDOOM-3-BFG-$pkgver/build"
+ mkdir "RBDOOM-3-BFG-$_commit/build"
+ cd "RBDOOM-3-BFG-$_commit/build"
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DOPENAL=1 -DSDL2=ON \
- -DUSE_SYSTEM_LIBGLEW=1 -DUSE_SYSTEM_LIBJPEG=1 \
- -DUSE_SYSTEM_ZLIB=1 -Wno-dev ../neo
+ cmake -DCMAKE_INSTALL_PREFIX=/usr \
+ -DOPENAL=ON \
+ -DSDL2=ON \
+ -DUSE_SYSTEM_LIBGLEW=ON \
+ -DUSE_SYSTEM_LIBJPEG=ON \
+ -DUSE_SYSTEM_LIBPNG=ON \
+ -DUSE_SYSTEM_RAPIDJSON=ON \
+ -DUSE_SYSTEM_ZLIB=ON \
+ -DUSE_PRECOMPILED_HEADERS=OFF \
+ -Wno-dev ../neo
make
}
package() {
- cd "RBDOOM-3-BFG-$pkgver/build"
+ cd "RBDOOM-3-BFG-$_commit/build"
install -Dm755 RBDoom3BFG "$pkgdir/usr/bin/RBDoom3BFG"
install -Dm644 "../../rbdoom-3-bfg.desktop" "$pkgdir/usr/share/applications/rbdoom-3-bfg.desktop"
+ ln -s RBDoom3BFG "$pkgdir/usr/bin/rbdoom3bfg"
}
diff --git a/rbdoom-3-bfg.desktop b/rbdoom-3-bfg.desktop
index 1140f6eda665..f38e8d87e9ef 100644
--- a/rbdoom-3-bfg.desktop
+++ b/rbdoom-3-bfg.desktop
@@ -1,5 +1,4 @@
[Desktop Entry]
-Encoding=UTF-8
Name=RBDOOM-3-BFG
GenericName=Doom 3: BFG Edition
Exec=/usr/bin/RBDoom3BFG