Debian Patches

Status for darkplaces/0~20180908~beta1-5

Patch Description Author Forwarded Bugs Origin Last update
Remove-the-CONFIG_CD-macro-and-enable-faketracks-uncondit.patch Remove the CONFIG_CD macro, and enable faketracks unconditionally.
All support for playing back CD-DA has been removed by leaving only the
SDL2 clients, and it is rather unlikely for CD-DA support to come back.
However while doing so, the CONFIG_CD macro was disabled in the makefile
but not the MSVC project, which broke faketracks (i.e. background music
via track003.ogg files) on Linux.

This change removes all #ifdefs for CONFIG_CD as well as its enablement
in the MSVC project, which is basically equivalent to having the feature
always being enabled.

Fixes background music in Quake with ripped music, Nexuiz, Xonotic, and
probably many other DP-based games. Also fixes Xonotic log spam about

(cherry picked from commit 19487ef2ebada39fb6a6a372b30ca4f66bb78ada)
divverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249> no upstream, commit:r12466 2018-10-19
Make-CDAudio_Play_byName-static.patch Make CDAudio_Play_byName static.
It isn't called by any other compilation units, but only internally by
other cd_shared.c functions; more importantly, it does not check for
music_playlist being active like CDAudio_Play does, which would at the
very least be confusing if someone were to add a string version of
qw_svc_cdtrack (WHY WOULD ONE).

(cherry picked from commit 2e9fe4d8070a563ff28a23a76285bad0e795f559)
divverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249> no upstream, commit:r12467 2018-10-19
Remove-unused-APIs-from-cdaudio.h.patch Remove unused APIs from cdaudio.h.
These included an internal function of the playlist system which I could
make static as well.

(cherry picked from commit e5856889727824ed7e1ddea777b16c37ea4043ad)
divverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249> no upstream, commit:r12468 2018-10-19
Do-not-build-VBOs-on-a-dedicated-server.patch Do not build VBOs on a dedicated server.
Fixes crash at startup of dedicated server in Quake and Xonotic
(probably in everything).

The only reason why this ever worked before was that Mod_BuildVBOs's
main callee R_Mesh_CreateMeshBuffer did a GL2 feature test before
calling into anything VBO related (and on a dedicated server, which does
not initialize GL, the test always returns false); however now that we
require GL32, the feature test is gone and thus the crash happened. An
explicit check for being a dedicated server fixes that.

(cherry picked from commit d65ddd94d473b4925aa589ae2c32a3cf1c250e31)
divverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249> no upstream, commit:r12469 2018-10-19
Fix-setinfo.patch Fix setinfo.

]setinfo tea "earl grey, hot"

This kills the "team=none" info variable.

Also, fix some memory accesses beyond end of string; probably can be
reproduced somehow to cause mayhem.

(cherry picked from commit 1ff3bc8e953680793a28ea923f2d1e58cdf2c9f0)
divverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249> no upstream, commit:r12470 2019-01-09
Fix-engine-not-starting-on-Windows-if-linked-against-SDL-.patch Fix engine not starting on Windows if linked against SDL > 2.0.5
This migrates SDL_OpenAudio -> SDL_OpenAudioDevice et cetera, i.e. with explicit
device handles now.

Changes from DarkplacesRM

(cherry picked from commit 2075ae43356d724bae305ce8fd36ea570718b14a)
divverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249> no upstream, commit:r12471 2019-02-02
Avoid-passing-NULLs-to-glBufferSubData.patch Avoid passing NULLs to glBufferSubData.
Fixes crash at startup with Linux intel drivers. Can't tell why it doesn't crash
llvmpipe too.

Sorry, I'm not sure if skipping the entire logic of R_BufferData_Store in this
case is right. It does seem to be though.

If this change is a bad idea, please revert.

(cherry picked from commit 364bfae7928352be358f01785420fabf1b6eac03)
divverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249> no upstream, commit:r12472 2019-02-03
Remove-code-for-r_fakelight.patch Remove code for r_fakelight.
We have r_fullbright_directed now, which uses no shader permutation bit and has
a very similar effect.

Yay, less shaders!

(cherry picked from commit 0ea8f691e05ea968bb8940942197fa627966ff99)
divverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249> no upstream, commit:r12473 2019-02-04
Remove-code-for-r_equalize_entities.patch Remove code for r_equalize_entities*.
r_fullbright_directed and slapping EF_FULLBRIGHT on these entities works a lot
better. I believe other than Xonotic nobody uses this, and Xonotic used it only
to make some fullbright stuff prettier and that's been removed for a few months

After this change, older Xonotic versions will complain about nonexisting flag
at startup, but I bet no player will even notice the difference - all it changes
is that EF_FULLBRIGHT entities will appear less directionally, and
r_fullbright_directed 1 will fix this in a better way (already set in current

(cherry picked from commit 4d192dbaa2ce64ddb0f1fd687c44e79ea152a6af)
divverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249> no upstream, commit:r12474 2019-02-04
Add-support-for-DP_LINK_VORBIS-make-variable.patch Add support for DP_LINK_VORBIS make variable
Like the existing DP_LINK_TO_JPEG, this links libvorbisfile in the
normal way instead of dlopening it. Linux distributions like Debian
strongly prefer normal library linking: we have a lot of infrastructure for
tracking correct versioned dependencies in this mode of linking and
avoiding incompatible versions, and package systems like apt mean that
it's trivial to install dependencies.

This uses the existing support for linking to libvorbisfile in the normal
way, which is used on Android and iOS. The default on other platforms
is the current behaviour: dlopen libvorbisfile.
Simon McVittie <> no vendor, Debian 2015-02-15
Add-support-for-DP_LINK_THEORA-shared-default-is-dlo.patch Add support for DP_LINK_THEORA=shared (default is dlopen)
Like the existing DP_LINK_TO_JPEG, this can be configured to
link libtheora etc. in the normal way instead of dlopening them.
Simon McVittie <> no vendor, Debian 2015-04-02
image_png.h-change-name-of-multiple-inclusion-guard-.patch image_png.h: change name of multiple-inclusion guard to not interfere with <png.h>

This is a prerequisite for using the system <png.h>.
Simon McVittie <> no vendor, Debian 2011-07-07
Be-a-bit-more-type-safe-about-using-libpng.patch Be a bit more type-safe about using libpng
The simplified libpng declarations in DarkPlaces just use "void **" for
various pointer-to-pointer arguments. However, this conflicts with
the system libpng headers (if used), which expect something like
"png_struct **" (which is not considered to be a compatible type by
ISO C), causing compiler warnings. This patch reduces the simplification
a bit by distinguishing between the various pointers-to-struct enough
that system libpng headers do not provoke warnings.

Similarly, assigning a function pointer provokes warnings if the
arguments' types are not exactly as expected. Avoiding those warnings
potentially makes genuine bugs easier to spot, so it seems worth being
a bit more precise.
Simon McVittie <> no vendor, Debian 2015-04-02
Add-support-for-DP_LINK_PNG-shared-default-is-dlopen.patch Add support for DP_LINK_PNG=shared (default is dlopen)
Like the existing DP_LINK_TO_JPEG, this can be configured to
link libpng in the normal way instead of dlopening it.
Simon McVittie <> no vendor, Debian 2015-04-02
add-DP_LINK_CURL-option.patch add DP_LINK_CURL option
In Debian we want library dependencies to work in the conventional way,
since many tools expect that and use it to generate package
Simon McVittie <> no vendor, Debian 2015-04-02
Add-DP_LINK_FREETYPE2-option.patch Add DP_LINK_FREETYPE2 option
In Debian we want library dependencies to work in the conventional way,
since many tools expect that and use it to generate package
Simon McVittie <> no vendor, Debian 2015-04-02
Add-support-for-forcing-d0_blind_id-and-d0_rijndael-.patch Add support for forcing d0_blind_id and d0_rijndael to never be dlopen'd

Until these libraries exist as Debian packages, we'd prefer a local copy
(which might not be compatible) to never be loaded accidentally.
Simon McVittie <> no vendor, Debian 2012-01-20
Add-support-for-disabling-libavw.patch Add support for disabling libavw
As with all the other dlopen()'d libraries, if we're going to use them,
we should link them properly so dpkg-shlibdeps can pick up the
right versioned dependencies. Xonotic 0.7.0 doesn't seem to ship
this one so we can probably just omit it.
Simon McVittie <> no vendor, Debian 2013-05-18
Disable-dlopen-support-and-warn-if-it-gets-compiled-.patch Disable dlopen support, and warn if it gets compiled in Simon McVittie <> invalid vendor, Debian 2013-05-18
Fix-OS-detection-of-darkplaces-makefile-to-not-think.patch Fix OS detection of darkplaces' makefile to not think it's on BSD on GNU/kFreeBSD

[The DarkPlaces build system mostly cares about userland, not the kernel,
and GNU/kFreeBSD is equivalent to GNU/Linux in that respect. -smcv]
Cyril Brulebois <> no vendor, Debian 2006-12-26
Fix-various-typos.patch Fix various typos
Picked up by Debian's Lintian package-checking tool.
Simon McVittie <> no vendor, Debian 2012-01-20
Disable-gpu-skinning-for-skeletal-models.patch Disable gpu skinning for skeletal models
This feature is buggy and sometimes causes models to completely
lack animation and can cause very high frame rates. Xonotic
developers are aware of this and disabling this feature is the
temporary work around. See
David Bate <> no 2014-01-11

All known versions for source package 'darkplaces'