debian/0000755000000000000000000000000012264625047007176 5ustar debian/README.Debian0000644000000000000000000001057212264625047011244 0ustar Client vs. server ================= For the dedicated server, run darkplaces-server instead of darkplaces. You can also use the client binary as a dedicated server by running "darkplaces -dedicated". Using this engine to play Nexuiz ================================ Upgrade the nexuiz and nexuiz-server packages to version "2.5.2+dp" or later, and they will run using this version of DarkPlaces. Earlier versions contained their own outdated copy of DarkPlaces. Using this engine to play Quake =============================== As with any Quake engine, you will need the data files in order to use it. The first episode of Quake is available gratis as shareware from iD. Of course the data from the full version of the game will also work fine, if you have it. Use the "game-data-packager" package (in the Debian contrib archive area) to build and install the "quake-registered" or "quake-shareware" package, then run the engine via the wrapper scripts in the quake or quake-server packages (also from contrib): quake --engine=/usr/games/darkplaces or for a dedicated server: quake-server --engine=/usr/games/darkplaces-server If you have both DarkPlaces and Quakespasm installed, the "quake" and "quake-server" scripts and menu entries will default to running whichever was installed first, in order to avoid losing access your saved games and settings by switching to the other engine. You can select which one is the default via update-aternatives: sudo update-alternatives --config quake-engine sudo update-alternatives --config quake-engine-server Using this engine to play other games (e.g. OpenQuartz) ======================================================= DarkPlaces applies different options and workarounds to various mods and standalone games, so in addition to selecting a base directory for game content, you should select a game mode by using one of these options: -quake (this is the default) Quake -hipnotic Mission pack 1, Scourge of Armagon -rogue Mission pack 2, Dissolution of Eternity -battlemech Battlemech (multi-player game) -contagiontheory Contagion Theory (game) -darsana Darsana (game) -did2 Defeat in Detail 2 (game) -dq Deluxe Quake (game) -edu2p EDU2 Prototype (game) -goodvsbad2 Good vs. Bad 2 (psychedelic RTS FPS) -moonhelm MoonHelm (game) -nehahra The Seal of Nehahra -neoteric Neoteric (game) -nexuiz Nexuiz (GPL multi-player game) -omnicide Blood Omnicide (game) -openquartz OpenQuartz (GPL game) -prophecy Prophecy (game) -prydon Prydon Gate (action RPG) -quoth Quoth (Quake mod pack) -setheral Setheral (multi-player game) -steelstorm Steel Storm (game) -strapbomb Strap-on-bomb Car (game) -tenebrae Tenebrae (graphics test mod) -teu The Evil Unleashed (obsolete) -thehunted The Hunted (game) -transfusion Transfusion (Blood ported to Quake) -xonotic Xonotic (GPL multi-player game) -zymotic Zymotic (single-player game) The engine looks for the data in the *current directory* by default, so it expects to find, for instance, 'id1/pak0.pak' wherever you started the game. You can specify another directory like so: darkplaces -openquartz -basedir /usr/local/share/openquartz If you make a symlink to the engine binary whose name includes one of these keywords, running it is equivalent to using the appropriate game mode option: battlemech contagiontheory darsana did2 dq edu2p gvb2 hipnotic moonhelm nehahra neoteric nexuiz omnicide openquartz prophecy prydon rogue quoth setheral steelstorm strapbomb tenebrae teu thehunted transfusion xonotic zymotic debian/changelog0000644000000000000000000001212712264625047011053 0ustar darkplaces (0~20130304+svn11952-2) unstable; urgency=medium [ David Bate ] * Refresh debian/patches following git-buildpackage's export rewrite * Add a patch to disable gpu skinning of skeletal models. (Closes: #729101, thanks Benjamin Redelings) * Update to standards version 3.9.5 (no changes necessary) * Updated debian/copyright [ Simon McVittie ] * Release to unstable -- Simon McVittie Sun, 12 Jan 2014 23:47:17 +0000 darkplaces (0~20130304+svn11952-1) unstable; urgency=low [ David Bate ] * Imported upstream version 0~20130304+svn11952, as recommended for Xonotic 0.7.0 - refresh patches - updated debian/copyright [ Simon McVittie ] * Provide quake-engine, quake-engine-server - we already followed everything required for that by my Quake mini-policy, except providing the actual virtual package. (Closes: #721031, thanks Fabian Greffrath) * Update README.Debian: - nexuiz, nexuiz-server now use this package - quake, quake-server are available in contrib, and are the recommended way to play Quake in Debian - describe how to manipulate the alternatives entries * Fix attribution on kFreeBSD support patch, it was really contributed by Cyril Brulebois * Release to unstable -- Simon McVittie Wed, 25 Sep 2013 10:19:53 +0100 darkplaces (0~20110628+svn11805-2) unstable; urgency=low [ David Bate ] * Set DISABLE_AVW=1 in debian/rules so that debian/patches/0022... takes effect. [ Simon McVittie ] * Add CPPFLAGS to LDFLAGS_*, because the LDFLAGS_* are used to compile C (albeit only builddate.c) * Use DEB_*_MAINT_APPEND to set the CFLAGS, etc. * Canonicalize Vcs-* (Lintian) -- Simon McVittie Thu, 06 Jun 2013 08:25:30 +0100 darkplaces (0~20110628+svn11805-1) unstable; urgency=low [ David Bate ] * Imported Upstream version 0~20110628+svn11805, as recommended for Xonotic 0.6.0 - refresh patches - remove upstream patch r11796 * Add myself to uploaders * Update to standards version 3.9.4 (no changes necessary) [ Simon McVittie ] * Update debian/copyright * Add a patch to disable attempts to load libavw, an apparently unreleased avcodec wrapper * Add a patch to "poison" Sys_LoadLibrary to make sure we don't accidentally bypass proper shared library versioning and dependencies, since in Quake (unlike Quake III) it isn't used for game modules -- Simon McVittie Sat, 25 May 2013 16:07:42 +0100 darkplaces (0~20110628+svn11619-3) unstable; urgency=low * Apply upstream r11796 to fix certain teleport triggers, notably making Quake multiplayer map dm6 playable again (Closes: #688359) * Apply security-hardening CPPFLAGS in CFLAGS since darkplaces can be used by nexuiz-server and quake-server, which are network-exposed, and its makefile does not respect external CPPFLAGS -- Simon McVittie Fri, 12 Oct 2012 09:44:26 +0100 darkplaces (0~20110628+svn11619-2) unstable; urgency=low * Conditionalize more references to the software rasterizer, fixing more FTBFSs on non-x86 (Closes: #656602) * Use the png_jmpbuf macro, the system's definition of png_uint_32 and the real libpng version number, to be compatible with both libpng 1.2 and 1.5, hopefully (Closes: #650594) -- Simon McVittie Sat, 21 Jan 2012 22:44:37 +0000 darkplaces (0~20110628+svn11619-1) unstable; urgency=low * New upstream snapshot r11619, as recommended by the Xonotic developers for Xonotic 0.5 - remove patch to disable OffscreenGecko, which has been removed upstream - refresh patches * Mention "Nexuiz Classic", not "Nexuiz", in the package description (Nexuiz upstream has retroactively renamed what we package as nexuiz to Nexuiz Classic), and also mention Xonotic, the Free fork of Nexuiz Classic * Remove a duplicate patch which is not actually applied * Improve the description of the two type-safety-related patches to explain why they're applied * Bump debhelper compat level to 9 -- Simon McVittie Fri, 20 Jan 2012 10:32:16 +0000 darkplaces (0~20110628+svn11231-2) unstable; urgency=low * Don't compile SSE code, or the software rasterizer (which requires SSE2), on non-x86 -- Simon McVittie Mon, 18 Jul 2011 23:08:10 +0100 darkplaces (0~20110628+svn11231-1) unstable; urgency=low * Initial release to Debian under this name (Closes: #319599) * Initial Debian patchset: - link against libjpeg, zlib, libvorbis, modplug, libode, libtheora, libogg, libpng, curl, freetype2 "properly" instead of loading them with dlopen, to have better dependency information; use their headers, instead of inlining a simplified version - disable loading d0_blind_id, d0_rijndael, OffscreenGecko libraries, rather than dlopening a potentially-incompatible version - fix some typos picked up by Lintian - import a patch from the nexuiz package (which is actually an old copy of DarkPlaces) to compile on kFreeBSD -- Simon McVittie Fri, 15 Jul 2011 17:36:05 +0100 debian/compat0000644000000000000000000000000212264625047010374 0ustar 9 debian/control0000644000000000000000000000561212264625047010605 0ustar Source: darkplaces Section: games Priority: optional Maintainer: Debian Games Team Uploaders: Simon McVittie , David Bate Build-Depends: debhelper (>= 9), libcurl4-gnutls-dev, libfreetype6-dev, libjpeg-dev, libmodplug-dev, libode-dev, libogg-dev, libpng-dev, libsdl1.2-dev, libtheora-dev, libvorbis-dev, lsb-release, pkg-config, zlib1g-dev Standards-Version: 3.9.5 Vcs-Git: git://anonscm.debian.org/pkg-games/darkplaces.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-games/darkplaces.git;a=summary Homepage: http://icculus.org/twilight/darkplaces/ Package: darkplaces Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Provides: quake-engine Description: Game engine for Quake and similar 3D first person shooter games DarkPlaces is a graphically-intensive engine for Quake and related games, with improved visual effects and lighting and many features for mods. It can be used to play various games based on the Quake engine, such as Xonotic, Nexuiz Classic, OpenQuartz, and Quake itself. . This is the client version of the engine, with a SDL GUI. . This engine isn't useful without game data: to get a playable game, install nexuiz or another suitable set of game data. It is typically used via a script that launches it with a particular data set, such as the ones found in the "quake" and "nexuiz" packages. Package: darkplaces-server Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Provides: quake-engine-server Description: Standalone server for Quake-based games DarkPlaces is a graphically-intensive engine for Quake and related games, with improved visual effects and lighting and many features for mods. It can be used to play various games based on the Quake engine, such as Xonotic, Nexuiz Classic, OpenQuartz, and Quake itself. . This is the dedicated server version, with no GUI. . This engine isn't useful without game data: to get a usable server, install nexuiz or another suitable set of game data. It is typically used via a script that launches it with a particular data set, such as the ones found in the "quake-server" and "nexuiz-server" packages. Package: darkplaces-dbg Architecture: any Section: debug Priority: extra Depends: darkplaces (= ${binary:Version}) | darkplaces-server (= ${binary:Version}), ${misc:Depends} Description: debug symbols for the DarkPlaces game engine DarkPlaces is an OpenGL-only engine for Quake and related games, with greatly enhanced effects and lighting and many features for mods. . This package contains debug symbols for the DarkPlaces engine, which can be used to analyze crashes in games that use that engine. debian/copyright0000644000000000000000000002166112264625047011137 0ustar Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=166 Upstream-name: DarkPlaces Source: http://icculus.org/twilight/darkplaces/download.html svn://svn.icculus.org/twilight/trunk/darkplaces Copyright: © 1994-2001 the XIPHOPHORUS company © 1996-2005 Id Software, Inc. © 1997-1998 Andrew Tridgell © 1999-2000 contributors of the QuakeForge project © 2000-2013 Forest Hale (LordHavoc) © 2000-2002 "mercury" © 2000-2001 "dabb" © 2000-2001 "taniwha" © 2000 "deek" © 2001-2009 Mathieu Olivier (Elric) © 2001-2005 Shawn Walker (EvilTypeGuy) © 2001-2005 T. Joseph Carter (knghtbrd) © 2001 "despair" © 2003-2008 Andreas Kirsch (Black) © 2003-2004 "warp" © 2003 "rain" © 2004 "coderjoe" © 2004-2010 "tomaz" © 2005-2010 "sajt" © 2006 Serge Ziryukin © 2007-2013 Rudolf Polzer (divverent) © 2007-2008 Frank Richter (res) © 2007-2008 "dresk" © 2008-2010 "motorsep" © 2009-2013 "eihrul" © 2009-2013 "VorteX" © 2009-2010 "blub" © 2009 "echon" © 2009-2012 "samual" © 2012 Timofeyev Pavel © 2012 "KrimZon" License: GPL-2+ Comment: Initially packaged by Simon McVittie, based on the quakespasm packaging by David Banks. . Several files do not have any explicit copyright/license given, but except where stated below, I see no reason to believe that they were not written for Darkplaces or are not included in the general GPL-2+ policy. . cap_ogg.c, crypto.c, fs.c, ft2_defs.h, image_png.c, jpeg.c, libcurl.c, snd_modplug.c, snd_ogg.c and world.c contain minimal declarations from the headers of the relevant libraries, all of which are under GPL-compatible licenses. . The following files were omitted from the orig tarball: . snd_3dras*: potentially derived from third-party "3DRAS" library with unknown license, and not used on Linux Files: debian/* Copyright: © 2011-2013 David Banks © 2011-2013 Simon McVittie © 2007 Cyril Brulebois © 2013-2014 David Bate License: GPL-2+ Files: matrixlib.c Copyright: © 2002-2010 Forest Hale (LordHavoc) © 2002-2003 Mathieu Olivier (Elric) © 2006 "sajt" © 2007-2010 Rudolf Polzer (divverent) © 2009-2010 "eihrul" © David Moore License: GPL-2+ and SGI-Free-B Files: bih.* curves.c lhnet.* polygon.* svbsp.* Copyright: no copyright claimed License: public-domain Various PD dedications, see the relevant files: . This code written in 2010 by Forest Hale (lordhavoc ghdigital com), and placed into public domain . this code written by Forest Hale, on 2004-10-17, and placed into public domain . Written by Forest Hale 2003-06-15 and placed into public domain. . Polygon clipping routines written by Forest Hale and placed into public domain. . Shadow Volume BSP code written by Forest "LordHavoc" Hale on 2003-11-06 and placed into public domain Files: keysym2ucs.c Copyright: no copyright claimed License: public-domain Author: Markus G. Kuhn , University of Cambridge, April 2001 . Special thanks to Richard Verhoeven for preparing an initial draft of the mapping table. . This software is in the public domain. Share and enjoy! Files: utf8lib.c Copyright: © 2009-2011 Rudolf Polzer (divverent) © 2009 "blub" © 1991-2001 Unicode, Inc. License: GPL-2+ and Unicode Comment: Some parts of the file have no explicit copyright statement or license, and are assumed to be under the same license as the rest of the project. . Some parts of the file are from the Unicode consortium under the license referred to below as "Unicode". Files: vid_agl_mackeys.h Copyright: © 1997-2001 Sam Lantinga License: LGPL-2+ # -------- Licenses used ----------------------------------------------------- License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. . See the GNU General Public License for more details. . On Debian systems, a copy of the GNU GPL v2 can be found in the file /usr/share/common-licenses/GPL-2. License: LGPL-2+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. . On Debian systems, a copy of the GNU LGPL v2 can be found in the file /usr/share/common-licenses/LGPL-2. License: SGI-Free-B Permission to use, copy, modify, and distribute this software for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both the copyright notice and this permission notice appear in supporting documentation, and that the name of Silicon Graphics, Inc. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. . THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. . US Government Users Restricted Rights Use, duplication, or disclosure by the Government is subject to restrictions set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or in similar or successor clauses in the FAR or the DOD or NASA FAR Supplement. Unpublished-- rights reserved under the copyright laws of the United States. Contractor/manufacturer is Silicon Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311. License: Unicode Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode data files and any associated documentation (the "Data Files") or Unicode software and any associated documentation (the "Software") to deal in the Data Files or Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom the Data Files or Software are furnished to do so, provided that (a) the above copyright notice(s) and this permission notice appear with all copies of the Data Files or Software, (b) both the above copyright notice(s) and this permission notice appear in associated documentation, and (c) there is clear notice in each modified Data File or in the Software as well as in the documentation associated with the Data File(s) or Software that the data or software has been modified. . THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. . Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. # vim:set et sw=2 sts=2: debian/darkplaces-server.60000644000000000000000000000245712264625047012712 0ustar .TH DARKPLACES 6 2011-06-06 .SH NAME darkplaces-server \- an engine for iD software's Quake and related games .SH SYNOPSIS .B darkplaces-server [ .BI - options ] [ .BI "+set " cvar " " value ] [ .BI + "console commands" ] .SH DESCRIPTION .B DarkPlaces is an engine for Quake and related games, with greatly enhanced effects and lighting and many features for mods. .B darkplaces-server is the dedicated-server version of DarkPlaces, with fewer dependencies. .SH OPTIONS This program follows the Quake convention, with long options starting with a single dash (`-'). Options include: .TP .B \-basedir Specify the location of the game data files. .TP .B \-game Start the game using the files from a mission pack or a mod. .TP .B \-hipnotic Start the game with the Hipnotic mission pack. .TP .B \-rogue Start the game with the Rogue mission pack. .TP .B \-nexuiz Expect the .I basedir to contain the standalone game Nexuiz, instead of Quake. .PP Various other mods and standalone games are supported, see .BR /usr/share/doc/darkplaces-server/README.Debian . .SH AUTHOR DarkPlaces was based on Quake by id Software, and is maintained by LordHavoc and numerous contributors. .PP This manual page was written by David Banks and Simon McVittie for the Debian project, and may be used by others. debian/darkplaces-server.dirs0000644000000000000000000000001612264625047013473 0ustar usr/lib/quake debian/darkplaces-server.lintian-overrides0000644000000000000000000000020012264625047016163 0ustar # intentional, to put the quake-engine-server alternative in darkplaces-server: package-contains-empty-directory usr/lib/quake/ debian/darkplaces-server.manpages0000644000000000000000000000003312264625047014324 0ustar debian/darkplaces-server.6 debian/darkplaces-server.postinst0000644000000000000000000000027212264625047014421 0ustar #!/bin/sh set -e update-alternatives --quiet --install /usr/lib/quake/quake-engine-server \ quake-engine-server /usr/games/darkplaces-server 0 #DEBHELPER# #vim:set sw=4 sts=4 et: debian/darkplaces-server.prerm0000644000000000000000000000046312264625047013665 0ustar #!/bin/sh set -e case "$1" in (upgrade|deconfigure|failed-upgrade) ;; (remove) update-alternatives --remove quake-engine-server /usr/games/darkplaces-server ;; (*) echo "Unknown prerm action: $1" >&2 exit 1 ;; esac #DEBHELPER# #vim:set sw=4 sts=4 et: debian/darkplaces.60000644000000000000000000000273712264625047011407 0ustar .TH DARKPLACES 6 2011-06-06 .SH NAME darkplaces \- an engine for iD software's Quake and related games .SH SYNOPSIS .B darkplaces [ .BI - options ] [ .BI "+set " cvar " " value ] [ .BI + "console commands" ] .SH DESCRIPTION .B DarkPlaces is an OpenGL-only engine for Quake and related games, with greatly enhanced effects and lighting and many features for mods. .SH OPTIONS This program follows the Quake convention, with long options starting with a single dash (`-'). Options include: .TP .B \-basedir Specify the location of the game data files. The default is the current directory, which is not usually useful. .TP .B \-dedicated Run as a dedicated server, without the GUI. Alternatively, you can run .B darkplaces-server if installed. .TP .B \-game Start the game using the files from a mission pack or a mod. .TP .B \-hipnotic Start the game with the Hipnotic mission pack. .TP .B \-rogue Start the game with the Rogue mission pack. .TP .B \-nexuiz Expect the .I basedir to contain the standalone game Nexuiz, instead of Quake. .PP Various other mods and standalone games are supported, see .BR /usr/share/doc/darkplaces/README.Debian . .SH SEE ALSO .BR darkplaces-server (6), .BR /usr/share/doc/darkplaces/README.Debian . .SH AUTHOR DarkPlaces was based on Quake by id Software, and is maintained by LordHavoc and numerous contributors. .PP This manual page was written by David Banks and Simon McVittie for the Debian project, and may be used by others. debian/darkplaces.dirs0000644000000000000000000000001612264625047012167 0ustar usr/lib/quake debian/darkplaces.lintian-overrides0000644000000000000000000000016212264625047014666 0ustar # intentional, to put the quake-engine alternative in darkplaces: package-contains-empty-directory usr/lib/quake/ debian/darkplaces.manpages0000644000000000000000000000002412264625047013020 0ustar debian/darkplaces.6 debian/darkplaces.postinst0000644000000000000000000000024512264625047013115 0ustar #!/bin/sh set -e update-alternatives --quiet --install /usr/lib/quake/quake-engine \ quake-engine /usr/games/darkplaces 0 #DEBHELPER# #vim:set sw=4 sts=4 et: debian/darkplaces.prerm0000644000000000000000000000044512264625047012361 0ustar #!/bin/sh set -e case "$1" in (upgrade|deconfigure|failed-upgrade) ;; (remove) update-alternatives --remove quake-engine /usr/games/darkplaces ;; (*) echo "Unknown prerm action: $1" >&2 exit 1 ;; esac #DEBHELPER# #vim:set sw=4 sts=4 et: debian/gbp.conf0000644000000000000000000000014512264625047010615 0ustar [git-buildpackage] compression = gzip [git-import-orig] pristine-tar = True filter = ["snd_3dras*"] debian/patches/0000755000000000000000000000000012264625047010625 5ustar debian/patches/0001-Split-Unix-CFLAGS-libs-to-one-per-line.patch0000644000000000000000000000472412264625047021043 0ustar From: Simon McVittie Date: Tue, 5 Jul 2011 22:05:38 +0100 Subject: Split (Unix) CFLAGS, libs to one per line This just makes it easier to change them in later patches. Origin: vendor, Debian --- makefile.inc | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/makefile.inc b/makefile.inc index fe1eabe..bb721e0 100644 --- a/makefile.inc +++ b/makefile.inc @@ -187,7 +187,15 @@ OBJ_SDL= builddate.c sys_sdl.o vid_sdl.o thread_sdl.o $(OBJ_SND_COMMON) snd_sdl. # Compilation -CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBJPEG) $(CFLAGS_D3D) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES +CFLAGS_COMMON=\ + $(CFLAGS_MAKEDEP) \ + $(CFLAGS_PRELOAD) \ + $(CFLAGS_FS) \ + $(CFLAGS_WARNINGS) \ + $(CFLAGS_LIBJPEG) \ + $(CFLAGS_D3D) \ + -D_FILE_OFFSET_BITS=64 \ + -D__KERNEL_STRICT_NAMES CFLAGS_DEBUG=-ggdb CFLAGS_PROFILE=-g -pg -ggdb -fprofile-arcs CFLAGS_RELEASE= @@ -218,14 +226,54 @@ LDFLAGS_RELEASE=$(OPTIM_RELEASE) -DSVNREVISION=`{ test -d .svn && svnversion; } OBJ_GLX= builddate.c sys_linux.o vid_glx.o thread_pthread.o keysym2ucs.o $(OBJ_SOUND) $(OBJ_CD) $(OBJ_COMMON) -LDFLAGS_UNIXCOMMON=-lm $(LIB_ODE) $(LIB_JPEG) $(LIB_CRYPTO) $(LIB_GMP) $(LIB_CRYPTO_RIJNDAEL) -LDFLAGS_UNIXCL=-L$(UNIX_X11LIBPATH) -lX11 -lXpm -lXext -lXxf86vm -pthread $(LIB_SOUND) -LDFLAGS_UNIXCL_PRELOAD=-lz -ljpeg -lpng -logg -ltheora -lvorbis -lvorbisenc -lvorbisfile -lcurl -lmodplug -LDFLAGS_UNIXSV_PRELOAD=-lz -ljpeg -lpng -lcurl -LDFLAGS_UNIXSDL_PRELOAD=-lz -ljpeg -lpng -logg -ltheora -lvorbis -lvorbisenc -lvorbisfile -lcurl -lmodplug +LDFLAGS_UNIXCOMMON=\ + -lm \ + $(LIB_ODE) \ + $(LIB_JPEG) \ + $(LIB_CRYPTO) \ + $(LIB_GMP) \ + $(LIB_CRYPTO_RIJNDAEL) +LDFLAGS_UNIXCL=\ + -L$(UNIX_X11LIBPATH) \ + -lX11 \ + -lXpm \ + -lXext \ + -lXxf86vm \ + -pthread \ + $(LIB_SOUND) +LDFLAGS_UNIXCL_PRELOAD=\ + -lz \ + -ljpeg \ + -lpng \ + -logg \ + -ltheora \ + -lvorbis \ + -lvorbisenc \ + -lvorbisfile \ + -lcurl \ + -lmodplug +LDFLAGS_UNIXSV_PRELOAD=\ + -lz \ + -ljpeg \ + -lpng \ + -lcurl +LDFLAGS_UNIXSDL_PRELOAD=\ + -lz \ + -ljpeg \ + -lpng \ + -logg \ + -ltheora \ + -lvorbis \ + -lvorbisenc \ + -lvorbisfile \ + -lcurl \ + -lmodplug CFLAGS_UNIX_PRELOAD=-DPREFER_PRELOAD -LDFLAGS_UNIXSDL=$(SDLCONFIG_LIBS) $(LIB_SND_MODPLUG) +LDFLAGS_UNIXSDL=\ + $(SDLCONFIG_LIBS) \ + $(LIB_SND_MODPLUG) + EXE_UNIXCL=darkplaces-glx EXE_UNIXSV=darkplaces-dedicated EXE_UNIXSDL=darkplaces-sdl debian/patches/0002-Add-support-for-make-LINK_TO_LIBJPEG-1.patch0000644000000000000000000000122512264625047020555 0ustar From: Simon McVittie Date: Tue, 5 Jul 2011 22:08:51 +0100 Subject: Add support for "make LINK_TO_LIBJPEG=1" In Debian we want library dependencies to work in the conventional way, since many tools expect that and use it to generate package dependencies. Origin: vendor, Debian --- makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/makefile b/makefile index 35de328..2b22804 100644 --- a/makefile +++ b/makefile @@ -302,6 +302,11 @@ else CFLAGS_FS= endif +ifdef LINK_TO_LIBJPEG +CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG +LIB_JPEG=-ljpeg +endif + CFLAGS_PRELOAD= ifneq ($(DP_MAKE_TARGET), mingw) ifdef DP_PRELOAD_DEPENDENCIES debian/patches/0003-Add-support-for-make-LINK_TO_ZLIB-1.patch0000644000000000000000000000220312264625047020237 0ustar From: Simon McVittie Date: Tue, 5 Jul 2011 22:09:07 +0100 Subject: Add support for "make LINK_TO_ZLIB=1" In Debian we want library dependencies to work in the conventional way, since many tools expect that and use it to generate package dependencies. Origin: vendor, Debian --- makefile | 5 +++++ makefile.inc | 2 ++ 2 files changed, 7 insertions(+) diff --git a/makefile b/makefile index 2b22804..1510b72 100644 --- a/makefile +++ b/makefile @@ -307,6 +307,11 @@ CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG LIB_JPEG=-ljpeg endif +ifdef LINK_TO_ZLIB +CFLAGS_ZLIB=-DLINK_TO_ZLIB +LIB_ZLIB=-lz +endif + CFLAGS_PRELOAD= ifneq ($(DP_MAKE_TARGET), mingw) ifdef DP_PRELOAD_DEPENDENCIES diff --git a/makefile.inc b/makefile.inc index bb721e0..bd018bb 100644 --- a/makefile.inc +++ b/makefile.inc @@ -193,6 +193,7 @@ CFLAGS_COMMON=\ $(CFLAGS_FS) \ $(CFLAGS_WARNINGS) \ $(CFLAGS_LIBJPEG) \ + $(CFLAGS_ZLIB) \ $(CFLAGS_D3D) \ -D_FILE_OFFSET_BITS=64 \ -D__KERNEL_STRICT_NAMES @@ -230,6 +231,7 @@ LDFLAGS_UNIXCOMMON=\ -lm \ $(LIB_ODE) \ $(LIB_JPEG) \ + $(LIB_ZLIB) \ $(LIB_CRYPTO) \ $(LIB_GMP) \ $(LIB_CRYPTO_RIJNDAEL) debian/patches/0004-Add-support-for-LINK_TO_LIBVORBIS-using-pkg-config.patch0000644000000000000000000000260312264625047023133 0ustar From: Simon McVittie Date: Tue, 5 Jul 2011 22:16:28 +0100 Subject: Add support for LINK_TO_LIBVORBIS (using pkg-config) In Debian we want library dependencies to work in the conventional way, since many tools expect that and use it to generate package dependencies. Origin: vendor, Debian --- makefile | 5 +++++ makefile.inc | 3 +++ 2 files changed, 8 insertions(+) diff --git a/makefile b/makefile index 1510b72..9afb12e 100644 --- a/makefile +++ b/makefile @@ -307,6 +307,11 @@ CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG LIB_JPEG=-ljpeg endif +ifdef LINK_TO_LIBVORBIS +CFLAGS_LIBVORBIS=-DLINK_TO_LIBVORBIS `pkg-config --cflags vorbisfile` +LIB_LIBVORBIS=`pkg-config --libs vorbisfile` +endif + ifdef LINK_TO_ZLIB CFLAGS_ZLIB=-DLINK_TO_ZLIB LIB_ZLIB=-lz diff --git a/makefile.inc b/makefile.inc index bd018bb..78448f7 100644 --- a/makefile.inc +++ b/makefile.inc @@ -193,6 +193,7 @@ CFLAGS_COMMON=\ $(CFLAGS_FS) \ $(CFLAGS_WARNINGS) \ $(CFLAGS_LIBJPEG) \ + $(CFLAGS_LIBVORBIS) \ $(CFLAGS_ZLIB) \ $(CFLAGS_D3D) \ -D_FILE_OFFSET_BITS=64 \ @@ -236,6 +237,7 @@ LDFLAGS_UNIXCOMMON=\ $(LIB_GMP) \ $(LIB_CRYPTO_RIJNDAEL) LDFLAGS_UNIXCL=\ + $(LIB_LIBVORBIS) \ -L$(UNIX_X11LIBPATH) \ -lX11 \ -lXpm \ @@ -274,6 +276,7 @@ CFLAGS_UNIX_PRELOAD=-DPREFER_PRELOAD LDFLAGS_UNIXSDL=\ $(SDLCONFIG_LIBS) \ + $(LIB_LIBVORBIS) \ $(LIB_SND_MODPLUG) EXE_UNIXCL=darkplaces-glx debian/patches/0005-Add-LINK_TO_MODPLUG-option.patch0000644000000000000000000000534512264625047016561 0ustar From: Simon McVittie Date: Wed, 6 Jul 2011 09:50:54 +0100 Subject: Add LINK_TO_MODPLUG option In Debian we want library dependencies to work in the conventional way, since many tools expect that and use it to generate package dependencies. Origin: vendor, Debian --- makefile | 5 +++++ makefile.inc | 4 ++-- snd_modplug.c | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/makefile b/makefile index 9afb12e..e24aa48 100644 --- a/makefile +++ b/makefile @@ -312,6 +312,11 @@ CFLAGS_LIBVORBIS=-DLINK_TO_LIBVORBIS `pkg-config --cflags vorbisfile` LIB_LIBVORBIS=`pkg-config --libs vorbisfile` endif +ifdef LINK_TO_MODPLUG +CFLAGS_SND_MODPLUG=-DLINK_TO_MODPLUG `pkg-config --cflags libmodplug` +LIB_SND_MODPLUG=`pkg-config --libs libmodplug` +endif + ifdef LINK_TO_ZLIB CFLAGS_ZLIB=-DLINK_TO_ZLIB LIB_ZLIB=-lz diff --git a/makefile.inc b/makefile.inc index 78448f7..35ae3c4 100644 --- a/makefile.inc +++ b/makefile.inc @@ -55,8 +55,8 @@ LIB_CRYPTO_RIJNDAEL=`[ -n "$(DP_CRYPTO_RIJNDAEL_STATIC_LIBDIR)" ] && echo \ $(DP CFLAGS_CRYPTO_RIJNDAEL=`[ -n "$(DP_CRYPTO_RIJNDAEL_STATIC_LIBDIR)" ] && echo \ -I$(DP_CRYPTO_RIJNDAEL_STATIC_LIBDIR)/../include\ -DCRYPTO_RIJNDAEL_STATIC` # Additional stuff for libmodplug -LIB_SND_MODPLUG=`[ -n "$(DP_MODPLUG_STATIC_LIBDIR)" ] && echo \ $(DP_MODPLUG_STATIC_LIBDIR)/libmodplug.a\ -lstdc++` -CFLAGS_SND_MODPLUG=`[ -n "$(DP_MODPLUG_STATIC_LIBDIR)" ] && echo \ -I$(DP_MODPLUG_STATIC_LIBDIR)/../include\ -DSND_MODPLUG_STATIC` +LIB_SND_MODPLUG?=`[ -n "$(DP_MODPLUG_STATIC_LIBDIR)" ] && echo \ $(DP_MODPLUG_STATIC_LIBDIR)/libmodplug.a\ -lstdc++` +CFLAGS_SND_MODPLUG?=`[ -n "$(DP_MODPLUG_STATIC_LIBDIR)" ] && echo \ -I$(DP_MODPLUG_STATIC_LIBDIR)/../include\ -DSND_MODPLUG_STATIC` # No sound OBJ_SND_NULL=snd_null.o diff --git a/snd_modplug.c b/snd_modplug.c index 6dc3fce..ca389e3 100644 --- a/snd_modplug.c +++ b/snd_modplug.c @@ -26,7 +26,7 @@ #include "snd_main.h" #include "snd_modplug.h" -#ifdef SND_MODPLUG_STATIC +#if defined(SND_MODPLUG_STATIC) || defined(LINK_TO_MODPLUG) #include qboolean ModPlug_OpenLibrary (void) @@ -247,7 +247,7 @@ static void ModPlug_GetSamplesFloat(channel_t *ch, sfx_t *sfx, int firstsamplefr return; } -#ifndef SND_MODPLUG_STATIC +#if !(defined(SND_MODPLUG_STATIC) || defined(LINK_TO_MODPLUG)) if(qModPlug_SetMasterVolume) #endif qModPlug_SetMasterVolume(per_ch->mf, 512); // max volume, DP scales down! @@ -407,7 +407,7 @@ qboolean ModPlug_LoadModPlugFile (const char *filename, sfx_t *sfx) return false; } -#ifndef SND_MODPLUG_STATIC +#if !(defined(SND_MODPLUG_STATIC) || defined(LINK_TO_MODPLUG)) if(qModPlug_SetMasterVolume) #endif qModPlug_SetMasterVolume(mf, 512); // max volume, DP scales down! debian/patches/0006-add-LINK_TO_ODE-to-link-against-system-libode.patch0000644000000000000000000000712012264625047022362 0ustar From: Simon McVittie Date: Wed, 6 Jul 2011 09:33:19 +0100 Subject: add LINK_TO_ODE to link against system libode In Debian we want library dependencies to work in the conventional way, since many tools expect that and use it to generate package dependencies. Origin: vendor, Debian --- makefile | 5 +++++ makefile.inc | 4 ++-- world.c | 15 ++++++++++++++- world.h | 9 --------- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/makefile b/makefile index e24aa48..e7c7cf5 100644 --- a/makefile +++ b/makefile @@ -317,6 +317,11 @@ CFLAGS_SND_MODPLUG=-DLINK_TO_MODPLUG `pkg-config --cflags libmodplug` LIB_SND_MODPLUG=`pkg-config --libs libmodplug` endif +ifdef LINK_TO_ODE +CFLAGS_ODE=-DLINK_TO_ODE `pkg-config --cflags ode` +LIB_ODE=`pkg-config --libs ode` +endif + ifdef LINK_TO_ZLIB CFLAGS_ZLIB=-DLINK_TO_ZLIB LIB_ZLIB=-lz diff --git a/makefile.inc b/makefile.inc index 35ae3c4..84ff115 100644 --- a/makefile.inc +++ b/makefile.inc @@ -26,8 +26,8 @@ CPUOPTIMIZATIONS?=-fno-math-errno -ffinite-math-only -fno-rounding-math -fno-sig # NOTE: *never* *ever* use the -ffast-math or -funsafe-math-optimizations flag # Additional stuff for libode -LIB_ODE=`[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && "$(DP_ODE_STATIC_LIBDIR)/../bin/ode-config" --libs` `[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && echo -lstdc++` -CFLAGS_ODE=`[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && "$(DP_ODE_STATIC_LIBDIR)/../bin/ode-config" --cflags || { [ -n "$(DP_ODE_DYNAMIC)" ] && echo \ -DODE_DYNAMIC; }` `[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && echo -DODE_STATIC` +LIB_ODE?=`[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && "$(DP_ODE_STATIC_LIBDIR)/../bin/ode-config" --libs` `[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && echo -lstdc++` +CFLAGS_ODE?=`[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && "$(DP_ODE_STATIC_LIBDIR)/../bin/ode-config" --cflags || { [ -n "$(DP_ODE_DYNAMIC)" ] && echo \ -DODE_DYNAMIC; }` `[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && echo -DODE_STATIC` SDL_CONFIG?=sdl-config diff --git a/world.c b/world.c index abacf51..1f96eae 100644 --- a/world.c +++ b/world.c @@ -330,6 +330,19 @@ void World_LinkEdict(world_t *world, prvm_edict_t *ent, const vec3_t mins, const // physics engine support //============================================================================ +// backwards compat +#ifdef ODE_STATIC +# define LINK_TO_ODE 1 +#endif + +#ifndef LINK_TO_ODE +# define ODE_DYNAMIC 1 +#endif + +#if defined(LINK_TO_ODE) || defined(ODE_DYNAMIC) +#define USEODE 1 +#endif + #ifdef USEODE cvar_t physics_ode_quadtree_depth = {0, "physics_ode_quadtree_depth","5", "desired subdivision level of quadtree culling space"}; cvar_t physics_ode_allowconvex = {0, "physics_ode_allowconvex", "0", "allow usage of Convex Hull primitive type on trimeshes that have custom 'collisionconvex' mesh. If disabled, trimesh primitive type are used."}; @@ -365,7 +378,7 @@ cvar_t physics_ode = {0, "physics_ode", "0", "run ODE physics (VERY experimental // LordHavoc: this large chunk of definitions comes from the ODE library // include files. -#ifdef ODE_STATIC +#ifdef LINK_TO_ODE #include "ode/ode.h" #else #ifdef WINAPI diff --git a/world.h b/world.h index 18e9b00..e43ebd1 100644 --- a/world.h +++ b/world.h @@ -119,15 +119,6 @@ int World_EntitiesInBox(world_t *world, const vec3_t mins, const vec3_t maxs, in void World_Start(world_t *world); void World_End(world_t *world); -// physics macros -#ifndef ODE_STATIC -# define ODE_DYNAMIC 1 -#endif - -#if defined(ODE_STATIC) || defined(ODE_DYNAMIC) -# define USEODE 1 -#endif - // update physics // this is called by SV_Physics void World_Physics_Frame(world_t *world, double frametime, double gravity); debian/patches/0007-add-LINK_TO_THEORA.patch0000644000000000000000000001125012264625047015160 0ustar From: Simon McVittie Date: Fri, 20 Jan 2012 09:14:26 +0000 Subject: add LINK_TO_THEORA In Debian we want library dependencies to work in the conventional way, since many tools expect that and use it to generate package dependencies. Origin: vendor, Debian --- cap_ogg.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ makefile | 5 +++++ makefile.inc | 2 ++ 3 files changed, 65 insertions(+) diff --git a/cap_ogg.c b/cap_ogg.c index a4913ae..e5b1325 100644 --- a/cap_ogg.c +++ b/cap_ogg.c @@ -19,6 +19,55 @@ static cvar_t cl_capturevideo_ogg_theora_noise_sensitivity = {CVAR_SAVE, "cl_cap static cvar_t cl_capturevideo_ogg_theora_sharpness = {CVAR_SAVE, "cl_capturevideo_ogg_theora_sharpness", "0", "sharpness (0 to 2); lower is sharper"}; static cvar_t cl_capturevideo_ogg_vorbis_quality = {CVAR_SAVE, "cl_capturevideo_ogg_vorbis_quality", "3", "audio quality (-1 to 10); higher is better"}; +#ifdef LINK_TO_THEORA + +#include +#include +#include +#include + +#define qogg_stream_packetin ogg_stream_packetin +#define qogg_stream_pageout ogg_stream_pageout +#define qogg_stream_flush ogg_stream_flush +#define qogg_stream_init ogg_stream_init +#define qogg_stream_clear ogg_stream_clear +#define qogg_page_granulepos ogg_page_granulepos + +#define qvorbis_info_init vorbis_info_init +#define qvorbis_info_clear vorbis_info_clear +#define qvorbis_comment_init vorbis_comment_init +#define qvorbis_comment_clear vorbis_comment_clear +#define qvorbis_block_init vorbis_block_init +#define qvorbis_block_clear vorbis_block_clear +#define qvorbis_dsp_clear vorbis_dsp_clear +#define qvorbis_granule_time vorbis_granule_time +#define qvorbis_analysis_init vorbis_analysis_init +#define qvorbis_commentheader_out vorbis_commentheader_out +#define qvorbis_analysis_headerout vorbis_analysis_headerout +#define qvorbis_analysis_buffer vorbis_analysis_buffer +#define qvorbis_analysis_wrote vorbis_analysis_wrote +#define qvorbis_analysis_blockout vorbis_analysis_blockout +#define qvorbis_analysis vorbis_analysis +#define qvorbis_bitrate_addblock vorbis_bitrate_addblock +#define qvorbis_bitrate_flushpacket vorbis_bitrate_flushpacket +#define qvorbis_encode_init_vbr vorbis_encode_init_vbr + +#define qtheora_encode_init theora_encode_init +#define qtheora_encode_YUVin theora_encode_YUVin +#define qtheora_encode_packetout theora_encode_packetout +#define qtheora_encode_header theora_encode_header +#define qtheora_encode_comment theora_encode_comment +#define qtheora_encode_tables theora_encode_tables +#define qtheora_info_init theora_info_init +#define qtheora_info_clear theora_info_clear +#define qtheora_clear theora_clear +#define qtheora_comment_init theora_comment_init +#define qtheora_comment_clear theora_comment_clear +#define qtheora_granule_time theora_granule_time +#define qtheora_control theora_control + +#else + // ogg.h stuff #ifdef _MSC_VER typedef __int16 ogg_int16_t; @@ -591,10 +640,13 @@ static qboolean SCR_CaptureVideo_Ogg_OpenLibrary(void) && Sys_LoadLibrary (dllnames_ve, &ve_dll, vorbisencfuncs); } +#endif void SCR_CaptureVideo_Ogg_Init(void) { +#ifndef LINK_TO_THEORA SCR_CaptureVideo_Ogg_OpenLibrary(); +#endif Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_vp3compat); Cvar_RegisterVariable(&cl_capturevideo_ogg_theora_quality); @@ -609,15 +661,21 @@ void SCR_CaptureVideo_Ogg_Init(void) qboolean SCR_CaptureVideo_Ogg_Available(void) { +#ifdef LINK_TO_THEORA + return TRUE; +#else return og_dll && th_dll && vo_dll && ve_dll; +#endif } void SCR_CaptureVideo_Ogg_CloseDLL(void) { +#ifndef LINK_TO_THEORA Sys_UnloadLibrary (&ve_dll); Sys_UnloadLibrary (&vo_dll); Sys_UnloadLibrary (&th_dll); Sys_UnloadLibrary (&og_dll); +#endif } // this struct should not be needed diff --git a/makefile b/makefile index e7c7cf5..6deb727 100644 --- a/makefile +++ b/makefile @@ -322,6 +322,11 @@ CFLAGS_ODE=-DLINK_TO_ODE `pkg-config --cflags ode` LIB_ODE=`pkg-config --libs ode` endif +ifdef LINK_TO_THEORA +CFLAGS_THEORA=-DLINK_TO_THEORA `pkg-config --cflags theora vorbisfile vorbisenc vorbis ogg` +LIB_THEORA=`pkg-config --libs theora vorbisfile vorbisenc vorbis ogg` +endif + ifdef LINK_TO_ZLIB CFLAGS_ZLIB=-DLINK_TO_ZLIB LIB_ZLIB=-lz diff --git a/makefile.inc b/makefile.inc index 84ff115..0f881c4 100644 --- a/makefile.inc +++ b/makefile.inc @@ -194,6 +194,7 @@ CFLAGS_COMMON=\ $(CFLAGS_WARNINGS) \ $(CFLAGS_LIBJPEG) \ $(CFLAGS_LIBVORBIS) \ + $(CFLAGS_THEORA) \ $(CFLAGS_ZLIB) \ $(CFLAGS_D3D) \ -D_FILE_OFFSET_BITS=64 \ @@ -232,6 +233,7 @@ LDFLAGS_UNIXCOMMON=\ -lm \ $(LIB_ODE) \ $(LIB_JPEG) \ + $(LIB_THEORA) \ $(LIB_ZLIB) \ $(LIB_CRYPTO) \ $(LIB_GMP) \ debian/patches/0008-Add-LINK_TO_PNG.patch0000644000000000000000000001215412264625047014567 0ustar From: Simon McVittie Date: Fri, 20 Jan 2012 09:15:48 +0000 Subject: Add LINK_TO_PNG In Debian we want library dependencies to work in the conventional way, since many tools expect that and use it to generate package dependencies. Origin: vendor, Debian --- image_png.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++---------- makefile | 5 +++++ makefile.inc | 2 ++ 3 files changed, 62 insertions(+), 10 deletions(-) diff --git a/image_png.c b/image_png.c index 04419bd..289b8d3 100644 --- a/image_png.c +++ b/image_png.c @@ -26,10 +26,53 @@ // //LordHavoc: rewrote most of this. +#ifdef LINK_TO_PNG +// This has to come before anything else that includes setjmp.h, because +// libpng specifically wants non-BSD setjmp semantics. +# include +#endif + #include "quakedef.h" #include "image.h" #include "image_png.h" +#ifdef LINK_TO_PNG + +#define qpng_set_sig_bytes png_set_sig_bytes +#define qpng_sig_cmp png_sig_cmp +#define qpng_create_read_struct png_create_read_struct +#define qpng_create_write_struct png_create_write_struct +#define qpng_create_info_struct png_create_info_struct +#define qpng_read_info png_read_info +#define qpng_set_compression_level png_set_compression_level +#define qpng_set_filter png_set_filter +#define qpng_set_expand png_set_expand +#define qpng_set_palette_to_rgb png_set_palette_to_rgb +#define qpng_set_tRNS_to_alpha png_set_tRNS_to_alpha +#define qpng_set_gray_to_rgb png_set_gray_to_rgb +#define qpng_set_filler png_set_filler +#define qpng_set_IHDR png_set_IHDR +#define qpng_set_packing png_set_packing +#define qpng_set_bgr png_set_bgr +#define qpng_set_interlace_handling png_set_interlace_handling +#define qpng_read_update_info png_read_update_info +#define qpng_read_image png_read_image +#define qpng_read_end png_read_end +#define qpng_destroy_read_struct png_destroy_read_struct +#define qpng_destroy_write_struct png_destroy_write_struct +#define qpng_set_read_fn png_set_read_fn +#define qpng_set_write_fn png_set_write_fn +#define qpng_get_valid png_get_valid +#define qpng_get_rowbytes png_get_rowbytes +#define qpng_get_channels png_get_channels +#define qpng_get_bit_depth png_get_bit_depth +#define qpng_get_IHDR png_get_IHDR +#define qpng_access_version_number png_access_version_number +#define qpng_write_info png_write_info +#define qpng_write_row png_write_row +#define qpng_write_end png_write_end + +#else static void (*qpng_set_sig_bytes) (void*, int); static int (*qpng_sig_cmp) (const unsigned char*, size_t, size_t); @@ -124,6 +167,7 @@ static dllfunction_t png14funcs[] = dllhandle_t png_dll = NULL; dllhandle_t png14_dll = NULL; +#endif /* ================================================================= @@ -142,6 +186,9 @@ Try to load the PNG DLL */ qboolean PNG_OpenLibrary (void) { +#ifdef LINK_TO_PNG + return TRUE; +#else const char* dllnames [] = { #if WIN32 @@ -172,15 +219,8 @@ qboolean PNG_OpenLibrary (void) return true; // Load the DLL - if(!Sys_LoadLibrary (dllnames, &png_dll, pngfuncs)) - return false; - if(qpng_access_version_number() / 100 >= 104) - if(!Sys_LoadLibrary (dllnames, &png14_dll, png14funcs)) - { - Sys_UnloadLibrary (&png_dll); - return false; - } - return true; + return Sys_LoadLibrary (dllnames, &png_dll, pngfuncs); +#endif } @@ -193,8 +233,9 @@ Unload the PNG DLL */ void PNG_CloseLibrary (void) { - Sys_UnloadLibrary (&png14_dll); +#ifndef LINK_TO_PNG Sys_UnloadLibrary (&png_dll); +#endif } /* @@ -301,9 +342,11 @@ unsigned char *PNG_LoadImage_BGRA (const unsigned char *raw, int filesize, int * // FIXME: register an error handler so that abort() won't be called on error +#ifndef LINK_TO_PNG // No DLL = no PNGs if (!png_dll) return NULL; +#endif if(qpng_sig_cmp(raw, 0, filesize)) return NULL; @@ -482,12 +525,14 @@ qboolean PNG_SaveImage_preflipped (const char *filename, int width, int height, unsigned char ioBuffer[8192]; int passes, i, j; +#ifndef LINK_TO_PNG // No DLL = no JPEGs if (!png_dll) { Con_Print("You need the libpng library to save PNG images\n"); return false; } +#endif png = (void *)qpng_create_write_struct( (qpng_access_version_number() / 100 == 102) ? PNG_LIBPNG_VER_STRING_12 : diff --git a/makefile b/makefile index 6deb727..0606d88 100644 --- a/makefile +++ b/makefile @@ -322,6 +322,11 @@ CFLAGS_ODE=-DLINK_TO_ODE `pkg-config --cflags ode` LIB_ODE=`pkg-config --libs ode` endif +ifdef LINK_TO_PNG +CFLAGS_PNG=-DLINK_TO_PNG `pkg-config --cflags libpng` +LIB_PNG=`pkg-config --libs libpng` +endif + ifdef LINK_TO_THEORA CFLAGS_THEORA=-DLINK_TO_THEORA `pkg-config --cflags theora vorbisfile vorbisenc vorbis ogg` LIB_THEORA=`pkg-config --libs theora vorbisfile vorbisenc vorbis ogg` diff --git a/makefile.inc b/makefile.inc index 0f881c4..b9ec496 100644 --- a/makefile.inc +++ b/makefile.inc @@ -194,6 +194,7 @@ CFLAGS_COMMON=\ $(CFLAGS_WARNINGS) \ $(CFLAGS_LIBJPEG) \ $(CFLAGS_LIBVORBIS) \ + $(CFLAGS_PNG) \ $(CFLAGS_THEORA) \ $(CFLAGS_ZLIB) \ $(CFLAGS_D3D) \ @@ -233,6 +234,7 @@ LDFLAGS_UNIXCOMMON=\ -lm \ $(LIB_ODE) \ $(LIB_JPEG) \ + $(LIB_PNG) \ $(LIB_THEORA) \ $(LIB_ZLIB) \ $(LIB_CRYPTO) \ debian/patches/0009-add-LINK_TO_CURL.patch0000644000000000000000000001775712264625047014767 0ustar From: Simon McVittie Date: Fri, 20 Jan 2012 09:22:20 +0000 Subject: add LINK_TO_CURL In Debian we want library dependencies to work in the conventional way, since many tools expect that and use it to generate package dependencies. Origin: vendor, Debian --- libcurl.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ makefile | 5 ++++ makefile.inc | 2 ++ 3 files changed, 81 insertions(+) diff --git a/libcurl.c b/libcurl.c index 3baa91b..c2df4d5 100644 --- a/libcurl.c +++ b/libcurl.c @@ -12,6 +12,31 @@ static cvar_t cl_curl_enabled = {CVAR_SAVE, "cl_curl_enabled","1", "whether clie static cvar_t cl_curl_useragent = {0, "cl_curl_useragent","1", "send the User-Agent string (note: turning this off may break stuff)"}; static cvar_t cl_curl_useragent_append = {0, "cl_curl_useragent_append","", "a string to append to the User-Agent string (useful for name and version number of your mod)"}; +#ifdef LINK_TO_CURL + +#include + +#define qcurl_global_init curl_global_init +#define qcurl_global_cleanup curl_global_cleanup +#define qcurl_easy_init curl_easy_init +#define qcurl_easy_cleanup curl_easy_cleanup +#define qcurl_easy_setopt curl_easy_setopt +#define qcurl_easy_strerror curl_easy_strerror +#define qcurl_easy_getinfo curl_easy_getinfo +#define qcurl_multi_init curl_multi_init +#define qcurl_multi_perform curl_multi_perform +#define qcurl_multi_add_handle curl_multi_add_handle +#define qcurl_multi_remove_handle curl_multi_remove_handle +#define qcurl_multi_info_read curl_multi_info_read +#define qcurl_multi_cleanup curl_multi_cleanup +#define qcurl_multi_strerror curl_multi_strerror +#define qcurl_slist_append curl_slist_append +#define qcurl_slist_free_all curl_slist_free_all + +typedef struct curl_slist curl_slist; + +#else + /* ================================================================= @@ -185,6 +210,8 @@ static dllfunction_t curlfuncs[] = static dllhandle_t curl_dll = NULL; // will be checked at many places to find out if qcurl calls are allowed +#endif + void *curl_mutex = NULL; typedef struct downloadinfo_s @@ -238,8 +265,11 @@ Setting the command to NULL clears it. */ static void Curl_CommandWhenDone(const char *cmd) { +#ifndef LINK_TO_CURL if(!curl_dll) return; +#endif + if(cmd) strlcpy(command_when_done, cmd, sizeof(command_when_done)); else @@ -254,8 +284,11 @@ Problem: what counts as an error? static void Curl_CommandWhenError(const char *cmd) { +#ifndef LINK_TO_CURL if(!curl_dll) return; +#endif + if(cmd) strlcpy(command_when_error, cmd, sizeof(command_when_error)); else @@ -315,8 +348,11 @@ All downloads finished, at least one success since connect, no single failure */ static void Curl_CheckCommandWhenDone(void) { +#ifndef LINK_TO_CURL if(!curl_dll) return; +#endif + if(numdownloads_added && ((numdownloads_success + numdownloads_fail) == numdownloads_added)) { if(numdownloads_fail == 0) @@ -337,6 +373,7 @@ static void Curl_CheckCommandWhenDone(void) } } +#ifndef LINK_TO_CURL /* ==================== CURL_CloseLibrary @@ -383,6 +420,7 @@ static void CURL_CloseLibrary (void) { Sys_UnloadLibrary (&curl_dll); } +#endif static CURLM *curlm = NULL; @@ -472,8 +510,12 @@ static qboolean Curl_Begin(const char *URL, const char *extraheaders, double max static void Curl_EndDownload(downloadinfo *di, CurlStatus status, CURLcode error) { qboolean ok = false; + +#ifndef LINK_TO_CURL if(!curl_dll) return; +#endif + switch(status) { case CURL_DOWNLOAD_SUCCESS: @@ -603,8 +645,12 @@ static void CheckPendingDownloads(void) const char *h; char urlbuf[1024]; char vabuf[1024]; + +#ifndef LINK_TO_CURL if(!curl_dll) return; +#endif + if(numdownloads < cl_curl_maxdownloads.integer) { downloadinfo *di; @@ -725,9 +771,12 @@ On Win32, this must be called AFTER WSAStartup has been done! */ void Curl_Init(void) { +#ifndef LINK_TO_CURL CURL_OpenLibrary(); if(!curl_dll) return; +#endif + if (Thread_HasThreads()) curl_mutex = Thread_CreateMutex(); qcurl_global_init(CURL_GLOBAL_NOTHING); curlm = qcurl_multi_init(); @@ -743,13 +792,17 @@ Surprise... closes all the stuff. Please do this BEFORE shutting down LHNET. void Curl_ClearRequirements(void); void Curl_Shutdown(void) { +#ifndef LINK_TO_CURL if(!curl_dll) return; +#endif Curl_ClearRequirements(); Curl_CancelAll(); if (curl_mutex) Thread_DestroyMutex(curl_mutex); +#ifndef LINK_TO_CURL CURL_CloseLibrary(); curl_dll = NULL; +#endif } /* @@ -762,8 +815,10 @@ Finds the internal information block for a download given by file name. static downloadinfo *Curl_Find(const char *filename) { downloadinfo *di; +#ifndef LINK_TO_CURL if(!curl_dll) return NULL; +#endif for(di = downloads; di; di = di->next) if(!strcasecmp(di->filename, filename)) return di; @@ -780,11 +835,13 @@ if given) in the "dlcache/" folder. */ static qboolean Curl_Begin(const char *URL, const char *extraheaders, double maxspeed, const char *name, qboolean ispak, qboolean forthismap, const char *post_content_type, const unsigned char *postbuf, size_t postbufsize, unsigned char *buf, size_t bufsize, curl_callback_t callback, void *cbdata) { +#ifndef LINK_TO_CURL if(!curl_dll) { return false; } else +#endif { char fn[MAX_OSPATH]; char urlbuf[1024]; @@ -1012,8 +1069,10 @@ void Curl_Run(void) if(!cl_curl_enabled.integer) return; +#ifndef LINK_TO_CURL if(!curl_dll) return; +#endif if (curl_mutex) Thread_LockMutex(curl_mutex); @@ -1125,8 +1184,10 @@ Stops ALL downloads. */ void Curl_CancelAll(void) { +#ifndef LINK_TO_CURL if(!curl_dll) return; +#endif if (curl_mutex) Thread_LockMutex(curl_mutex); @@ -1148,8 +1209,10 @@ returns true iff there is a download running. */ qboolean Curl_Running(void) { +#ifndef LINK_TO_CURL if(!curl_dll) return false; +#endif return downloads != NULL; } @@ -1164,8 +1227,10 @@ for the given download. */ static double Curl_GetDownloadAmount(downloadinfo *di) { +#ifndef LINK_TO_CURL if(!curl_dll) return -2; +#endif if(di->curle) { double length; @@ -1188,8 +1253,10 @@ returns the speed of the given download in bytes per second */ static double Curl_GetDownloadSpeed(downloadinfo *di) { +#ifndef LINK_TO_CURL if(!curl_dll) return -2; +#endif if(di->curle) { double speed; @@ -1212,8 +1279,11 @@ static void Curl_Info_f(void) { downloadinfo *di; char urlbuf[1024]; + +#ifndef LINK_TO_CURL if(!curl_dll) return; +#endif if(Curl_Running()) { if (curl_mutex) Thread_LockMutex(curl_mutex); @@ -1273,11 +1343,13 @@ static void Curl_Curl_f(void) const char *url; const char *name = 0; +#ifndef LINK_TO_CURL if(!curl_dll) { Con_Print("libcurl DLL not found, this command is inactive.\n"); return; } +#endif if(!cl_curl_enabled.integer) { @@ -1440,6 +1512,7 @@ Curl_downloadinfo_t *Curl_GetDownloadInfo(int *nDownloads, const char **addition downloadinfo *di; Curl_downloadinfo_t *downinfo; +#ifndef LINK_TO_CURL if(!curl_dll) { *nDownloads = 0; @@ -1447,6 +1520,7 @@ Curl_downloadinfo_t *Curl_GetDownloadInfo(int *nDownloads, const char **addition *additional_info = NULL; return NULL; } +#endif if (curl_mutex) Thread_LockMutex(curl_mutex); diff --git a/makefile b/makefile index 0606d88..fa64b02 100644 --- a/makefile +++ b/makefile @@ -302,6 +302,11 @@ else CFLAGS_FS= endif +ifdef LINK_TO_CURL +CFLAGS_CURL=-DLINK_TO_CURL `pkg-config --cflags libcurl` +LIB_CURL=`pkg-config --libs libcurl` +endif + ifdef LINK_TO_LIBJPEG CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG LIB_JPEG=-ljpeg diff --git a/makefile.inc b/makefile.inc index b9ec496..814eb6a 100644 --- a/makefile.inc +++ b/makefile.inc @@ -192,6 +192,7 @@ CFLAGS_COMMON=\ $(CFLAGS_PRELOAD) \ $(CFLAGS_FS) \ $(CFLAGS_WARNINGS) \ + $(CFLAGS_CURL) \ $(CFLAGS_LIBJPEG) \ $(CFLAGS_LIBVORBIS) \ $(CFLAGS_PNG) \ @@ -232,6 +233,7 @@ OBJ_GLX= builddate.c sys_linux.o vid_glx.o thread_pthread.o keysym2ucs.o $(OBJ_S LDFLAGS_UNIXCOMMON=\ -lm \ + $(LIB_CURL) \ $(LIB_ODE) \ $(LIB_JPEG) \ $(LIB_PNG) \ debian/patches/0010-Add-LINK_TO_FREETYPE2.patch0000644000000000000000000001021712264625047015437 0ustar From: Simon McVittie Date: Wed, 6 Jul 2011 10:16:15 +0100 Subject: Add LINK_TO_FREETYPE2 In Debian we want library dependencies to work in the conventional way, since many tools expect that and use it to generate package dependencies. Origin: vendor, Debian --- ft2.c | 42 ++++++++++++++++++++++++++++++++++++++++-- makefile | 5 +++++ makefile.inc | 2 ++ 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/ft2.c b/ft2.c index f55d0e2..9846673 100644 --- a/ft2.c +++ b/ft2.c @@ -4,7 +4,14 @@ #include "quakedef.h" #include "ft2.h" -#include "ft2_defs.h" + +#ifdef LINK_TO_FREETYPE2 +# include +# include FT_FREETYPE_H +#else +# include "ft2_defs.h" +#endif + #include "ft2_fontdefs.h" #include "image.h" @@ -42,6 +49,26 @@ cvar_t r_font_compress = {CVAR_SAVE, "r_font_compress", "0", "use texture compre cvar_t r_font_nonpoweroftwo = {CVAR_SAVE, "r_font_nonpoweroftwo", "1", "use nonpoweroftwo textures for font (saves memory, potentially slower)"}; cvar_t developer_font = {CVAR_SAVE, "developer_font", "0", "prints debug messages about fonts"}; +#ifdef LINK_TO_FREETYPE2 + +#define qFT_Init_FreeType FT_Init_FreeType +#define qFT_Done_FreeType FT_Done_FreeType +#define qFT_New_Memory_Face FT_New_Memory_Face +#define qFT_Done_Face FT_Done_Face +#define qFT_Select_Size FT_Select_Size +#define qFT_Request_Size FT_Request_Size +#define qFT_Request_Size FT_Request_Size +#define qFT_Set_Char_Size FT_Set_Char_Size +#define qFT_Set_Pixel_Sizes FT_Set_Pixel_Sizes +#define qFT_Load_Glyph FT_Load_Glyph +#define qFT_Load_Char FT_Load_Char +#define qFT_Get_Char_Index FT_Get_Char_Index +#define qFT_Render_Glyph FT_Render_Glyph +#define qFT_Get_Kerning FT_Get_Kerning +#define qFT_Attach_Stream FT_Attach_Stream + +#else + /* ================================================================================ Function definitions. Taken from the freetype2 headers. @@ -136,6 +163,8 @@ static dllfunction_t ft2funcs[] = /// Handle for FreeType2 DLL static dllhandle_t ft2_dll = NULL; +#endif /* PREFER_PRELOAD */ + /// Memory pool for fonts static mempool_t *font_mempool= NULL; @@ -240,12 +269,14 @@ void Font_CloseLibrary (void) fontfilecache_FreeAll(); if (font_mempool) Mem_FreePool(&font_mempool); - if (font_ft2lib && qFT_Done_FreeType) + if (font_ft2lib) { qFT_Done_FreeType(font_ft2lib); font_ft2lib = NULL; } +#ifndef LINK_TO_FREETYPE2 Sys_UnloadLibrary (&ft2_dll); +#endif pp.buf = NULL; } @@ -258,6 +289,7 @@ Try to load the FreeType2 DLL */ qboolean Font_OpenLibrary (void) { +#ifndef LINK_TO_FREETYPE2 const char* dllnames [] = { #if defined(WIN32) @@ -283,6 +315,7 @@ qboolean Font_OpenLibrary (void) // Load the DLL if (!Sys_LoadLibrary (dllnames, &ft2_dll, ft2funcs)) return false; +#endif return true; } @@ -358,8 +391,11 @@ Implementation of a more or less lazy font loading and rendering code. ft2_font_t *Font_Alloc(void) { +#ifndef LINK_TO_FREETYPE2 if (!ft2_dll) return NULL; +#endif + return (ft2_font_t *)Mem_Alloc(font_mempool, sizeof(ft2_font_t)); } @@ -1065,7 +1101,9 @@ void Font_UnloadFont(ft2_font_t *font) font->font_maps[i] = NULL; } } +#ifndef LINK_TO_FREETYPE2 if (ft2_dll) +#endif { if (font->face) { diff --git a/makefile b/makefile index fa64b02..967c487 100644 --- a/makefile +++ b/makefile @@ -307,6 +307,11 @@ CFLAGS_CURL=-DLINK_TO_CURL `pkg-config --cflags libcurl` LIB_CURL=`pkg-config --libs libcurl` endif +ifdef LINK_TO_FREETYPE2 +CFLAGS_FREETYPE2=-DLINK_TO_FREETYPE2 `pkg-config --cflags freetype2` +LIB_FREETYPE2=`pkg-config --libs freetype2` +endif + ifdef LINK_TO_LIBJPEG CFLAGS_LIBJPEG=-DLINK_TO_LIBJPEG LIB_JPEG=-ljpeg diff --git a/makefile.inc b/makefile.inc index 814eb6a..7b8023f 100644 --- a/makefile.inc +++ b/makefile.inc @@ -193,6 +193,7 @@ CFLAGS_COMMON=\ $(CFLAGS_FS) \ $(CFLAGS_WARNINGS) \ $(CFLAGS_CURL) \ + $(CFLAGS_FREETYPE2) \ $(CFLAGS_LIBJPEG) \ $(CFLAGS_LIBVORBIS) \ $(CFLAGS_PNG) \ @@ -234,6 +235,7 @@ OBJ_GLX= builddate.c sys_linux.o vid_glx.o thread_pthread.o keysym2ucs.o $(OBJ_S LDFLAGS_UNIXCOMMON=\ -lm \ $(LIB_CURL) \ + $(LIB_FREETYPE2) \ $(LIB_ODE) \ $(LIB_JPEG) \ $(LIB_PNG) \ debian/patches/0011-Add-support-for-linking-to-system-d0_blind_id-and-d0.patch0000644000000000000000000000670212264625047024001 0ustar From: Simon McVittie Date: Wed, 6 Jul 2011 18:03:34 +0100 Subject: Add support for linking to system d0_blind_id and d0_rijndael In Debian we want library dependencies to work in the conventional way, since many tools expect that and use it to generate package dependencies. (These libraries aren't currently in Debian, but if they were, we'd want to link them like this.) Origin: vendor, Debian --- crypto.c | 4 ++-- makefile | 10 ++++++++++ makefile.inc | 10 +++++----- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/crypto.c b/crypto.c index cf7cc5f..30f8554 100644 --- a/crypto.c +++ b/crypto.c @@ -102,7 +102,7 @@ static size_t Crypto_UnParsePack(char *buf, size_t len, unsigned long header, co #define USE_AES -#ifdef CRYPTO_STATIC +#if defined(CRYPTO_STATIC) || defined(LINK_TO_D0_BLIND_ID) #include @@ -285,7 +285,7 @@ static void Crypto_CloseLibrary (void) #endif -#ifdef CRYPTO_RIJNDAEL_STATIC +#if defined(CRYPTO_RIJNDAEL_STATIC) || defined(LINK_TO_D0_RIJNDAEL) #include diff --git a/makefile b/makefile index 967c487..7a4d33b 100644 --- a/makefile +++ b/makefile @@ -307,6 +307,16 @@ CFLAGS_CURL=-DLINK_TO_CURL `pkg-config --cflags libcurl` LIB_CURL=`pkg-config --libs libcurl` endif +ifdef LINK_TO_D0_BLIND_ID +CFLAGS_CRYPTO=-DLINK_TO_D0_BLIND_ID `pkg-config --cflags d0_blind_id` +LIB_CRYPTO=`pkg-config --libs d0_blind_id` +endif + +ifdef LINK_TO_D0_RIJNDAEL +CFLAGS_CRYPTO_RIJNDAEL=-DLINK_TO_D0_RIJNDAEL `pkg-config --cflags d0_rijndael` +LIB_CRYPTO_RIJNDAEL=`pkg-config --libs d0_rijndael` +endif + ifdef LINK_TO_FREETYPE2 CFLAGS_FREETYPE2=-DLINK_TO_FREETYPE2 `pkg-config --cflags freetype2` LIB_FREETYPE2=`pkg-config --libs freetype2` diff --git a/makefile.inc b/makefile.inc index 7b8023f..cf611d7 100644 --- a/makefile.inc +++ b/makefile.inc @@ -48,11 +48,11 @@ STRIP?=strip OBJ_SND_COMMON=snd_main.o snd_mem.o snd_mix.o snd_ogg.o snd_wav.o snd_modplug.o # statically loading d0_blind_id -LIB_CRYPTO=`[ -n "$(DP_CRYPTO_STATIC_LIBDIR)" ] && echo \ $(DP_CRYPTO_STATIC_LIBDIR)/libd0_blind_id.a` -LIB_GMP=`[ -n "$(DP_CRYPTO_STATIC_LIBDIR)" ] && { [ -n "$(DP_GMP_STATIC_LIBDIR)" ] && echo \ $(DP_GMP_STATIC_LIBDIR)/libgmp.a || echo \ -lgmp; }` -CFLAGS_CRYPTO=`[ -n "$(DP_CRYPTO_STATIC_LIBDIR)" ] && echo \ -I$(DP_CRYPTO_STATIC_LIBDIR)/../include\ -DCRYPTO_STATIC` -LIB_CRYPTO_RIJNDAEL=`[ -n "$(DP_CRYPTO_RIJNDAEL_STATIC_LIBDIR)" ] && echo \ $(DP_CRYPTO_RIJNDAEL_STATIC_LIBDIR)/libd0_rijndael.a` -CFLAGS_CRYPTO_RIJNDAEL=`[ -n "$(DP_CRYPTO_RIJNDAEL_STATIC_LIBDIR)" ] && echo \ -I$(DP_CRYPTO_RIJNDAEL_STATIC_LIBDIR)/../include\ -DCRYPTO_RIJNDAEL_STATIC` +LIB_CRYPTO?=`[ -n "$(DP_CRYPTO_STATIC_LIBDIR)" ] && echo \ $(DP_CRYPTO_STATIC_LIBDIR)/libd0_blind_id.a` +LIB_GMP?=`[ -n "$(DP_CRYPTO_STATIC_LIBDIR)" ] && { [ -n "$(DP_GMP_STATIC_LIBDIR)" ] && echo \ $(DP_GMP_STATIC_LIBDIR)/libgmp.a || echo \ -lgmp; }` +CFLAGS_CRYPTO?=`[ -n "$(DP_CRYPTO_STATIC_LIBDIR)" ] && echo \ -I$(DP_CRYPTO_STATIC_LIBDIR)/../include\ -DCRYPTO_STATIC` +LIB_CRYPTO_RIJNDAEL?=`[ -n "$(DP_CRYPTO_RIJNDAEL_STATIC_LIBDIR)" ] && echo \ $(DP_CRYPTO_RIJNDAEL_STATIC_LIBDIR)/libd0_rijndael.a` +CFLAGS_CRYPTO_RIJNDAEL?=`[ -n "$(DP_CRYPTO_RIJNDAEL_STATIC_LIBDIR)" ] && echo \ -I$(DP_CRYPTO_RIJNDAEL_STATIC_LIBDIR)/../include\ -DCRYPTO_RIJNDAEL_STATIC` # Additional stuff for libmodplug LIB_SND_MODPLUG?=`[ -n "$(DP_MODPLUG_STATIC_LIBDIR)" ] && echo \ $(DP_MODPLUG_STATIC_LIBDIR)/libmodplug.a\ -lstdc++` debian/patches/0012-Add-support-for-forcing-d0_blind_id-and-d0_rijndael-.patch0000644000000000000000000000703512264625047023761 0ustar From: Simon McVittie Date: Fri, 20 Jan 2012 09:24:18 +0000 Subject: 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. Origin: vendor, Debian --- crypto.c | 18 ++++++++++++++++++ makefile | 10 ++++++++++ 2 files changed, 28 insertions(+) diff --git a/crypto.c b/crypto.c index 30f8554..7a0cc16 100644 --- a/crypto.c +++ b/crypto.c @@ -209,6 +209,8 @@ static D0_EXPORT void (*qd0_blind_id_setmallocfuncs)(d0_malloc_t *m, d0_free_t * static D0_EXPORT void (*qd0_blind_id_setmutexfuncs)(d0_createmutex_t *c, d0_destroymutex_t *d, d0_lockmutex_t *l, d0_unlockmutex_t *u); static D0_EXPORT D0_WARN_UNUSED_RESULT D0_BOOL (*qd0_blind_id_verify_public_id)(const d0_blind_id_t *ctx, D0_BOOL *status); static D0_EXPORT D0_WARN_UNUSED_RESULT D0_BOOL (*qd0_blind_id_verify_private_id)(const d0_blind_id_t *ctx); + +#ifndef DISABLE_D0_BLIND_ID static dllfunction_t d0_blind_id_funcs[] = { {"d0_blind_id_new", (void **) &qd0_blind_id_new}, @@ -252,11 +254,15 @@ static dllfunction_t d0_blind_id_funcs[] = {"d0_blind_id_verify_private_id", (void **) &qd0_blind_id_verify_private_id}, {NULL, NULL} }; +#endif // end of d0_blind_id interface static dllhandle_t d0_blind_id_dll = NULL; static qboolean Crypto_OpenLibrary (void) { +#ifdef DISABLE_D0_BLIND_ID + return false; +#else const char* dllnames [] = { #if defined(WIN32) @@ -276,11 +282,14 @@ static qboolean Crypto_OpenLibrary (void) // Load the DLL return Sys_LoadLibrary (dllnames, &d0_blind_id_dll, d0_blind_id_funcs); +#endif } static void Crypto_CloseLibrary (void) { +#ifndef DISABLE_D0_BLIND_ID Sys_UnloadLibrary (&d0_blind_id_dll); +#endif } #endif @@ -313,6 +322,8 @@ D0_EXPORT void (*qd0_rijndael_decrypt) (const unsigned long *rk, int nrounds, #define D0_RIJNDAEL_KEYLENGTH(keybits) ((keybits)/8) #define D0_RIJNDAEL_RKLENGTH(keybits) ((keybits)/8+28) #define D0_RIJNDAEL_NROUNDS(keybits) ((keybits)/32+6) + +#ifndef DISABLE_D0_RIJNDAEL static dllfunction_t d0_rijndael_funcs[] = { {"d0_rijndael_setup_decrypt", (void **) &qd0_rijndael_setup_decrypt}, @@ -321,11 +332,15 @@ static dllfunction_t d0_rijndael_funcs[] = {"d0_rijndael_encrypt", (void **) &qd0_rijndael_encrypt}, {NULL, NULL} }; +#endif // end of d0_blind_id interface static dllhandle_t d0_rijndael_dll = NULL; static qboolean Crypto_Rijndael_OpenLibrary (void) { +#ifdef DISABLE_D0_RIJNDAEL + return false; +#else const char* dllnames [] = { #if defined(WIN32) @@ -345,11 +360,14 @@ static qboolean Crypto_Rijndael_OpenLibrary (void) // Load the DLL return Sys_LoadLibrary (dllnames, &d0_rijndael_dll, d0_rijndael_funcs); +#endif } static void Crypto_Rijndael_CloseLibrary (void) { +#ifndef DISABLE_D0_RIJNDAEL Sys_UnloadLibrary (&d0_rijndael_dll); +#endif } #endif diff --git a/makefile b/makefile index 7a4d33b..e74cce2 100644 --- a/makefile +++ b/makefile @@ -310,11 +310,21 @@ endif ifdef LINK_TO_D0_BLIND_ID CFLAGS_CRYPTO=-DLINK_TO_D0_BLIND_ID `pkg-config --cflags d0_blind_id` LIB_CRYPTO=`pkg-config --libs d0_blind_id` +else +ifdef DISABLE_D0_BLIND_ID +CFLAGS_CRYPTO=-DDISABLE_D0_BLIND_ID +LIB_CRYPTO= +endif endif ifdef LINK_TO_D0_RIJNDAEL CFLAGS_CRYPTO_RIJNDAEL=-DLINK_TO_D0_RIJNDAEL `pkg-config --cflags d0_rijndael` LIB_CRYPTO_RIJNDAEL=`pkg-config --libs d0_rijndael` +else +ifdef DISABLE_D0_RIJNDAEL +CFLAGS_CRYPTO_RIJNDAEL=-DDISABLE_D0_RIJNDAEL +LIB_CRYPTO_RIJNDAEL= +endif endif ifdef LINK_TO_FREETYPE2 debian/patches/0013-Fix-OS-detection-of-darkplaces-makefile-to-not-think.patch0000644000000000000000000000164412264625047024072 0ustar From: Cyril Brulebois Date: Tue, 26 Dec 2006 12:24:24 +0100 Subject: 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] --- makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/makefile b/makefile index e74cce2..565dae6 100644 --- a/makefile +++ b/makefile @@ -9,6 +9,10 @@ else # UNIXes DP_ARCH:=$(shell uname) +ifeq ($(DP_ARCH), GNU/kFreeBSD) + # same userspace as Linux, not a BSDish one + DP_MAKE_TARGET=linux +else ifneq ($(filter %BSD,$(DP_ARCH)),) DP_MAKE_TARGET=bsd else @@ -23,6 +27,7 @@ else endif # ifeq ($(DP_ARCH), SunOS) endif # ifeq ($(DP_ARCH), Darwin) endif # ifneq ($(filter %BSD,$(DP_ARCH)),) +endif # ifeq ($(DP_ARCH), GNU/kFreeBSD) endif # ifdef windir endif # ifndef DP_MAKE_TARGET debian/patches/0014-image_png.h-change-name-of-multiple-inclusion-guard-.patch0000644000000000000000000000104712264625047024160 0ustar From: Simon McVittie Date: Thu, 7 Jul 2011 17:04:19 +0100 Subject: image_png.h: change name of multiple-inclusion guard to not interfere with Origin: vendor, Debian --- image_png.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/image_png.h b/image_png.h index d290d98..4c94cd7 100644 --- a/image_png.h +++ b/image_png.h @@ -21,8 +21,8 @@ */ -#ifndef PNG_H -#define PNG_H +#ifndef QUAKE_IMAGE_PNG_H +#define QUAKE_IMAGE_PNG_H qboolean PNG_OpenLibrary (void); void PNG_CloseLibrary (void); debian/patches/0015-Be-more-type-safe-when-calling-setjmp-call-the-same-.patch0000644000000000000000000000774512264625047023764 0ustar From: Simon McVittie Date: Thu, 7 Jul 2011 18:11:42 +0100 Subject: Be more type-safe when calling setjmp(); call the same one that libpng would Depending whether _BSD_SOURCE is preferred, glibc will provide one of two implementations of setjmp()/longjmp() (it either does or doesn't save the signal mask), acting on different definitions of the jmp_buf struct. libpng calls longjmp() internally, and expects its callers to call the version of setjmp() corresponding to the longjmp() call that libpng would make. In an attempt to ensure that consistent versions of setjmp() and longjmp() are used, pngconf.h insists that on Linux, setjmp.h has not already been included. However, quakedef.h includes that header, leading to some interesting contortions when using the system libpng. (IMO the right thing for libpng to do would be for it to provide an exported function png_setjmp (or something) which calls the version of setjmp() that libpng expects on the jmp_buf included in the png structure, like qpng_setjmp in this patch.) When using the system libpng headers, this patch also avoids the assumption that jmp_buf is the first thing in the png structure. --- image_png.c | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/image_png.c b/image_png.c index 289b8d3..dc3554d 100644 --- a/image_png.c +++ b/image_png.c @@ -30,6 +30,12 @@ // This has to come before anything else that includes setjmp.h, because // libpng specifically wants non-BSD setjmp semantics. # include +// Use the matching version of setjmp ourselves. +static inline int +my_setjmp (jmp_buf env) +{ + return setjmp (env); +} #endif #include "quakedef.h" @@ -38,6 +44,8 @@ #ifdef LINK_TO_PNG +#define qpng_setjmp(png) my_setjmp (png->jmpbuf) + #define qpng_set_sig_bytes png_set_sig_bytes #define qpng_sig_cmp png_sig_cmp #define qpng_create_read_struct png_create_read_struct @@ -108,17 +116,19 @@ static void (*qpng_write_info) (void*, void*); static void (*qpng_write_row) (void*, unsigned char*); static void (*qpng_write_end) (void*, void*); -// libpng 1.4+ longjmp hack -typedef void (*qpng_longjmp_ptr) (jmp_buf, int); -static jmp_buf* (*qpng_set_longjmp_fn) (void *, qpng_longjmp_ptr, size_t); -#define qpng_jmpbuf_14(png_ptr) (*qpng_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf))) - -// libpng 1.2 longjmp hack -#define qpng_jmpbuf_12(png_ptr) (*((jmp_buf *) png_ptr)) - -// all version support -#define qpng_jmpbuf(png_ptr) \ - (qpng_set_longjmp_fn ? qpng_jmpbuf_14(png_ptr) : qpng_jmpbuf_12(png_ptr)) + // NOTE: this relies on jmp_buf being the first thing in the png structure + // created by libpng! (this is correct for libpng 1.2.x) +#ifdef __cplusplus +#ifdef WIN64 +#define qpng_setjmp(png) setjmp((_JBTYPE *)png) +#elif defined(MACOSX) || defined(WIN32) +#define qpng_setjmp(png) setjmp((int *)png) +#else +#define qpng_setjmp(png) setjmp((__jmp_buf_tag *)png) +#endif +#else +#define qpng_setjmp(png) setjmp(png) +#endif static dllfunction_t pngfuncs[] = { @@ -366,7 +376,7 @@ unsigned char *PNG_LoadImage_BGRA (const unsigned char *raw, int filesize, int * // NOTE: this relies on jmp_buf being the first thing in the png structure // created by libpng! (this is correct for libpng 1.2.x) - if (setjmp(qpng_jmpbuf(png))) + if (qpng_setjmp(png)) { if (my_png.Data) Mem_Free(my_png.Data); @@ -554,19 +564,7 @@ qboolean PNG_SaveImage_preflipped (const char *filename, int width, int height, // on the fields in this struct for cleanup memset(&my_png, 0, sizeof(my_png)); - // NOTE: this relies on jmp_buf being the first thing in the png structure - // created by libpng! (this is correct for libpng 1.2.x) -#ifdef __cplusplus -#ifdef WIN64 - if (setjmp((_JBTYPE *)png)) -#elif defined(MACOSX) || defined(WIN32) - if (setjmp((int *)png)) -#else - if (setjmp((__jmp_buf_tag *)png)) -#endif -#else - if (setjmp(png)) -#endif + if (qpng_setjmp(png)) { qpng_destroy_write_struct(&png, &pnginfo); return false; debian/patches/0016-Be-a-bit-more-type-safe-about-using-libpng.patch0000644000000000000000000001337112264625047022116 0ustar From: Simon McVittie Date: Fri, 20 Jan 2012 09:26:10 +0000 Subject: 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. Origin: vendor, Debian --- image_png.c | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/image_png.c b/image_png.c index dc3554d..a3afb3c 100644 --- a/image_png.c +++ b/image_png.c @@ -82,10 +82,15 @@ my_setjmp (jmp_buf env) #else +typedef void *png_structp; +typedef void **png_structpp; +typedef void *png_infop; +typedef void **png_infopp; + static void (*qpng_set_sig_bytes) (void*, int); -static int (*qpng_sig_cmp) (const unsigned char*, size_t, size_t); -static void* (*qpng_create_read_struct) (const char*, void*, void(*)(void *png, const char *message), void(*)(void *png, const char *message)); -static void* (*qpng_create_write_struct) (const char*, void*, void(*)(void *png, const char *message), void(*)(void *png, const char *message)); +static int (*qpng_sig_cmp) (unsigned char*, size_t, size_t); +static void* (*qpng_create_read_struct) (const char*, void*, void(*)(png_structp png, const char *message), void(*)(png_structp png, const char *message)); +static void* (*qpng_create_write_struct) (const char*, void*, void(*)(png_structp png, const char *message), void(*)(png_structp png, const char *message)); static void* (*qpng_create_info_struct) (void*); static void (*qpng_read_info) (void*, void*); static void (*qpng_set_compression_level) (void*, int); @@ -102,7 +107,7 @@ static int (*qpng_set_interlace_handling) (void*); static void (*qpng_read_update_info) (void*, void*); static void (*qpng_read_image) (void*, unsigned char**); static void (*qpng_read_end) (void*, void*); -static void (*qpng_destroy_read_struct) (void**, void**, void**); +static void (*qpng_destroy_read_struct) (png_structpp, png_infopp, void**); static void (*qpng_destroy_write_struct) (void**, void**); static void (*qpng_set_read_fn) (void*, void*, void(*)(void *png, unsigned char *data, size_t length)); static void (*qpng_set_write_fn) (void*, void*, void(*)(void *png, unsigned char *data, size_t length), void(*)(void *png)); @@ -306,7 +311,7 @@ static struct } my_png; //LordHavoc: removed __cdecl prefix, added overrun protection, and rewrote this to be more efficient -static void PNG_fReadData(void *png, unsigned char *data, size_t length) +static void PNG_fReadData(png_structp png, unsigned char *data, size_t length) { size_t l; l = my_png.tmpBuflength - my_png.tmpi; @@ -323,21 +328,21 @@ static void PNG_fReadData(void *png, unsigned char *data, size_t length) //Com_HexDumpToConsole(data, (int)length); } -static void PNG_fWriteData(void *png, unsigned char *data, size_t length) +static void PNG_fWriteData(png_structp png, unsigned char *data, size_t length) { FS_Write(my_png.outfile, data, length); } -static void PNG_fFlushData(void *png) +static void PNG_fFlushData(png_structp png) { } -static void PNG_error_fn(void *png, const char *message) +static void PNG_error_fn(png_structp png, const char *message) { Con_Printf("PNG_LoadImage: error: %s\n", message); } -static void PNG_warning_fn(void *png, const char *message) +static void PNG_warning_fn(png_structp png, const char *message) { Con_Printf("PNG_LoadImage: warning: %s\n", message); } @@ -346,7 +351,8 @@ unsigned char *PNG_LoadImage_BGRA (const unsigned char *raw, int filesize, int * { unsigned int c; unsigned int y; - void *png, *pnginfo; + png_structp png; + png_infop pnginfo; unsigned char *imagedata = NULL; unsigned char ioBuffer[8192]; @@ -358,7 +364,8 @@ unsigned char *PNG_LoadImage_BGRA (const unsigned char *raw, int filesize, int * return NULL; #endif - if(qpng_sig_cmp(raw, 0, filesize)) + // png_sig_cmp is not fully const-correct + if(qpng_sig_cmp((unsigned char *) raw, 0, filesize)) return NULL; png = (void *)qpng_create_read_struct( (qpng_access_version_number() / 100 == 102) ? PNG_LIBPNG_VER_STRING_12 : @@ -531,7 +538,8 @@ qboolean PNG_SaveImage_preflipped (const char *filename, int width, int height, { unsigned int offset, linesize; qfile_t* file = NULL; - void *png, *pnginfo; + png_structp png; + png_infop pnginfo; unsigned char ioBuffer[8192]; int passes, i, j; @@ -544,16 +552,16 @@ qboolean PNG_SaveImage_preflipped (const char *filename, int width, int height, } #endif - png = (void *)qpng_create_write_struct( - (qpng_access_version_number() / 100 == 102) ? PNG_LIBPNG_VER_STRING_12 : + png = qpng_create_write_struct( + (qpng_access_version_number() / 100 == 102) ? PNG_LIBPNG_VER_STRING_12 : (qpng_access_version_number() / 100 == 104) ? PNG_LIBPNG_VER_STRING_14 : (qpng_access_version_number() / 100 == 105) ? PNG_LIBPNG_VER_STRING_15 : - PNG_LIBPNG_VER_STRING_16, // nasty hack... whatever + PNG_LIBPNG_VER_STRING_16, // nasty hack to support both libpng12 and libpng14 0, PNG_error_fn, PNG_warning_fn ); if(!png) return false; - pnginfo = (void *)qpng_create_info_struct(png); + pnginfo = qpng_create_info_struct(png); if(!pnginfo) { qpng_destroy_write_struct(&png, NULL); debian/patches/0017-Fix-various-typos-dont-don-t-doesnt-doesn-t-arguemen.patch0000644000000000000000000004074212264625047024255 0ustar From: Simon McVittie Date: Fri, 20 Jan 2012 09:34:00 +0000 Subject: Fix various typos: dont -> don't, doesnt -> doesn't, arguements -> arguments Picked up by Debian's Lintian package-checking tool. Origin: vendor, Debian --- clvm_cmds.c | 2 +- cmd.c | 2 +- dpdefs/csprogsdefs.qc | 4 ++-- gl_draw.c | 2 +- gl_rmain.c | 2 +- gl_textures.c | 2 +- menu.c | 2 +- netconn.c | 4 ++-- progsvm.h | 2 +- prvm_cmds.c | 8 ++++---- prvm_edict.c | 6 +++--- r_sprites.c | 2 +- sbar.c | 2 +- svvm_cmds.c | 2 +- sys.h | 2 +- todo | 4 ++-- vid_sdl.c | 2 +- vid_wgl.c | 2 +- world.c | 4 ++-- 19 files changed, 28 insertions(+), 28 deletions(-) diff --git a/clvm_cmds.c b/clvm_cmds.c index 6ca2749..7d8027c 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -472,7 +472,7 @@ static void VM_CL_findradius (prvm_prog_t *prog) else chainfield = prog->fieldoffsets.chain; if(chainfield < 0) - prog->error_cmd("VM_findchain: %s doesnt have the specified chain field !", prog->name); + prog->error_cmd("VM_findchain: %s doesn't have the specified chain field !", prog->name); chain = (prvm_edict_t *)prog->edicts; diff --git a/cmd.c b/cmd.c index ea48614..4b5dc69 100644 --- a/cmd.c +++ b/cmd.c @@ -1615,7 +1615,7 @@ static void Cmd_TokenizeString (const char *text) l = (int)strlen(com_token) + 1; if (cmd_tokenizebufferpos + l > CMD_TOKENIZELENGTH) { - Con_Printf("Cmd_TokenizeString: ran out of %i character buffer space for command arguements\n", CMD_TOKENIZELENGTH); + Con_Printf("Cmd_TokenizeString: ran out of %i character buffer space for command arguments\n", CMD_TOKENIZELENGTH); break; } memcpy (cmd_tokenizebuffer + cmd_tokenizebufferpos, com_token, l); diff --git a/dpdefs/csprogsdefs.qc b/dpdefs/csprogsdefs.qc index c9b9ce9..6d2cb42 100644 --- a/dpdefs/csprogsdefs.qc +++ b/dpdefs/csprogsdefs.qc @@ -797,8 +797,8 @@ float(float entitynum, float fldnum) getentity = #504; vector(float entitynum, float fldnum) getentityvec = #504; // description: allows to query parms from render entities, especially useful with attaching CSQC ents to // server entities networked and interpolated by engine (monsters, players), number of entity is it's SVQC number -// you can send it via tempentity/CSQC entity message. Note that this builtin doesnt know about entity removing/reallocating -// so it's meaning to work for short period of time, dont use it on missiles/grenades whatever will be removed next five seconds +// you can send it via tempentity/CSQC entity message. Note that this builtin doesn't know about entity removing/reallocating +// so it's meaning to work for short period of time, don't use it on missiles/grenades whatever will be removed next five seconds //DP_GFX_FONTS //idea: Blub\0, divVerent diff --git a/gl_draw.c b/gl_draw.c index 88431d9..fb3df8d 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -872,7 +872,7 @@ static void LoadFont_f(void) "loadfont console gfx/conchars,gfx/fallback 8 12 16 24 32\n" "In many cases, 8 12 16 24 32 should be a good choice.\n" "custom switches:\n" - " scale x : scale all characters by this amount when rendering (doesnt change line height)\n" + " scale x : scale all characters by this amount when rendering (doesn't change line height)\n" " voffset x : offset all chars vertical when rendering, this is multiplied to character height\n" ); return; diff --git a/gl_rmain.c b/gl_rmain.c index 1ab7aaa..9596fd7 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -3261,7 +3261,7 @@ skinframe_t *R_SkinFrame_Find(const char *name, int textureflags, int comparewid { rtexture_t *dyntexture; // check whether its a dynamic texture - // this only needs to be done because Purge doesnt delete skinframes - only sets the texture pointers to NULL and we need to restore it before returing.. [11/29/2007 Black] + // this only needs to be done because Purge doesn't delete skinframes - only sets the texture pointers to NULL and we need to restore it before returing.. [11/29/2007 Black] dyntexture = CL_GetDynTexture( basename ); item->base = dyntexture; // either NULL or dyntexture handle } diff --git a/gl_textures.c b/gl_textures.c index 2dd11eb..3fb7141 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -307,7 +307,7 @@ void R_MarkDirtyTexture(rtexture_t *rt) { return; } - // dont do anything if the texture is already dirty (and make sure this *is* a dynamic texture after all!) + // don't do anything if the texture is already dirty (and make sure this *is* a dynamic texture after all!) if (glt->flags & GLTEXF_DYNAMIC) { // mark it as dirty, so R_RealGetTexture gets called diff --git a/menu.c b/menu.c index 184ae36..4954672 100644 --- a/menu.c +++ b/menu.c @@ -3220,7 +3220,7 @@ static int M_ChooseQuitMessage(int request) if (request-- == 0) return M_QuitMessage("All your quit are","belong to long duck","dong",NULL,NULL,NULL,NULL,NULL); if (request-- == 0) return M_QuitMessage("Press Y to quit","","But are you too legit?",NULL,NULL,NULL,NULL,NULL); if (request-- == 0) return M_QuitMessage("This game was made by","e@chip-web.com","It is by far the best","game ever made.",NULL,NULL,NULL,NULL); - if (request-- == 0) return M_QuitMessage("Even I really dont","know of a game better","Press Y to quit","like rougue chedder",NULL,NULL,NULL,NULL); + if (request-- == 0) return M_QuitMessage("Even I really don't","know of a game better","Press Y to quit","like rougue chedder",NULL,NULL,NULL,NULL); if (request-- == 0) return M_QuitMessage("After you stop playing","tell the guys who made","counterstrike to just","kill themselves now",NULL,NULL,NULL,NULL); if (request-- == 0) return M_QuitMessage("Press Y to exit to DOS","","SSH login as user Y","to exit to Linux",NULL,NULL,NULL,NULL); if (request-- == 0) return M_QuitMessage("Press Y like you","were waanderers","from Ys'",NULL,NULL,NULL,NULL,NULL); diff --git a/netconn.c b/netconn.c index aa8bf94..4be2492 100755 --- a/netconn.c +++ b/netconn.c @@ -1494,7 +1494,7 @@ static int NetConn_ClientParsePacket_ServerList_ProcessReply(const char *address if (n == serverlist_cachecount) { - // LAN search doesnt require an answer from the master server so we wont + // LAN search doesn't require an answer from the master server so we wont // know the ping nor will it be initialized already... // find a slot @@ -1526,7 +1526,7 @@ static int NetConn_ClientParsePacket_ServerList_ProcessReply(const char *address entry->query = SQS_QUERIED; } else { // convert to unsigned to catch the -1 - // I still dont like this but its better than the old 10000 magic ping number - as in easier to type and read :( [11/8/2007 Black] + // I still don't like this but its better than the old 10000 magic ping number - as in easier to type and read :( [11/8/2007 Black] entry->info.ping = min((unsigned) entry->info.ping, (unsigned) pingtime); serverreplycount++; } diff --git a/progsvm.h b/progsvm.h index 406a9eb..2452534 100644 --- a/progsvm.h +++ b/progsvm.h @@ -65,7 +65,7 @@ typedef struct prvm_required_field_s } prvm_required_field_t; -// AK: I dont call it engine private cause it doesnt really belongs to the engine +// AK: I don't call it engine private because it doesn't really belong to the engine, // it belongs to prvm. typedef struct prvm_edict_private_s { diff --git a/prvm_cmds.c b/prvm_cmds.c index c9f5527..3b6b9e3 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -1104,7 +1104,7 @@ void VM_findchain(prvm_prog_t *prog) else chainfield = prog->fieldoffsets.chain; if (chainfield < 0) - prog->error_cmd("VM_findchain: %s doesnt have the specified chain field !", prog->name); + prog->error_cmd("VM_findchain: %s doesn't have the specified chain field !", prog->name); chain = prog->edicts; @@ -1159,7 +1159,7 @@ void VM_findchainfloat(prvm_prog_t *prog) else chainfield = prog->fieldoffsets.chain; if (chainfield < 0) - prog->error_cmd("VM_findchain: %s doesnt have the specified chain field !", prog->name); + prog->error_cmd("VM_findchain: %s doesn't have the specified chain field !", prog->name); chain = (prvm_edict_t *)prog->edicts; @@ -1245,7 +1245,7 @@ void VM_findchainflags(prvm_prog_t *prog) else chainfield = prog->fieldoffsets.chain; if (chainfield < 0) - prog->error_cmd("VM_findchain: %s doesnt have the specified chain field !", prog->name); + prog->error_cmd("VM_findchain: %s doesn't have the specified chain field !", prog->name); chain = (prvm_edict_t *)prog->edicts; @@ -4927,7 +4927,7 @@ void VM_buf_implode (prvm_prog_t *prog) /* ======================== VM_bufstr_get -get a string from buffer, returns tempstring, dont str_unzone it! +get a string from buffer, returns tempstring, don't str_unzone it! string bufstr_get(float bufhandle, float string_index) = #465; ======================== */ diff --git a/prvm_edict.c b/prvm_edict.c index 191197f..7014cbe 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -248,8 +248,8 @@ prvm_edict_t *PRVM_ED_Alloc(prvm_prog_t *prog) int i; prvm_edict_t *e; - // the client qc dont need maxclients - // thus it doesnt need to use svs.maxclients + // the client qc doesn't need maxclients + // thus it doesn't need to use svs.maxclients // AK: changed i=svs.maxclients+1 // AK: changed so the edict 0 wont spawn -> used as reserved/world entity // although the menu/client has no world @@ -289,7 +289,7 @@ FIXME: walk all entities and NULL out references to this entity */ void PRVM_ED_Free(prvm_prog_t *prog, prvm_edict_t *ed) { - // dont delete the null entity (world) or reserved edicts + // don't delete the null entity (world) or reserved edicts if (ed - prog->edicts <= prog->reserved_edicts) return; diff --git a/r_sprites.c b/r_sprites.c index a45a3e7..dbd04c8 100644 --- a/r_sprites.c +++ b/r_sprites.c @@ -394,7 +394,7 @@ static void R_Model_Sprite_Draw_TransparentCallback(const entity_render_t *ent, // lit sprite by lightgrid if it is not fullbright, lit only ambient if (!(texture->currentmaterialflags & MATERIALFLAG_FULLBRIGHT)) - VectorAdd(ent->modellight_ambient, ent->modellight_diffuse, rsurface.modellight_ambient); // sprites dont use lightdirection + VectorAdd(ent->modellight_ambient, ent->modellight_diffuse, rsurface.modellight_ambient); // sprites don't use lightdirection // SPR_LABEL should not use depth test AT ALL if(model->sprite.sprnum_type == SPR_LABEL || model->sprite.sprnum_type == SPR_LABEL_SCALE) diff --git a/sbar.c b/sbar.c index 43888d5..4cec184 100644 --- a/sbar.c +++ b/sbar.c @@ -1506,7 +1506,7 @@ void Sbar_Draw (void) else Sbar_DrawXNum((154-3*24),12,cl.stats[STAT_HEALTH],3,24,0.6,0.7,0.8,1,0); - // AK dont draw ammo for the laser + // AK don't draw ammo for the laser if(cl.stats[STAT_ACTIVEWEAPON] != 12) { if (cl.stats[STAT_ITEMS] & NEX_IT_SHELLS) diff --git a/svvm_cmds.c b/svvm_cmds.c index e9d51fd..64e1cd6 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -995,7 +995,7 @@ static void VM_SV_findradius(prvm_prog_t *prog) else chainfield = prog->fieldoffsets.chain; if (chainfield < 0) - prog->error_cmd("VM_findchain: %s doesnt have the specified chain field !", prog->name); + prog->error_cmd("VM_findchain: %s doesn't have the specified chain field !", prog->name); chain = (prvm_edict_t *)prog->edicts; diff --git a/sys.h b/sys.h index e5247d3..862bdf7 100644 --- a/sys.h +++ b/sys.h @@ -74,7 +74,7 @@ void Sys_Error (const char *error, ...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN; void Sys_PrintToTerminal(const char *text); void Sys_PrintfToTerminal(const char *fmt, ...); -/// INFO: This is only called by Host_Shutdown so we dont need testing for recursion +/// INFO: This is only called by Host_Shutdown so we don't need testing for recursion void Sys_Shutdown (void); void Sys_Quit (int returnvalue); diff --git a/todo b/todo index adfa4eb..08257b4 100644 --- a/todo +++ b/todo @@ -373,7 +373,7 @@ 2 feature darkplaces client: decal clipping (romi) 2 feature darkplaces client: http download and parse http://www.gameaholic.com/servers/qspy-quake for nq servers (Spike) 2 feature darkplaces client: interpolate scale and alpha changes (Cheapy) -2 feature darkplaces client: make CL_Video use TEXF_FRAGMENT again by adding general, transparent support for it in all drawqueue functions (so you dont need to call FragmentLocation) (Black) +2 feature darkplaces client: make CL_Video use TEXF_FRAGMENT again by adding general, transparent support for it in all drawqueue functions (so you don't need to call FragmentLocation) (Black) 2 feature darkplaces image: add scaling capabilities to Image_CopyMux 2 feature darkplaces loader: add support for fuhquake naming of map textures (textures/start/quake.tga style) 2 feature darkplaces loader: implement vertex cache optimization of models during loading, see this paper: http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html (Dresk) @@ -1437,4 +1437,4 @@ f feature dpmod: include .lit and .dlit files for all id1 maps - this idea was r f feature dpmod: include .vis files for all id1 maps - this idea rejected due to lack of .vis support and download size f hqbsp: CreateBrushFaces should use RadiusFromBounds for its rotation box code, but hmap is obsolete (Vic) f optimization darkplaces renderer: change water distortion textures from multiple 2D textures to one 3D texture for smoother animation (Tomaz) -f optimization darkplaces visibility: R_Q3BSP_RecursiveWorldNode should take clipflags parameter and do not cull a node against a plane if the parent node is totally on one side of the plane (Vic) \ No newline at end of file +f optimization darkplaces visibility: R_Q3BSP_RecursiveWorldNode should take clipflags parameter and do not cull a node against a plane if the parent node is totally on one side of the plane (Vic) diff --git a/vid_sdl.c b/vid_sdl.c index 0aba711..b3d46ba 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -1712,7 +1712,7 @@ void VID_EnableJoystick(qboolean enable) } #if SDL_MAJOR_VERSION == 1 -// set the icon (we dont use SDL here since it would be too much a PITA) +// set the icon (we don't use SDL here since it would be too much a PITA) #ifdef WIN32 #include "resource.h" #include diff --git a/vid_wgl.c b/vid_wgl.c index ffa6658..d6e8e8c 100644 --- a/vid_wgl.c +++ b/vid_wgl.c @@ -496,7 +496,7 @@ void AppActivate(BOOL fActive, BOOL minimize) } } -//TODO: move it around in vid_wgl.c since I dont think this is the right position +//TODO: move it around in vid_wgl.c since I don't think this is the right position void Sys_SendKeyEvents (void) { MSG msg; diff --git a/world.c b/world.c index 1f96eae..f14913c 100644 --- a/world.c +++ b/world.c @@ -361,8 +361,8 @@ cvar_t physics_ode_world_damping_angular = {0, "physics_ode_world_damping_angula cvar_t physics_ode_world_damping_angular_threshold = {0, "physics_ode_world_damping_angular_threshold", "0.1", "world angular damping threshold (see ODE User Guide); use defaults when set to -1"}; cvar_t physics_ode_world_gravitymod = {0, "physics_ode_world_gravitymod", "1", "multiplies gravity got from sv_gravity, this may be needed to tweak if strong damping is used"}; cvar_t physics_ode_iterationsperframe = {0, "physics_ode_iterationsperframe", "1", "divisor for time step, runs multiple physics steps per frame"}; -cvar_t physics_ode_constantstep = {0, "physics_ode_constantstep", "0", "use constant step instead of variable step which tends to increase stability, if set to 1 uses sys_ticrate, instead uses it's own value"}; -cvar_t physics_ode_autodisable = {0, "physics_ode_autodisable", "1", "automatic disabling of objects which dont move for long period of time, makes object stacking a lot faster"}; +cvar_t physics_ode_constantstep = {0, "physics_ode_constantstep", "0", "use constant step instead of variable step which tends to increase stability, if set to 1 uses sys_ticrate, instead uses its own value"}; +cvar_t physics_ode_autodisable = {0, "physics_ode_autodisable", "1", "automatic disabling of objects which don't move for long period of time, makes object stacking a lot faster"}; cvar_t physics_ode_autodisable_steps = {0, "physics_ode_autodisable_steps", "10", "how many steps object should be dormant to be autodisabled"}; cvar_t physics_ode_autodisable_time = {0, "physics_ode_autodisable_time", "0", "how many seconds object should be dormant to be autodisabled"}; cvar_t physics_ode_autodisable_threshold_linear = {0, "physics_ode_autodisable_threshold_linear", "0.6", "body will be disabled if it's linear move below this value"}; debian/patches/0018-Don-t-build-SSE-only-software-rasterizer-on-non-x86-.patch0000644000000000000000000007707012264625047023656 0ustar From: Simon McVittie Date: Sat, 21 Jan 2012 17:19:30 +0000 Subject: Don't build SSE-only software rasterizer on non-x86 CPUs Compilers for non-x86 platforms don't understand -msse or -msse2, and these files aren't usable on non-x86 anyway. Origin: vendor, Debian --- dpsoftrast.h | 4 ++++ gl_backend.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ gl_rmain.c | 19 +++++++++++++++++++ gl_textures.c | 18 ++++++++++++++++++ makefile | 12 ++++++++++++ makefile.inc | 16 +++++++++------- quakedef.h | 5 +++++ vid_glx.c | 8 +++++++- vid_sdl.c | 6 +++++- vid_shared.c | 4 +++- vid_wgl.c | 6 +++++- 11 files changed, 143 insertions(+), 11 deletions(-) diff --git a/dpsoftrast.h b/dpsoftrast.h index 5bda9f3..ce61104 100644 --- a/dpsoftrast.h +++ b/dpsoftrast.h @@ -33,6 +33,7 @@ typedef enum DPSOFTRAST_TEXTURE_FILTER_e } DPSOFTRAST_TEXTURE_FILTER; +#ifdef HAVE_DPSOFTRAST int DPSOFTRAST_Init(int width, int height, int numthreads, int interlace, unsigned int *colorpixels, unsigned int *depthpixels); void DPSOFTRAST_Shutdown(void); void DPSOFTRAST_Flush(void); @@ -74,6 +75,7 @@ void DPSOFTRAST_SetVertexPointer(const float *vertex3f, size_t stride); void DPSOFTRAST_SetColorPointer(const float *color4f, size_t stride); void DPSOFTRAST_SetColorPointer4ub(const unsigned char *color4ub, size_t stride); void DPSOFTRAST_SetTexCoordPointer(int unitnum, int numcomponents, size_t stride, const float *texcoordf); +#endif typedef enum gl20_texunit_e { @@ -313,6 +315,7 @@ typedef enum DPSOFTRAST_UNIFORM_e } DPSOFTRAST_UNIFORM; +#ifdef HAVE_DPSOFTRAST void DPSOFTRAST_SetShader(int mode, int permutation, int exactspecularmath); #define DPSOFTRAST_Uniform1f(index, v0) DPSOFTRAST_Uniform4f(index, v0, 0, 0, 0) #define DPSOFTRAST_Uniform2f(index, v0, v1) DPSOFTRAST_Uniform4f(index, v0, v1, 0, 0) @@ -323,5 +326,6 @@ void DPSOFTRAST_UniformMatrix4fv(DPSOFTRAST_UNIFORM index, int arraysize, int tr void DPSOFTRAST_Uniform1i(DPSOFTRAST_UNIFORM index, int i0); void DPSOFTRAST_DrawTriangles(int firstvertex, int numvertices, int numtriangles, const int *element3i, const unsigned short *element3s); +#endif #endif // DPSOFTRAST_H diff --git a/gl_backend.c b/gl_backend.c index bd36d93..c1a72a4 100644 --- a/gl_backend.c +++ b/gl_backend.c @@ -660,7 +660,9 @@ void GL_Finish(void) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_Finish(); +#endif break; } } @@ -1209,7 +1211,9 @@ void R_SetViewport(const r_viewport_t *v) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_Viewport(v->x, v->y, v->width, v->height); +#endif break; case RENDERPATH_GL20: case RENDERPATH_GLES2: @@ -1508,6 +1512,7 @@ void R_Mesh_SetRenderTargets(int fbo, rtexture_t *depthtexture, rtexture_t *colo Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST if (fbo) { int width, height; @@ -1521,6 +1526,7 @@ void R_Mesh_SetRenderTargets(int fbo, rtexture_t *depthtexture, rtexture_t *colo } else DPSOFTRAST_SetRenderTargets(vid.width, vid.height, vid.softdepthpixels, vid.softpixels, NULL, NULL, NULL); +#endif break; } } @@ -1669,6 +1675,7 @@ static void GL_Backend_ResetState(void) #endif break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_ColorMask(1,1,1,1); DPSOFTRAST_BlendFunc(gl_state.blendfunc1, gl_state.blendfunc2); DPSOFTRAST_CullFace(gl_state.cullface); @@ -1677,6 +1684,7 @@ static void GL_Backend_ResetState(void) DPSOFTRAST_PolygonOffset(gl_state.polygonoffset[0], gl_state.polygonoffset[1]); DPSOFTRAST_SetRenderTargets(vid.width, vid.height, vid.softdepthpixels, vid.softpixels, NULL, NULL, NULL); DPSOFTRAST_Viewport(0, 0, vid.width, vid.height); +#endif break; case RENDERPATH_GL20: case RENDERPATH_GLES2: @@ -1858,7 +1866,9 @@ void GL_BlendFunc(int blendfunc1, int blendfunc2) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_BlendFunc(gl_state.blendfunc1, gl_state.blendfunc2); +#endif break; } } @@ -1891,7 +1901,9 @@ void GL_DepthMask(int state) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_DepthMask(gl_state.depthmask); +#endif break; } } @@ -1931,7 +1943,9 @@ void GL_DepthTest(int state) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_DepthTest(gl_state.depthtest); +#endif break; } } @@ -1964,7 +1978,9 @@ void GL_DepthFunc(int state) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_DepthFunc(gl_state.depthfunc); +#endif break; } } @@ -2010,7 +2026,9 @@ void GL_DepthRange(float nearfrac, float farfrac) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_DepthRange(gl_state.depthrange[0], gl_state.depthrange[1]); +#endif break; } } @@ -2169,7 +2187,9 @@ void GL_PolygonOffset(float planeoffset, float depthoffset) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_PolygonOffset(gl_state.polygonoffset[0], gl_state.polygonoffset[1]); +#endif break; } } @@ -2207,7 +2227,9 @@ void GL_SetMirrorState(qboolean state) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_CullFace(gl_state.cullface); +#endif break; } } @@ -2284,12 +2306,14 @@ void GL_CullFace(int state) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST if (gl_state.cullface != state) { gl_state.cullface = state; gl_state.cullfaceenable = state != GL_NONE ? true : false; DPSOFTRAST_CullFace(gl_state.cullface); } +#endif break; } } @@ -2393,7 +2417,9 @@ void GL_ColorMask(int r, int g, int b, int a) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_ColorMask(r, g, b, a); +#endif break; } } @@ -2422,7 +2448,9 @@ void GL_Color(float cr, float cg, float cb, float ca) // no equivalent in D3D break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_Color4f(cr, cg, cb, ca); +#endif break; case RENDERPATH_GL20: case RENDERPATH_GLES2: @@ -2464,7 +2492,9 @@ void GL_Scissor (int x, int y, int width, int height) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_Scissor(x, y, width, height); +#endif break; } } @@ -2500,7 +2530,9 @@ void GL_ScissorTest(int state) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_ScissorTest(gl_state.scissortest); +#endif break; } } @@ -2555,10 +2587,12 @@ void GL_Clear(int mask, const float *colorvalue, float depthvalue, int stencilva Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST if (mask & GL_COLOR_BUFFER_BIT) DPSOFTRAST_ClearColor(colorvalue[0], colorvalue[1], colorvalue[2], colorvalue[3]); if (mask & GL_DEPTH_BUFFER_BIT) DPSOFTRAST_ClearDepth(depthvalue); +#endif break; } } @@ -2618,7 +2652,9 @@ void GL_ReadPixelsBGRA(int x, int y, int width, int height, unsigned char *outpi Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_GetPixelsBGRA(x, y, width, height, outpixels); +#endif break; } } @@ -3227,7 +3263,9 @@ void R_Mesh_Draw(int firstvertex, int numvertices, int firsttriangle, int numtri Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_DrawTriangles(firstvertex, numvertices, numtriangles, element3i, element3s); +#endif break; case RENDERPATH_GLES1: case RENDERPATH_GLES2: @@ -3771,7 +3809,9 @@ void R_Mesh_CopyToTexture(rtexture_t *tex, int tx, int ty, int sx, int sy, int w Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_CopyRectangleToTexture(tex->texnum, 0, tx, ty, sx, sy, width, height); +#endif break; } } @@ -3950,6 +3990,7 @@ void R_Mesh_TexBind(unsigned int unitnum, rtexture_t *tex) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST if (!tex) { tex = r_texture_white; @@ -3962,6 +4003,7 @@ void R_Mesh_TexBind(unsigned int unitnum, rtexture_t *tex) return; unit->texture = tex; DPSOFTRAST_SetTexture(unitnum, texnum); +#endif break; } } @@ -4320,6 +4362,7 @@ void R_Mesh_PrepareVertices_Vertex3f(int numvertices, const float *vertex3f, con Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_SetVertexPointer(vertex3f, sizeof(float[3])); DPSOFTRAST_SetColorPointer(NULL, 0); DPSOFTRAST_SetTexCoordPointer(0, 2, sizeof(float[2]), NULL); @@ -4327,6 +4370,7 @@ void R_Mesh_PrepareVertices_Vertex3f(int numvertices, const float *vertex3f, con DPSOFTRAST_SetTexCoordPointer(2, 2, sizeof(float[2]), NULL); DPSOFTRAST_SetTexCoordPointer(3, 2, sizeof(float[2]), NULL); DPSOFTRAST_SetTexCoordPointer(4, 2, sizeof(float[2]), NULL); +#endif break; } } @@ -4398,6 +4442,7 @@ void R_Mesh_PrepareVertices_Generic_Arrays(int numvertices, const float *vertex3 case RENDERPATH_D3D11: break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_SetVertexPointer(vertex3f, sizeof(float[3])); DPSOFTRAST_SetColorPointer(color4f, sizeof(float[4])); DPSOFTRAST_SetTexCoordPointer(0, 2, sizeof(float[2]), texcoord2f); @@ -4405,6 +4450,7 @@ void R_Mesh_PrepareVertices_Generic_Arrays(int numvertices, const float *vertex3 DPSOFTRAST_SetTexCoordPointer(2, 2, sizeof(float[2]), NULL); DPSOFTRAST_SetTexCoordPointer(3, 2, sizeof(float[2]), NULL); DPSOFTRAST_SetTexCoordPointer(4, 2, sizeof(float[2]), NULL); +#endif return; } @@ -4523,6 +4569,7 @@ void R_Mesh_PrepareVertices_Generic(int numvertices, const r_vertexgeneric_t *ve Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_SetVertexPointer(vertex->vertex3f, sizeof(*vertex)); DPSOFTRAST_SetColorPointer(vertex->color4f, sizeof(*vertex)); DPSOFTRAST_SetTexCoordPointer(0, 2, sizeof(*vertex), vertex->texcoord2f); @@ -4530,6 +4577,7 @@ void R_Mesh_PrepareVertices_Generic(int numvertices, const r_vertexgeneric_t *ve DPSOFTRAST_SetTexCoordPointer(2, 2, sizeof(*vertex), NULL); DPSOFTRAST_SetTexCoordPointer(3, 2, sizeof(*vertex), NULL); DPSOFTRAST_SetTexCoordPointer(4, 2, sizeof(*vertex), NULL); +#endif break; } } @@ -4601,6 +4649,7 @@ void R_Mesh_PrepareVertices_Mesh_Arrays(int numvertices, const float *vertex3f, case RENDERPATH_D3D11: break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_SetVertexPointer(vertex3f, sizeof(float[3])); DPSOFTRAST_SetColorPointer(color4f, sizeof(float[4])); DPSOFTRAST_SetTexCoordPointer(0, 2, sizeof(float[2]), texcoordtexture2f); @@ -4608,6 +4657,7 @@ void R_Mesh_PrepareVertices_Mesh_Arrays(int numvertices, const float *vertex3f, DPSOFTRAST_SetTexCoordPointer(2, 3, sizeof(float[3]), tvector3f); DPSOFTRAST_SetTexCoordPointer(3, 3, sizeof(float[3]), normal3f); DPSOFTRAST_SetTexCoordPointer(4, 2, sizeof(float[2]), texcoordlightmap2f); +#endif return; } @@ -4737,6 +4787,7 @@ void R_Mesh_PrepareVertices_Mesh(int numvertices, const r_vertexmesh_t *vertex, Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_SetVertexPointer(vertex->vertex3f, sizeof(*vertex)); DPSOFTRAST_SetColorPointer(vertex->color4f, sizeof(*vertex)); DPSOFTRAST_SetTexCoordPointer(0, 2, sizeof(*vertex), vertex->texcoordtexture2f); @@ -4744,6 +4795,7 @@ void R_Mesh_PrepareVertices_Mesh(int numvertices, const r_vertexmesh_t *vertex, DPSOFTRAST_SetTexCoordPointer(2, 3, sizeof(*vertex), vertex->tvector3f); DPSOFTRAST_SetTexCoordPointer(3, 3, sizeof(*vertex), vertex->normal3f); DPSOFTRAST_SetTexCoordPointer(4, 2, sizeof(*vertex), vertex->texcoordlightmap2f); +#endif break; } } @@ -4773,7 +4825,9 @@ void GL_BlendEquationSubtract(qboolean negated) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_BlendSubtract(true); +#endif break; } } @@ -4800,7 +4854,9 @@ void GL_BlendEquationSubtract(qboolean negated) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_BlendSubtract(false); +#endif break; } } diff --git a/gl_rmain.c b/gl_rmain.c index 9596fd7..89ecff8 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -1844,6 +1844,7 @@ void R_SetupShader_SetPermutationHLSL(unsigned int mode, unsigned int permutatio } #endif +#ifdef HAVE_DPSOFTRAST static void R_SetupShader_SetPermutationSoft(unsigned int mode, unsigned int permutation) { DPSOFTRAST_SetShader(mode, permutation, r_shadow_glossexact.integer); @@ -1851,6 +1852,7 @@ static void R_SetupShader_SetPermutationSoft(unsigned int mode, unsigned int per DPSOFTRAST_UniformMatrix4fv(DPSOFTRAST_UNIFORM_ModelViewMatrixM1, 1, false, gl_modelview16f); DPSOFTRAST_Uniform1f(DPSOFTRAST_UNIFORM_ClientTime, cl.time); } +#endif void R_GLSL_Restart_f(void) { @@ -2027,9 +2029,11 @@ void R_SetupShader_Generic(rtexture_t *first, rtexture_t *second, int texturemod R_Mesh_TexMatrix(0, NULL); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST R_SetupShader_SetPermutationSoft(SHADERMODE_GENERIC, permutation); R_Mesh_TexBind(GL20TU_FIRST , first ); R_Mesh_TexBind(GL20TU_SECOND, second); +#endif break; } } @@ -2078,7 +2082,9 @@ void R_SetupShader_DepthOrShadow(qboolean notrippy, qboolean depthrgb, qboolean R_Mesh_TexBind(0, 0); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST R_SetupShader_SetPermutationSoft(SHADERMODE_DEPTH_OR_SHADOW, permutation); +#endif break; } } @@ -2873,6 +2879,7 @@ void R_SetupShader_Surface(const vec3_t lightcolorbase, qboolean modellighting, case RENDERPATH_GLES1: break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST RSurf_PrepareVerticesForBatch(BATCHNEED_ARRAY_VERTEX | BATCHNEED_ARRAY_NORMAL | BATCHNEED_ARRAY_VECTOR | (rsurface.modellightmapcolor4f ? BATCHNEED_ARRAY_VERTEXCOLOR : 0) | BATCHNEED_ARRAY_TEXCOORD | (rsurface.uselightmaptexture ? BATCHNEED_ARRAY_LIGHTMAP : 0) | BATCHNEED_ALLOWMULTIDRAW, texturenumsurfaces, texturesurfacelist); R_Mesh_PrepareVertices_Mesh_Arrays(rsurface.batchnumvertices, rsurface.batchvertex3f, rsurface.batchsvector3f, rsurface.batchtvector3f, rsurface.batchnormal3f, rsurface.batchlightmapcolor4f, rsurface.batchtexcoordtexture2f, rsurface.batchtexcoordlightmap2f); R_SetupShader_SetPermutationSoft(mode, permutation); @@ -3006,6 +3013,7 @@ void R_SetupShader_Surface(const vec3_t lightcolorbase, qboolean modellighting, if (permutation & SHADERPERMUTATION_SHADOWMAPVSDCT ) R_Mesh_TexBind(GL20TU_CUBEPROJECTION , r_shadow_shadowmapvsdcttexture ); } } +#endif break; } } @@ -3105,6 +3113,7 @@ void R_SetupShader_DeferredLight(const rtlight_t *rtlight) case RENDERPATH_GLES1: break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST R_SetupShader_SetPermutationGLSL(mode, permutation); DPSOFTRAST_Uniform3f( DPSOFTRAST_UNIFORM_LightPosition , viewlightorigin[0], viewlightorigin[1], viewlightorigin[2]); DPSOFTRAST_UniformMatrix4fv(DPSOFTRAST_UNIFORM_ViewToLightM1 , 1, false, viewtolight16f); @@ -3122,6 +3131,7 @@ void R_SetupShader_DeferredLight(const rtlight_t *rtlight) R_Mesh_TexBind(GL20TU_CUBE , rsurface.rtlight->currentcubemap ); R_Mesh_TexBind(GL20TU_SHADOWMAP2D , r_shadow_shadowmap2ddepthtexture ); R_Mesh_TexBind(GL20TU_CUBEPROJECTION , r_shadow_shadowmapvsdcttexture ); +#endif break; } } @@ -5582,6 +5592,8 @@ void R_SetupView(qboolean allowwaterclippingplane, int fbo, rtexture_t *depthtex R_Viewport_InitPerspective(&r_refdef.view.viewport, &r_refdef.view.matrix, r_refdef.view.x, rtheight - scaledheight - r_refdef.view.y, scaledwidth, scaledheight, r_refdef.view.frustum_x, r_refdef.view.frustum_y, r_refdef.nearclip, r_refdef.farclip, customclipplane); R_Mesh_SetRenderTargets(fbo, depthtexture, colortexture, NULL, NULL, NULL); R_SetViewport(&r_refdef.view.viewport); + +#ifdef HAVE_DPSOFTRAST if (r_refdef.view.useclipplane && allowwaterclippingplane && vid.renderpath == RENDERPATH_SOFT) { matrix4x4_t mvpmatrix, invmvpmatrix, invtransmvpmatrix; @@ -5592,6 +5604,7 @@ void R_SetupView(qboolean allowwaterclippingplane, int fbo, rtexture_t *depthtex Matrix4x4_Transform4(&invtransmvpmatrix, plane, screenplane); DPSOFTRAST_ClipPlane(screenplane[0], screenplane[1], screenplane[2], screenplane[3]); } +#endif } void R_EntityMatrix(const matrix4x4_t *matrix) @@ -5625,8 +5638,10 @@ void R_EntityMatrix(const matrix4x4_t *matrix) qglLoadMatrixf(gl_modelview16f);CHECKGLERROR break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_UniformMatrix4fv(DPSOFTRAST_UNIFORM_ModelViewProjectionMatrixM1, 1, false, gl_modelviewprojection16f); DPSOFTRAST_UniformMatrix4fv(DPSOFTRAST_UNIFORM_ModelViewMatrixM1, 1, false, gl_modelview16f); +#endif break; case RENDERPATH_GL20: case RENDERPATH_GLES2: @@ -6195,7 +6210,9 @@ static void R_Water_ProcessPlanes(int fbo, rtexture_t *depthtexture, rtexture_t } } +#ifdef HAVE_DPSOFTRAST if(vid.renderpath==RENDERPATH_SOFT) DPSOFTRAST_ClipPlane(0, 0, 0, 1); +#endif r_fb.water.renderingscene = false; r_refdef.view = originalview; R_ResetViewRendering3D(fbo, depthtexture, colortexture); @@ -6800,6 +6817,7 @@ static void R_BlendView(int fbo, rtexture_t *depthtexture, rtexture_t *colortext Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST R_Mesh_PrepareVertices_Mesh_Arrays(4, r_screenvertex3f, NULL, NULL, NULL, NULL, r_fb.screentexcoord2f, r_fb.bloomtexcoord2f); R_SetupShader_SetPermutationSoft(SHADERMODE_POSTPROCESS, permutation); R_Mesh_TexBind(GL20TU_FIRST , r_fb.colortexture); @@ -6814,6 +6832,7 @@ static void R_BlendView(int fbo, rtexture_t *depthtexture, rtexture_t *colortext DPSOFTRAST_Uniform1f(DPSOFTRAST_UNIFORM_Saturation , r_glsl_saturation.value); DPSOFTRAST_Uniform2f(DPSOFTRAST_UNIFORM_PixelToScreenTexCoord, 1.0f/vid.width, 1.0f/vid.height); DPSOFTRAST_Uniform4f(DPSOFTRAST_UNIFORM_BloomColorSubtract , r_bloom_colorsubtract.value, r_bloom_colorsubtract.value, r_bloom_colorsubtract.value, 0.0f); +#endif break; default: break; diff --git a/gl_textures.c b/gl_textures.c index 3fb7141..b217385 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -395,8 +395,10 @@ void R_FreeTexture(rtexture_t *rt) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST if (glt->texnum) DPSOFTRAST_Texture_Free(glt->texnum); +#endif break; } @@ -594,11 +596,13 @@ static void GL_TextureMode_f (void) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST // change all the existing texture objects for (pool = gltexturepoolchain;pool;pool = pool->next) for (glt = pool->gltchain;glt;glt = glt->chain) if (glt->texnum && (gl_filter_force || !(glt->flags & (TEXF_FORCENEAREST | TEXF_FORCELINEAR)))) DPSOFTRAST_Texture_Filter(glt->texnum, (glt->flags & TEXF_MIPMAP) ? dpsoftrast_filter_mipmap : dpsoftrast_filter_nomipmap); +#endif break; } } @@ -1196,7 +1200,9 @@ static void R_UploadPartialTexture(gltexture_t *glt, const unsigned char *data, Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_Texture_UpdatePartial(glt->texnum, 0, data, fragx, fragy, fragwidth, fragheight); +#endif break; } } @@ -1508,6 +1514,7 @@ static void R_UploadFullTexture(gltexture_t *glt, const unsigned char *data) Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST switch(glt->texturetype) { case GLTEXTURETYPE_2D: @@ -1556,6 +1563,7 @@ static void R_UploadFullTexture(gltexture_t *glt, const unsigned char *data) DPSOFTRAST_Texture_Filter(glt->texnum, dpsoftrast_filter_mipmap); else DPSOFTRAST_Texture_Filter(glt->texnum, dpsoftrast_filter_nomipmap); +#endif break; } } @@ -1834,6 +1842,7 @@ static rtexture_t *R_SetupTexture(rtexturepool_t *rtexturepool, const char *iden Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST { int tflags = 0; switch(textype) @@ -1860,6 +1869,7 @@ static rtexture_t *R_SetupTexture(rtexturepool_t *rtexturepool, const char *iden if (glt->flags & TEXF_CLAMP) tflags |= DPSOFTRAST_TEXTURE_FLAG_CLAMPTOEDGE; glt->texnum = DPSOFTRAST_Texture_New(tflags, glt->tilewidth, glt->tileheight, glt->tiledepth); } +#endif break; } @@ -1995,6 +2005,7 @@ rtexture_t *R_LoadTextureRenderBuffer(rtexturepool_t *rtexturepool, const char * Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST { int tflags = 0; switch(textype) @@ -2009,6 +2020,7 @@ rtexture_t *R_LoadTextureRenderBuffer(rtexturepool_t *rtexturepool, const char * } glt->texnum = DPSOFTRAST_Texture_New(tflags, glt->tilewidth, glt->tileheight, glt->tiledepth); } +#endif break; } @@ -2682,7 +2694,9 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST glt->texnum = DPSOFTRAST_Texture_New(((glt->flags & TEXF_CLAMP) ? DPSOFTRAST_TEXTURE_FLAG_CLAMPTOEDGE : 0) | (dds_miplevels > 1 ? DPSOFTRAST_TEXTURE_FLAG_MIPMAP : 0), glt->tilewidth, glt->tileheight, glt->tiledepth); +#endif break; } @@ -2747,12 +2761,14 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST if (bytesperblock) Con_DPrintf("FIXME SOFT %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); else DPSOFTRAST_Texture_UpdateFull(glt->texnum, upload_mippixels); // DPSOFTRAST calculates its own mipmaps mip = dds_miplevels; +#endif break; } if(upload_mippixels != mippixels) @@ -2828,6 +2844,7 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__); break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST if (glt->flags & TEXF_FORCELINEAR) DPSOFTRAST_Texture_Filter(glt->texnum, DPSOFTRAST_TEXTURE_FILTER_LINEAR); else if (glt->flags & TEXF_FORCENEAREST) @@ -2836,6 +2853,7 @@ rtexture_t *R_LoadTextureDDSFile(rtexturepool_t *rtexturepool, const char *filen DPSOFTRAST_Texture_Filter(glt->texnum, dpsoftrast_filter_mipmap); else DPSOFTRAST_Texture_Filter(glt->texnum, dpsoftrast_filter_nomipmap); +#endif break; } diff --git a/makefile b/makefile index 565dae6..341e826 100644 --- a/makefile +++ b/makefile @@ -45,6 +45,18 @@ else CMD_RM=$(CMD_UNIXRM) endif +# CPU-specifics +OBJ_CPU = + +ifeq ($(DP_MAKE_TARGET),mingw) + # MinGW is always x86 + OBJ_CPU += $(OBJ_X86) +else +ifneq (,$(filter i%86 x86_64,$(DP_MACHINE))) + OBJ_CPU += $(OBJ_X86) +endif +endif + # 64bits AMD CPUs use another lib directory ifeq ($(DP_MACHINE),x86_64) UNIX_X11LIBPATH:=/usr/X11R6/lib64 diff --git a/makefile.inc b/makefile.inc index cf611d7..e233ff5 100644 --- a/makefile.inc +++ b/makefile.inc @@ -116,7 +116,6 @@ OBJ_COMMON= \ csprogs.o \ curves.o \ cvar.o \ - dpsoftrast.o \ dpvsimpledecode.o \ filematch.o \ fractalnoise.o \ @@ -142,7 +141,6 @@ OBJ_COMMON= \ mdfour.o \ menu.o \ meshqueue.o \ - mod_skeletal_animatevertices_sse.o \ mod_skeletal_animatevertices_generic.o \ model_alias.o \ model_brush.o \ @@ -179,11 +177,15 @@ OBJ_COMMON= \ world.o \ zone.o +OBJ_X86 = \ + dpsoftrast.o \ + mod_skeletal_animatevertices_sse.o + # note that builddate.c is very intentionally not compiled to a .o before # being linked, because it should be recompiled every time an executable is # built to give the executable a proper date string -OBJ_SV= builddate.c sys_linux.o vid_null.o thread_null.o $(OBJ_SND_NULL) $(OBJ_NOCD) $(OBJ_COMMON) -OBJ_SDL= builddate.c sys_sdl.o vid_sdl.o thread_sdl.o $(OBJ_SND_COMMON) snd_sdl.o cd_sdl.o $(OBJ_COMMON) +OBJ_SV= builddate.c sys_linux.o vid_null.o thread_null.o $(OBJ_SND_NULL) $(OBJ_NOCD) $(OBJ_COMMON) $(OBJ_CPU) +OBJ_SDL= builddate.c sys_sdl.o vid_sdl.o thread_sdl.o $(OBJ_SND_COMMON) snd_sdl.o cd_sdl.o $(OBJ_COMMON) $(OBJ_CPU) # Compilation @@ -230,7 +232,7 @@ LDFLAGS_RELEASE=$(OPTIM_RELEASE) -DSVNREVISION=`{ test -d .svn && svnversion; } ##### UNIX specific variables ##### -OBJ_GLX= builddate.c sys_linux.o vid_glx.o thread_pthread.o keysym2ucs.o $(OBJ_SOUND) $(OBJ_CD) $(OBJ_COMMON) +OBJ_GLX= builddate.c sys_linux.o vid_glx.o thread_pthread.o keysym2ucs.o $(OBJ_SOUND) $(OBJ_CD) $(OBJ_COMMON) $(OBJ_CPU) LDFLAGS_UNIXCOMMON=\ -lm \ @@ -320,7 +322,7 @@ LDFLAGS_MACOSXCL=$(LDFLAGS_UNIXCOMMON) -ldl -framework IOKit -framework Carbon $ LDFLAGS_MACOSXSV=$(LDFLAGS_UNIXCOMMON) -ldl LDFLAGS_MACOSXSDL=$(LDFLAGS_UNIXCOMMON) -ldl -framework IOKit $(SDLCONFIG_STATICLIBS) SDLMain.m -OBJ_AGL= builddate.c sys_linux.o vid_agl.o thread_null.o $(OBJ_SOUND) $(OBJ_CD) $(OBJ_COMMON) +OBJ_AGL= builddate.c sys_linux.o vid_agl.o thread_null.o $(OBJ_SOUND) $(OBJ_CD) $(OBJ_COMMON) $(OBJ_CPU) EXE_MACOSXCL=darkplaces-agl EXE_MACOSXCLNEXUIZ=nexuiz-agl @@ -360,7 +362,7 @@ OBJ_WINCD=cd_win.o #if you want no CD audio #OBJ_WINCD=$(OBJ_NOCD) -OBJ_WGL= builddate.c sys_win.o vid_wgl.o thread_null.o $(OBJ_SND_WIN) $(OBJ_WINCD) $(OBJ_COMMON) +OBJ_WGL= builddate.c sys_win.o vid_wgl.o thread_null.o $(OBJ_SND_WIN) $(OBJ_WINCD) $(OBJ_COMMON) $(OBJ_CPU) # Link # see LDFLAGS_WINCOMMON in makefile diff --git a/quakedef.h b/quakedef.h index 6bd5ddf..4fb1df5 100644 --- a/quakedef.h +++ b/quakedef.h @@ -499,6 +499,11 @@ qboolean Sys_HaveSSE2(void); #include "palette.h" +#ifdef SSE_POSSIBLE +/* The software rasterizer requires SSE */ +# define HAVE_DPSOFTRAST +#endif + /// incremented every frame, never reset extern int host_framecount; /// not bounded in any way, changed at start of every frame, never reset diff --git a/vid_glx.c b/vid_glx.c index c066555..9e6ed8f 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -663,7 +663,9 @@ static void HandleEvents(void) else Con_DPrintf("Updating to ConfigureNotify resolution %dx%d\n", vid.width, vid.height); +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_Flush(); +#endif if(vid.softdepthpixels) free(vid.softdepthpixels); @@ -904,6 +906,7 @@ void VID_Finish (void) switch(vid.renderpath) { case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST if(vidx11_shmevent >= 0) { vidx11_ximage_pos = !vidx11_ximage_pos; vid.softpixels = (unsigned int *) vidx11_ximage[vidx11_ximage_pos]->data; @@ -926,6 +929,7 @@ void VID_Finish (void) DPSOFTRAST_Finish(); XPutImage(vidx11_display, win, vidx11_gc, vidx11_ximage[vidx11_ximage_pos], 0, 0, 0, 0, vid.width, vid.height); } +#endif break; case RENDERPATH_GL11: @@ -1009,6 +1013,7 @@ static void VID_BuildGLXAttrib(int *attrib, qboolean stencil, qboolean stereobuf *attrib++ = None; } +#ifdef HAVE_DPSOFTRAST static qboolean VID_InitModeSoft(viddef_mode_t *mode) { int i, j; @@ -1307,6 +1312,7 @@ static qboolean VID_InitModeSoft(viddef_mode_t *mode) return true; } +#endif static qboolean VID_InitModeGL(viddef_mode_t *mode) { @@ -1649,7 +1655,7 @@ static qboolean VID_InitModeGL(viddef_mode_t *mode) qboolean VID_InitMode(viddef_mode_t *mode) { -#ifdef SSE_POSSIBLE +#ifdef HAVE_DPSOFTRAST if (vid_soft.integer) return VID_InitModeSoft(mode); else diff --git a/vid_sdl.c b/vid_sdl.c index b3d46ba..e62433a 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -2197,6 +2197,7 @@ extern cvar_t gl_info_version; extern cvar_t gl_info_platform; extern cvar_t gl_info_driver; +#ifdef HAVE_DPSOFTRAST static qboolean VID_InitModeSoft(viddef_mode_t *mode) { #if SDL_MAJOR_VERSION == 1 @@ -2293,12 +2294,13 @@ static qboolean VID_InitModeSoft(viddef_mode_t *mode) #endif return true; } +#endif qboolean VID_InitMode(viddef_mode_t *mode) { if (!SDL_WasInit(SDL_INIT_VIDEO) && SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) Sys_Error ("Failed to init SDL video subsystem: %s", SDL_GetError()); -#ifdef SSE_POSSIBLE +#ifdef HAVE_DPSOFTRAST if (vid_soft.integer) return VID_InitModeSoft(mode); else @@ -2408,6 +2410,7 @@ void VID_Finish (void) #endif break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_Finish(); #if SDL_MAJOR_VERSION == 1 // if (!r_test.integer) @@ -2422,6 +2425,7 @@ void VID_Finish (void) SDL_UpdateWindowSurface(window); } #endif +#endif break; case RENDERPATH_D3D9: case RENDERPATH_D3D10: diff --git a/vid_shared.c b/vid_shared.c index b141908..e47c34b 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -1688,7 +1688,7 @@ static dllhandle_t xinputdll_dll = NULL; void VID_Shared_Init(void) { -#ifdef SSE_POSSIBLE +#ifdef HAVE_DPSOFTRAST if (Sys_HaveSSE2()) { Con_Printf("DPSOFTRAST available (SSE2 instructions detected)\n"); @@ -2057,6 +2057,7 @@ size_t VID_SortModes(vid_mode_t *modes, size_t count, qboolean usebpp, qboolean return count; } +#ifdef HAVE_DPSOFTRAST void VID_Soft_SharedSetup(void) { gl_platform = "DPSOFTRAST"; @@ -2123,3 +2124,4 @@ void VID_Soft_SharedSetup(void) // clear to black (loading plaque will be seen over this) GL_Clear(GL_COLOR_BUFFER_BIT, NULL, 1.0f, 128); } +#endif diff --git a/vid_wgl.c b/vid_wgl.c index d6e8e8c..df72839 100644 --- a/vid_wgl.c +++ b/vid_wgl.c @@ -305,11 +305,13 @@ void VID_Finish (void) case RENDERPATH_D3D11: break; case RENDERPATH_SOFT: +#ifdef HAVE_DPSOFTRAST DPSOFTRAST_Finish(); // baseDC = GetDC(mainwindow); BitBlt(baseDC, 0, 0, vid.width, vid.height, vid_softhdc, 0, 0, SRCCOPY); // ReleaseDC(mainwindow, baseDC); // baseDC = NULL; +#endif break; } } @@ -1565,6 +1567,7 @@ qboolean VID_InitModeDX(viddef_mode_t *mode, int version) } #endif +#ifdef HAVE_DPSOFTRAST qboolean VID_InitModeSOFT(viddef_mode_t *mode) { int i; @@ -1844,10 +1847,11 @@ qboolean VID_InitModeSOFT(viddef_mode_t *mode) return true; } +#endif qboolean VID_InitMode(viddef_mode_t *mode) { -#ifdef SSE_POSSIBLE +#ifdef HAVE_DPSOFTRAST if (vid_soft.integer) return VID_InitModeSOFT(mode); #endif debian/patches/0019-If-linking-libpng-conventionally-use-the-png_jmpbuf-.patch0000644000000000000000000000121312264625047024306 0ustar From: Simon McVittie Date: Sat, 21 Jan 2012 22:19:29 +0000 Subject: If linking libpng conventionally, use the png_jmpbuf macro This is necessary to compile against libpng 1.5.x. Origin: vendor, Debian --- image_png.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image_png.c b/image_png.c index a3afb3c..5c9d057 100644 --- a/image_png.c +++ b/image_png.c @@ -44,7 +44,7 @@ my_setjmp (jmp_buf env) #ifdef LINK_TO_PNG -#define qpng_setjmp(png) my_setjmp (png->jmpbuf) +#define qpng_setjmp(png) my_setjmp (png_jmpbuf (png)) #define qpng_set_sig_bytes png_set_sig_bytes #define qpng_sig_cmp png_sig_cmp debian/patches/0020-If-linking-libpng-normally-use-its-header-to-get-the.patch0000644000000000000000000000766412264625047024125 0ustar From: Simon McVittie Date: Sat, 21 Jan 2012 22:23:03 +0000 Subject: If linking libpng normally, use its header to get the png_uint_32 type This avoids needing to work around ABI differences, particularly in newer versions of libpng: if we know which version we're using, it's all simpler. Origin: vendor, Debian --- image_png.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/image_png.c b/image_png.c index 5c9d057..65047ef 100644 --- a/image_png.c +++ b/image_png.c @@ -82,6 +82,16 @@ my_setjmp (jmp_buf env) #else +/* + * Without LINK_TO_PNG, DarkPlaces assumes libpng 1.2 (in which png_uint_32 + * is always unsigned long even if that's 64-bit), and then attempts + * to correct for it if it's actually 1.4 or 1.5 (where png_uint_32 is + * unsigned int if that's at least 32 bits, or unsigned long otherwise). + * + * With LINK_TO_PNG we use the library API/ABI as intended. + */ +typedef unsigned long png_uint_32; + typedef void *png_structp; typedef void **png_structpp; typedef void *png_infop; @@ -100,7 +110,7 @@ static void (*qpng_set_palette_to_rgb) (void*); static void (*qpng_set_tRNS_to_alpha) (void*); static void (*qpng_set_gray_to_rgb) (void*); static void (*qpng_set_filler) (void*, unsigned int, int); -static void (*qpng_set_IHDR) (void*, void*, unsigned long, unsigned long, int, int, int, int, int); +static void (*qpng_set_IHDR) (void*, void*, png_uint_32, png_uint_32, int, int, int, int, int); static void (*qpng_set_packing) (void*); static void (*qpng_set_bgr) (void*); static int (*qpng_set_interlace_handling) (void*); @@ -115,7 +125,7 @@ static unsigned int (*qpng_get_valid) (void*, void*, unsigned int); static unsigned int (*qpng_get_rowbytes) (void*, void*); static unsigned char (*qpng_get_channels) (void*, void*); static unsigned char (*qpng_get_bit_depth) (void*, void*); -static unsigned int (*qpng_get_IHDR) (void*, void*, unsigned long*, unsigned long*, int *, int *, int *, int *, int *); +static png_uint_32 (*qpng_get_IHDR) (void*, void*, png_uint_32 *, png_uint_32 *, int *, int *, int *, int *, int *); static unsigned int (*qpng_access_version_number) (void); // FIXME is this return type right? It is a png_uint_32 in libpng static void (*qpng_write_info) (void*, void*); static void (*qpng_write_row) (void*, unsigned char*); @@ -300,8 +310,8 @@ static struct int BitDepth; int BytesPerPixel; int ColorType; - unsigned long Height; // retarded libpng 1.2 pngconf.h uses long (64bit/32bit depending on arch) - unsigned long Width; // retarded libpng 1.2 pngconf.h uses long (64bit/32bit depending on arch) + png_uint_32 Height; + png_uint_32 Width; int Interlace; int Compression; int Filter; @@ -419,11 +429,16 @@ unsigned char *PNG_LoadImage_BGRA (const unsigned char *raw, int filesize, int * qpng_read_info(png, pnginfo); qpng_get_IHDR(png, pnginfo, &my_png.Width, &my_png.Height,&my_png.BitDepth, &my_png.ColorType, &my_png.Interlace, &my_png.Compression, &my_png.Filter); +#ifndef LINK_TO_PNG // this check guards against pngconf.h with unsigned int *width/height parameters on big endian systems by detecting the strange values and shifting them down 32bits // (if it's little endian the unwritten bytes are the most significant // ones and we don't worry about that) // // this is only necessary because of retarded 64bit png_uint_32 types in libpng 1.2, which can (conceivably) vary by platform + // + // If LINK_TO_PNG is defined, we should never need this, + // because we get the correct definition of png_uint_32 from the + // system libpng header. #if LONG_MAX > 4000000000 if (my_png.Width > LONG_MAX || my_png.Height > LONG_MAX) { @@ -431,6 +446,7 @@ unsigned char *PNG_LoadImage_BGRA (const unsigned char *raw, int filesize, int * my_png.Height >>= 32; } #endif +#endif if (my_png.ColorType == PNG_COLOR_TYPE_PALETTE) qpng_set_palette_to_rgb(png); debian/patches/0021-If-linking-libpng-in-the-normal-way-use-its-actual-v.patch0000644000000000000000000000422512264625047024040 0ustar From: Simon McVittie Date: Sat, 21 Jan 2012 22:27:33 +0000 Subject: If linking libpng in the normal way, use its actual version number Also avoid redefining more stuff that's normally in the libpng headers. Origin: vendor, Debian --- image_png.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/image_png.c b/image_png.c index 65047ef..76750f2 100644 --- a/image_png.c +++ b/image_png.c @@ -271,6 +271,8 @@ void PNG_CloseLibrary (void) ================================================================= */ +#ifndef LINK_TO_PNG + #define PNG_LIBPNG_VER_STRING_12 "1.2.4" #define PNG_LIBPNG_VER_STRING_14 "1.4.0" #define PNG_LIBPNG_VER_STRING_15 "1.5.0" @@ -291,6 +293,8 @@ void PNG_CloseLibrary (void) #define PNG_INFO_tRNS 0x0010 +#endif + // this struct is only used for status information during loading static struct { @@ -377,11 +381,16 @@ unsigned char *PNG_LoadImage_BGRA (const unsigned char *raw, int filesize, int * // png_sig_cmp is not fully const-correct if(qpng_sig_cmp((unsigned char *) raw, 0, filesize)) return NULL; + png = (void *)qpng_create_read_struct( +#ifdef LINK_TO_PNG + PNG_LIBPNG_VER_STRING, +#else (qpng_access_version_number() / 100 == 102) ? PNG_LIBPNG_VER_STRING_12 : (qpng_access_version_number() / 100 == 104) ? PNG_LIBPNG_VER_STRING_14 : (qpng_access_version_number() / 100 == 105) ? PNG_LIBPNG_VER_STRING_15 : - PNG_LIBPNG_VER_STRING_16, // nasty hack... whatever + PNG_LIBPNG_VER_STRING_16, // nasty hack to support both libpng12 and libpng14 +#endif 0, PNG_error_fn, PNG_warning_fn ); if(!png) @@ -569,10 +578,14 @@ qboolean PNG_SaveImage_preflipped (const char *filename, int width, int height, #endif png = qpng_create_write_struct( +#ifdef LINK_TO_PNG + PNG_LIBPNG_VER_STRING, +#else (qpng_access_version_number() / 100 == 102) ? PNG_LIBPNG_VER_STRING_12 : (qpng_access_version_number() / 100 == 104) ? PNG_LIBPNG_VER_STRING_14 : (qpng_access_version_number() / 100 == 105) ? PNG_LIBPNG_VER_STRING_15 : PNG_LIBPNG_VER_STRING_16, // nasty hack to support both libpng12 and libpng14 +#endif 0, PNG_error_fn, PNG_warning_fn ); if(!png) debian/patches/0022-Add-support-for-disabling-libavw.patch0000644000000000000000000000376112264625047020440 0ustar From: Simon McVittie Date: Sat, 18 May 2013 00:36:31 +0100 Subject: 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. Origin: vendor, Debian Forwarded: no --- cl_video_libavw.c | 20 ++++++++++++++++++++ makefile | 4 ++++ makefile.inc | 1 + 3 files changed, 25 insertions(+) diff --git a/cl_video_libavw.c b/cl_video_libavw.c index 7924127..6ccdb54 100644 --- a/cl_video_libavw.c +++ b/cl_video_libavw.c @@ -24,6 +24,25 @@ // LordHavoc: for some reason this is being #include'd rather than treated as its own file... // LordHavoc: adapted to not require stdint.h as this is not available on MSVC++, using unsigned char instead of uint8_t and fs_offset_t instead of int64_t. +#ifdef DISABLE_AVW + +static qboolean LibAvW_OpenLibrary(void) +{ + return false; +} + +static void *LibAvW_OpenVideo(clvideo_t *video, char *filename, const char **errorstring) +{ + return NULL; +} + + +static void LibAvW_CloseLibrary(void) +{ +} + +#else /* !DISABLE_AVW */ + // scaler type #define LIBAVW_SCALER_BILINEAR 0 #define LIBAVW_SCALER_BICUBIC 1 @@ -384,3 +403,4 @@ static void LibAvW_CloseLibrary(void) Sys_UnloadLibrary(&libavw_dll); } +#endif /* !DISABLE_AVW */ diff --git a/makefile b/makefile index 341e826..01e379f 100644 --- a/makefile +++ b/makefile @@ -319,6 +319,10 @@ else CFLAGS_FS= endif +ifdef DISABLE_AVW +CFLAGS_AVW=-DDISABLE_AVW +endif + ifdef LINK_TO_CURL CFLAGS_CURL=-DLINK_TO_CURL `pkg-config --cflags libcurl` LIB_CURL=`pkg-config --libs libcurl` diff --git a/makefile.inc b/makefile.inc index e233ff5..fcfe1eb 100644 --- a/makefile.inc +++ b/makefile.inc @@ -194,6 +194,7 @@ CFLAGS_COMMON=\ $(CFLAGS_PRELOAD) \ $(CFLAGS_FS) \ $(CFLAGS_WARNINGS) \ + $(CFLAGS_AVW) \ $(CFLAGS_CURL) \ $(CFLAGS_FREETYPE2) \ $(CFLAGS_LIBJPEG) \ debian/patches/0023-Disable-dlopen-support-and-warn-if-it-gets-compiled-.patch0000644000000000000000000000220012264625047024100 0ustar From: Simon McVittie Date: Sat, 18 May 2013 00:42:19 +0100 Subject: Disable dlopen support, and warn if it gets compiled in Forwarded: no, Debian-specific --- sys.h | 2 +- sys_shared.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys.h b/sys.h index 862bdf7..7da82e3 100644 --- a/sys.h +++ b/sys.h @@ -50,7 +50,7 @@ dllfunction_t; * \param handle * \param fcts */ -qboolean Sys_LoadLibrary (const char** dllnames, dllhandle_t* handle, const dllfunction_t *fcts); +qboolean Sys_LoadLibrary (const char** dllnames, dllhandle_t* handle, const dllfunction_t *fcts) __attribute__ ((__warning__ ("in Debian, please link shared libraries at build time"))); void Sys_UnloadLibrary (dllhandle_t* handle); void* Sys_GetProcAddress (dllhandle_t handle, const char* name); diff --git a/sys_shared.c b/sys_shared.c index 10f5a60..b55b29c 100644 --- a/sys_shared.c +++ b/sys_shared.c @@ -6,7 +6,9 @@ #include "quakedef.h" -#define SUPPORTDLL +/* Debian-specific: no dynamic loading please, it breaks versioned dependency + * tracking */ +#undef SUPPORTDLL #ifdef WIN32 # include debian/patches/0024-Disable-gpu-skinning-for-skeletal-models.patch0000644000000000000000000000332412264625047022054 0ustar From: David Bate Date: Sat, 11 Jan 2014 11:08:04 -0600 Subject: 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 http://dev.xonotic.org/issues/1459 --- gl_rmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gl_rmain.c b/gl_rmain.c index 89ecff8..f48654f 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -163,7 +163,7 @@ cvar_t r_viewscale_fpsscaling_stepsize = {CVAR_SAVE, "r_viewscale_fpsscaling_ste cvar_t r_viewscale_fpsscaling_stepmax = {CVAR_SAVE, "r_viewscale_fpsscaling_stepmax", "1.00", "largest adjustment to hit the target framerate (this value prevents wild overshooting of the estimate)"}; cvar_t r_viewscale_fpsscaling_target = {CVAR_SAVE, "r_viewscale_fpsscaling_target", "70", "desired framerate"}; -cvar_t r_glsl_skeletal = {CVAR_SAVE, "r_glsl_skeletal", "1", "render skeletal models faster using a gpu-skinning technique"}; +cvar_t r_glsl_skeletal = {CVAR_SAVE, "r_glsl_skeletal", "0", "render skeletal models faster using a gpu-skinning technique"}; cvar_t r_glsl_deluxemapping = {CVAR_SAVE, "r_glsl_deluxemapping", "1", "use per pixel lighting on deluxemap-compiled q3bsp maps (or a value of 2 forces deluxemap shading even without deluxemaps)"}; cvar_t r_glsl_offsetmapping = {CVAR_SAVE, "r_glsl_offsetmapping", "0", "offset mapping effect (also known as parallax mapping or virtual displacement mapping)"}; cvar_t r_glsl_offsetmapping_steps = {CVAR_SAVE, "r_glsl_offsetmapping_steps", "2", "offset mapping steps (note: too high values may be not supported by your GPU)"}; debian/patches/series0000644000000000000000000000237412264625047012050 0ustar 0001-Split-Unix-CFLAGS-libs-to-one-per-line.patch 0002-Add-support-for-make-LINK_TO_LIBJPEG-1.patch 0003-Add-support-for-make-LINK_TO_ZLIB-1.patch 0004-Add-support-for-LINK_TO_LIBVORBIS-using-pkg-config.patch 0005-Add-LINK_TO_MODPLUG-option.patch 0006-add-LINK_TO_ODE-to-link-against-system-libode.patch 0007-add-LINK_TO_THEORA.patch 0008-Add-LINK_TO_PNG.patch 0009-add-LINK_TO_CURL.patch 0010-Add-LINK_TO_FREETYPE2.patch 0011-Add-support-for-linking-to-system-d0_blind_id-and-d0.patch 0012-Add-support-for-forcing-d0_blind_id-and-d0_rijndael-.patch 0013-Fix-OS-detection-of-darkplaces-makefile-to-not-think.patch 0014-image_png.h-change-name-of-multiple-inclusion-guard-.patch 0015-Be-more-type-safe-when-calling-setjmp-call-the-same-.patch 0016-Be-a-bit-more-type-safe-about-using-libpng.patch 0017-Fix-various-typos-dont-don-t-doesnt-doesn-t-arguemen.patch 0018-Don-t-build-SSE-only-software-rasterizer-on-non-x86-.patch 0019-If-linking-libpng-conventionally-use-the-png_jmpbuf-.patch 0020-If-linking-libpng-normally-use-its-header-to-get-the.patch 0021-If-linking-libpng-in-the-normal-way-use-its-actual-v.patch 0022-Add-support-for-disabling-libavw.patch 0023-Disable-dlopen-support-and-warn-if-it-gets-compiled-.patch 0024-Disable-gpu-skinning-for-skeletal-models.patch debian/rules0000755000000000000000000000463212264625047010263 0ustar #!/usr/bin/make -f include /usr/share/dpkg/default.mk %: dh $@ distro := $(shell lsb_release -is) debian_version := $(shell dpkg-parsechangelog -c1 | sed -ne 's/^Version: //p') DEB_CFLAGS_MAINT_APPEND := \ -Wall \ -Wextra \ -Wstrict-prototypes \ -Wsign-compare \ -Wnested-externs \ -Wpointer-arith \ -Wformat-security \ -Winit-self \ -Wno-missing-field-initializers \ -Wno-unused-parameter \ -fno-strict-aliasing \ $(NULL) DEB_CPPFLAGS_MAINT_APPEND := \ -DSVNREVISION=$(debian_version) \ -DBUILDTYPE=$(distro) \ $(NULL) ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) TARGETS = sdl-release sv-release else TARGETS = sdl-debug sv-debug endif # LDFLAGS_* are used to compile builddate.c, so yes, they do need to include # the CPPFLAGS. override_dh_auto_build: $(MAKE) \ CFLAGS_RELEASE="$(CPPFLAGS) $(CFLAGS)" \ CFLAGS_DEBUG="$(CPPFLAGS) $(CFLAGS)" \ LDFLAGS_RELEASE="$(CPPFLAGS) $(CFLAGS) $(LDFLAGS)" \ LDFLAGS_DEBUG="$(CPPFLAGS) $(CFLAGS) $(LDFLAGS)" \ LINK_TO_CURL=1 \ LINK_TO_FREETYPE2=1 \ LINK_TO_LIBJPEG=1 \ LINK_TO_LIBVORBIS=1 \ LINK_TO_MODPLUG=1 \ LINK_TO_ODE=1 \ LINK_TO_PNG=1 \ LINK_TO_THEORA=1 \ LINK_TO_ZLIB=1 \ DISABLE_OFFSCREEN_GECKO=1 \ DISABLE_D0_BLIND_ID=1 \ DISABLE_D0_RIJNDAEL=1 \ DISABLE_AVW=1 \ STRIP=": do not strip" \ $(TARGETS) override_dh_auto_install: install -d debian/darkplaces/usr/games install darkplaces-sdl debian/darkplaces/usr/games/darkplaces install -d debian/darkplaces-server/usr/games install darkplaces-dedicated debian/darkplaces-server/usr/games/darkplaces-server override_dh_auto_test: : override_dh_strip: dh_strip --dbg-package=darkplaces-dbg # --------------------------------------------------------------------------- # The upstream release ORIG_REL = 0~20130304 # The svn revision corresponding to that release (look in ChangeLog) ORIG_REL_REV = 11925 # The svn revision we actually want ("+svnXXXX" if different) ORIG_REV = 11952 # SUFFIX can be made non-empty for re-repacks ORIG_SUFFIX = ifeq ($(ORIG_REL_REV),$(ORIG_REV)) ORIG_VER := ${ORIG_REL}${ORIG_SUFFIX} else ORIG_VER := ${ORIG_REL}+svn${ORIG_REV}${ORIG_SUFFIX} endif ORIG_EXPORT := -r ${ORIG_REV} svn://svn.icculus.org/twilight/trunk/darkplaces get-orig-source: svn export ${ORIG_EXPORT} darkplaces-${ORIG_VER}.orig rm -rf darkplaces-${ORIG_VER}.orig/snd_3dras* tar -zcvf darkplaces_${ORIG_VER}.orig.tar.gz darkplaces-${ORIG_VER}.orig rm -rf darkplaces-${ORIG_VER}.orig debian/source/0000755000000000000000000000000012264625047010476 5ustar debian/source/format0000644000000000000000000000001412264625047011704 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000021712264625047010227 0ustar version=3 opts="uversionmangle=s/^/0~/,dversionmangle=s/\+svn.*//" \ http://icculus.org/twilight/darkplaces/files/darkplacesengine([\d]+).zip