summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Cholasta2013-11-01 12:04:50 +0100
committerJan Cholasta2013-11-01 12:04:50 +0100
commit303bfad136f9ef0e46c002175ff100f3e179768d (patch)
treefab1d807d5ac34a3ef4e32d271444dba6699deb4
downloadaur-303bfad136f9ef0e46c002175ff100f3e179768d.tar.gz
Initial commit.
-rw-r--r--.SRCINFO46
-rw-r--r--PKGBUILD109
-rw-r--r--config-update-fix.patch12
-rw-r--r--doom-share-dir.patch11
-rw-r--r--git-276ca5b7.patch106
-rw-r--r--git-3a477f69.patch52
-rw-r--r--gzdoom.desktop10
-rw-r--r--stack-noexec.patch93
8 files changed, 439 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..597a845a49c0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,46 @@
+pkgbase = gzdoom
+ pkgdesc = Doom source port based on ZDoom with an OpenGL renderer.
+ pkgver = 1.8.2
+ pkgrel = 3
+ url = http://www.osnanet.de/c.oelckers/gzdoom/
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = nasm
+ makedepends = cmake
+ makedepends = git
+ makedepends = imagemagick
+ makedepends = mesa
+ depends = fluidsynth
+ depends = gxmessage
+ depends = sdl
+ depends = glu
+ optdepends = blasphemer: Blasphemer (free Heretic) game data
+ optdepends = chexquest3-wad: Chex Quest 3 game data
+ optdepends = doom1-wad: Doom shareware game data
+ optdepends = freedoom: FreeDoom game data
+ optdepends = hacx-wad: HacX game data
+ optdepends = harmony-wad: Harmony game data
+ optdepends = heretic1-wad: Heretic shareware game data
+ optdepends = hexen1-wad: Hexen demo game data
+ optdepends = strife0-wad: Strife shareware game data
+ optdepends = urbanbrawl-wad: Urban Brawl: Action Doom 2 game data
+ source = gzdoom::git://github.com/coelckers/gzdoom.git#tag=g1.8.2
+ source = http://www.fmod.org/download/fmodex/api/Linux/fmodapi42636linux.tar.gz
+ source = git-3a477f69.patch
+ source = git-276ca5b7.patch
+ source = config-update-fix.patch
+ source = doom-share-dir.patch
+ source = stack-noexec.patch
+ source = gzdoom.desktop
+ md5sums = SKIP
+ md5sums = 355cba00a34eb5f7d027da68b452f6d9
+ md5sums = 3d179ed90288fc1fa0df07ed6c45cf77
+ md5sums = 5824e98be50e63519325ef555aa1ae30
+ md5sums = 2fda668ab449b7ca2d75a5b62dae6870
+ md5sums = ed6c7d1175146bedac3f5a59d09d8f4b
+ md5sums = b83081e982b742010df0afe36b4d49b6
+ md5sums = 3f5920d839086c9ad04ed1338c3fb546
+
+pkgname = gzdoom
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f6e7ce6932f4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,109 @@
+# Contributor: Christoph Zeiler <rabyte*gmail>
+# Contributor: Jan Cholasta <grubber at grubber cz>
+# Maintainer: Jan Cholasta <grubber at grubber cz>
+
+_fmodver=42636
+_fmodarch=linux
+if [[ "$CARCH" == x86_64 ]]; then
+ _fmodarch=linux64
+fi
+
+pkgname=gzdoom
+pkgver=1.8.2
+pkgrel=3
+pkgdesc="Doom source port based on ZDoom with an OpenGL renderer."
+arch=('i686' 'x86_64')
+url="http://www.osnanet.de/c.oelckers/gzdoom/"
+license=('custom')
+depends=('fluidsynth' 'gxmessage' 'sdl' 'glu')
+makedepends=('nasm' 'cmake' 'git' 'imagemagick' 'mesa')
+optdepends=('blasphemer: Blasphemer (free Heretic) game data'
+ 'chexquest3-wad: Chex Quest 3 game data'
+ 'doom1-wad: Doom shareware game data'
+ 'freedoom: FreeDoom game data'
+ 'hacx-wad: HacX game data'
+ 'harmony-wad: Harmony game data'
+ 'heretic1-wad: Heretic shareware game data'
+ 'hexen1-wad: Hexen demo game data'
+ 'strife0-wad: Strife shareware game data'
+ 'urbanbrawl-wad: Urban Brawl: Action Doom 2 game data')
+source=(gzdoom::git://github.com/coelckers/gzdoom.git#tag=g${pkgver}
+ http://www.fmod.org/download/fmodex/api/Linux/fmodapi${_fmodver}${_fmodarch}.tar.gz \
+ git-3a477f69.patch \
+ git-276ca5b7.patch \
+ config-update-fix.patch \
+ doom-share-dir.patch \
+ stack-noexec.patch \
+ gzdoom.desktop)
+md5sums=('SKIP'
+ '355cba00a34eb5f7d027da68b452f6d9'
+ '3d179ed90288fc1fa0df07ed6c45cf77'
+ '5824e98be50e63519325ef555aa1ae30'
+ '2fda668ab449b7ca2d75a5b62dae6870'
+ 'ed6c7d1175146bedac3f5a59d09d8f4b'
+ 'b83081e982b742010df0afe36b4d49b6'
+ '3f5920d839086c9ad04ed1338c3fb546')
+
+if [[ "$CARCH" == i?86 ]]; then
+ md5sums[1]='220a54f330bdf3056d6207a0facf2096'
+elif [[ "$CARCH" == x86_64 ]]; then
+ md5sums[1]='355cba00a34eb5f7d027da68b452f6d9'
+fi
+
+_libdir=/usr/lib/gzdoom
+_sharedir=/usr/share/games/gzdoom
+
+prepare() {
+ cd gzdoom
+
+ patch -p1 <"$srcdir/git-3a477f69.patch"
+ patch -p1 <"$srcdir/git-276ca5b7.patch"
+ patch -p1 <"$srcdir/config-update-fix.patch"
+ patch -p1 <"$srcdir/doom-share-dir.patch"
+ patch -p1 <"$srcdir/stack-noexec.patch"
+
+ sed -i "s|setPluginPath(progdir)|setPluginPath(\"$_libdir\")|" src/sound/fmodsound.cpp
+}
+
+build() {
+ cd gzdoom
+
+ local _fmodlib
+ if [[ "$CARCH" == i?86 ]]; then
+ _fmodlib=libfmodex-${_fmodver:0:1}.${_fmodver:1:2}.${_fmodver:3:2}.so
+ elif [[ "$CARCH" == x86_64 ]]; then
+ _fmodlib=libfmodex64-${_fmodver:0:1}.${_fmodver:1:2}.${_fmodver:3:2}.so
+ fi
+
+ cp "$srcdir/fmodapi${_fmodver}${_fmodarch}/api/lib/$_fmodlib" libgzdoom-fmodex.so
+
+ cmake -DFMOD_INCLUDE_DIR="$srcdir/fmodapi${_fmodver}${_fmodarch}/api/inc" \
+ -DFMOD_LIBRARY=libgzdoom-fmodex.so \
+ -DCMAKE_C_FLAGS="$CFLAGS -DSHARE_DIR=\\\"$_sharedir\\\"" \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS -DSHARE_DIR=\\\"$_sharedir\\\"" \
+ -DCMAKE_SKIP_BUILD_RPATH=1 \
+ .
+ make
+
+ convert "src/win32/icon1.ico[2]" gzdoom.png
+}
+
+package() {
+ cd gzdoom
+
+ install -Dm755 libgzdoom-fmodex.so "$pkgdir/usr/lib/libgzdoom-fmodex.so"
+
+ install -Dm755 gzdoom "$pkgdir/usr/bin/gzdoom"
+ install -Dm755 liboutput_sdl.so "$pkgdir/$_libdir/liboutput_sdl.so"
+ install -Dm644 gzdoom.pk3 "$pkgdir/$_sharedir/gzdoom.pk3"
+ install -Dm644 brightmaps.pk3 "$pkgdir/$_sharedir/brightmaps.pk3"
+ install -Dm644 lights.pk3 "$pkgdir/$_sharedir/lights.pk3"
+ ln -s /usr/share/doom/doom.wad "$pkgdir/$_sharedir/freedoomu.wad"
+ ln -s /usr/share/doom/doom2.wad "$pkgdir/$_sharedir/freedoom.wad"
+ ln -s /usr/share/doom/hexen.wad "$pkgdir/$_sharedir/hexendemo.wad"
+
+ install -Dm644 gzdoom.png "$pkgdir/usr/share/pixmaps/gzdoom.png"
+ install -Dm644 "$srcdir/gzdoom.desktop" "$pkgdir/usr/share/applications/gzdoom.desktop"
+ install -Dm644 docs/BUILDLIC.TXT "$pkgdir/usr/share/licenses/$pkgname/BUILDLIC.TXT"
+ install -Dm644 docs/doomlic.txt "$pkgdir/usr/share/licenses/$pkgname/DOOMLIC.TXT"
+}
diff --git a/config-update-fix.patch b/config-update-fix.patch
new file mode 100644
index 000000000000..8dffee29592c
--- /dev/null
+++ b/config-update-fix.patch
@@ -0,0 +1,12 @@
+diff -ur gzdoom-1.7.00.orig/src/m_misc.cpp gzdoom-1.7.00/src/m_misc.cpp
+--- gzdoom-1.7.00.orig/src/m_misc.cpp 2012-12-29 10:13:37.691978200 +0100
++++ gzdoom-1.7.00/src/m_misc.cpp 2012-12-29 10:15:08.318658023 +0100
+@@ -362,7 +362,7 @@
+ // This can be removed after a release or two
+ // Transfer the old zdoom directory to the new location
+ bool moved = false;
+- FString oldpath = NicePath("~/.zdoom/");
++ FString oldpath = NicePath("~/.gzdoom/");
+ if (stat (oldpath, &extrainfo) != -1)
+ {
+ if (rename(oldpath, path) == -1)
diff --git a/doom-share-dir.patch b/doom-share-dir.patch
new file mode 100644
index 000000000000..8675694bf81a
--- /dev/null
+++ b/doom-share-dir.patch
@@ -0,0 +1,11 @@
+diff -ur gzdoom-1.6.00.orig/src/gameconfigfile.cpp gzdoom-1.6.00/src/gameconfigfile.cpp
+--- gzdoom-1.6.00.orig/src/gameconfigfile.cpp 2012-11-06 15:17:16.674596717 +0100
++++ gzdoom-1.6.00/src/gameconfigfile.cpp 2012-11-06 15:22:53.667933990 +0100
+@@ -140,6 +140,7 @@
+ #else
+ SetValueForKey ("Path", "~/" GAME_DIR, true);
+ SetValueForKey ("Path", SHARE_DIR, true);
++ SetValueForKey ("Path", "/usr/share/doom", true);
+ #endif
+ }
+
diff --git a/git-276ca5b7.patch b/git-276ca5b7.patch
new file mode 100644
index 000000000000..580dd8b2f127
--- /dev/null
+++ b/git-276ca5b7.patch
@@ -0,0 +1,106 @@
+From 276ca5b75bd9729ccc69795597dcc54c50a02e0d Mon Sep 17 00:00:00 2001
+From: Braden Obrzut <admin@maniacsvault.net>
+Date: Wed, 26 Jun 2013 19:01:00 -0400
+Subject: [PATCH] - Fixed compilation on non-Windows systems by removing
+ dependency on src/Linux/platform.h
+
+---
+ src/gl/models/gl_models_md2.cpp | 4 ++--
+ src/gl/system/gl_interface.h | 5 +++++
+ src/gl/system/gl_system.h | 1 -
+ src/gl/system/gl_wipe.cpp | 13 +++++++++++++
+ src/gl/textures/gl_hirestex.cpp | 4 ++--
+ 5 files changed, 22 insertions(+), 5 deletions(-)
+
+diff --git a/src/gl/models/gl_models_md2.cpp b/src/gl/models/gl_models_md2.cpp
+index 95a344c..1ff9862 100644
+--- a/src/gl/models/gl_models_md2.cpp
++++ b/src/gl/models/gl_models_md2.cpp
+@@ -176,7 +176,7 @@ bool FDMDModel::Load(const char * path, int, const char * buffer, int length)
+ // Translate each vertex.
+ for(k = 0, pVtx = pfr->vertices; k < info.numVertices; k++, pVtx++)
+ {
+- UnpackVector(USHORT(pVtx->normal), frame->normals[k].xyz);
++ UnpackVector((unsigned short)(pVtx->normal), frame->normals[k].xyz);
+ for(c = 0; c < 3; c++)
+ {
+ frame->vertices[k].xyz[axis[c]] =
+@@ -208,7 +208,7 @@ bool FDMDModel::Load(const char * path, int, const char * buffer, int length)
+ for(i = 0; i < info.numLODs; i++)
+ for(k = 0; k < lodInfo[i].numTriangles; k++)
+ for(c = 0; c < 3; c++)
+- vertexUsage[SHORT(triangles[i][k].vertexIndices[c])] |= 1 << i;
++ vertexUsage[short(triangles[i][k].vertexIndices[c])] |= 1 << i;
+
+ loaded=true;
+ return true;
+diff --git a/src/gl/system/gl_interface.h b/src/gl/system/gl_interface.h
+index 8766ebc..3d54bf8 100644
+--- a/src/gl/system/gl_interface.h
++++ b/src/gl/system/gl_interface.h
+@@ -5,6 +5,11 @@
+ #define APIENTRY
+ #endif // __APPLE__
+
++#include "basictypes.h"
++#ifndef _WIN32
++typedef bool BOOL;
++#endif
++
+ #ifndef PFNGLMULTITEXCOORD2FPROC
+ typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t);
+ #endif
+diff --git a/src/gl/system/gl_system.h b/src/gl/system/gl_system.h
+index d48b559..5dc6cf5 100644
+--- a/src/gl/system/gl_system.h
++++ b/src/gl/system/gl_system.h
+@@ -88,7 +88,6 @@ inline T max( T a, T b) { return (((a)>(b)) ? (a) : (b)); }
+ #define _access(a,b) access(a,b)
+ #endif
+ #ifndef _WIN32
+-#include "platform.h"
+ #include <SDL.h>
+ #endif
+ #include "gl/system/gl_interface.h"
+diff --git a/src/gl/system/gl_wipe.cpp b/src/gl/system/gl_wipe.cpp
+index f9f73a4..83f5abd 100644
+--- a/src/gl/system/gl_wipe.cpp
++++ b/src/gl/system/gl_wipe.cpp
+@@ -56,6 +56,19 @@
+ #include "gl/textures/gl_material.h"
+ #include "gl/utility/gl_templates.h"
+
++#ifndef _WIN32
++struct POINT {
++ SDWORD x;
++ SDWORD y;
++};
++struct RECT {
++ SDWORD left;
++ SDWORD top;
++ SDWORD right;
++ SDWORD bottom;
++};
++#endif
++
+ EXTERN_CVAR(Bool, gl_vid_compatibility)
+
+ //===========================================================================
+diff --git a/src/gl/textures/gl_hirestex.cpp b/src/gl/textures/gl_hirestex.cpp
+index 423a783..b7824bf 100644
+--- a/src/gl/textures/gl_hirestex.cpp
++++ b/src/gl/textures/gl_hirestex.cpp
+@@ -56,8 +56,8 @@
+ #include "d_main.h"
+ #include "zstring.h"
+
+-#ifdef __GNUC__
+-#include "Linux/platform.h" /* Without this it would fail on _access on line 374 (378 now) */
++#ifndef _WIN32
++#define _access(a,b) access(a,b)
+ #endif
+
+ static int Doom2Wad = -1;
+--
+1.8.3.2
+
diff --git a/git-3a477f69.patch b/git-3a477f69.patch
new file mode 100644
index 000000000000..fa158271e69a
--- /dev/null
+++ b/git-3a477f69.patch
@@ -0,0 +1,52 @@
+From 3a477f6903c0f901fa3973c1d9b9979f9c3a0cfb Mon Sep 17 00:00:00 2001
+From: Christoph Oelckers <coelckers@zdoom.fake>
+Date: Sun, 23 Jun 2013 20:54:21 +0200
+Subject: [PATCH] - DavidPH's patch for Linux compilation.
+
+---
+ src/CMakeLists.txt | 1 +
+ src/sdl/i_main.cpp | 2 +-
+ src/sdl/i_system.cpp | 2 +-
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a77ee7c..6ba8070 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -682,6 +682,7 @@ add_executable( zdoom WIN32
+ g_skill.cpp
+ gameconfigfile.cpp
+ gi.cpp
++ gitinfo.cpp
+ hu_scores.cpp
+ i_net.cpp
+ info.cpp
+diff --git a/src/sdl/i_main.cpp b/src/sdl/i_main.cpp
+index 48395ce..65b992f 100644
+--- a/src/sdl/i_main.cpp
++++ b/src/sdl/i_main.cpp
+@@ -286,7 +286,7 @@ int main (int argc, char **argv)
+
+ char caption[100];
+ mysnprintf(caption, countof(caption), GAMESIG " %s (%s)", GetVersionString(), GetGitTime());
+- SDL_WM_SetCaption(caption);
++ SDL_WM_SetCaption(caption, caption);
+
+ #ifdef __APPLE__
+
+diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp
+index cea3cb1..46e3898 100644
+--- a/src/sdl/i_system.cpp
++++ b/src/sdl/i_system.cpp
+@@ -619,7 +619,7 @@ int I_PickIWad (WadStuff *wads, int numwads, bool showwin, int defaultiwad)
+ FString cmd("kdialog --title \""GAMESIG" ");
+ cmd << GetVersionString() << ": Select an IWAD to use\""
+ " --menu \"ZDoom found more than one IWAD\n"
+- "Select from the list below to determine which one to use:\"");
++ "Select from the list below to determine which one to use:\"";
+
+ for(i = 0; i < numwads; ++i)
+ {
+--
+1.8.3.2
+
diff --git a/gzdoom.desktop b/gzdoom.desktop
new file mode 100644
index 000000000000..41c576528b02
--- /dev/null
+++ b/gzdoom.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Name=GZDoom
+GenericName=Enhanced Doom Engine
+Icon=gzdoom
+Exec=gzdoom %F
+Terminal=false
+Categories=Game;ActionGame;
diff --git a/stack-noexec.patch b/stack-noexec.patch
new file mode 100644
index 000000000000..c903e79dcf5f
--- /dev/null
+++ b/stack-noexec.patch
@@ -0,0 +1,93 @@
+diff -ur gzdoom-1.6.00.orig/src/asm_ia32/a.asm gzdoom-1.6.00/src/asm_ia32/a.asm
+--- gzdoom-1.6.00.orig/src/asm_ia32/a.asm 2012-11-06 15:17:27.061263504 +0100
++++ gzdoom-1.6.00/src/asm_ia32/a.asm 2012-11-06 15:24:25.474601731 +0100
+@@ -810,3 +810,13 @@
+ GLOBAL _rtext_a_end
+ _rtext_a_end:
+ %endif
++
++%ifidn __OUTPUT_FORMAT__,elf
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
++%ifidn __OUTPUT_FORMAT__,elf32
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
++%ifidn __OUTPUT_FORMAT__,elf64
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
+diff -ur gzdoom-1.6.00.orig/src/asm_ia32/misc.asm gzdoom-1.6.00/src/asm_ia32/misc.asm
+--- gzdoom-1.6.00.orig/src/asm_ia32/misc.asm 2012-11-06 15:17:27.064596838 +0100
++++ gzdoom-1.6.00/src/asm_ia32/misc.asm 2012-11-06 15:24:25.474601731 +0100
+@@ -198,3 +198,13 @@
+ pop ebx
+ emms
+ ret
++
++%ifidn __OUTPUT_FORMAT__,elf
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
++%ifidn __OUTPUT_FORMAT__,elf32
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
++%ifidn __OUTPUT_FORMAT__,elf64
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
+diff -ur gzdoom-1.6.00.orig/src/asm_ia32/tmap.asm gzdoom-1.6.00/src/asm_ia32/tmap.asm
+--- gzdoom-1.6.00.orig/src/asm_ia32/tmap.asm 2012-11-06 15:17:27.061263504 +0100
++++ gzdoom-1.6.00/src/asm_ia32/tmap.asm 2012-11-06 15:24:25.474601731 +0100
+@@ -1891,3 +1891,13 @@
+ selfmod rtext_start, rtext_end
+ call setpitch3
+ jmp setvlinebpl_
++
++%ifidn __OUTPUT_FORMAT__,elf
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
++%ifidn __OUTPUT_FORMAT__,elf32
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
++%ifidn __OUTPUT_FORMAT__,elf64
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
+diff -ur gzdoom-1.6.00.orig/src/asm_ia32/tmap2.asm gzdoom-1.6.00/src/asm_ia32/tmap2.asm
+--- gzdoom-1.6.00.orig/src/asm_ia32/tmap2.asm 2012-11-06 15:17:27.061263504 +0100
++++ gzdoom-1.6.00/src/asm_ia32/tmap2.asm 2012-11-06 15:24:25.474601731 +0100
+@@ -638,3 +638,13 @@
+ GLOBAL _rtext_tmap2_end
+ _rtext_tmap2_end:
+ %endif
++
++%ifidn __OUTPUT_FORMAT__,elf
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
++%ifidn __OUTPUT_FORMAT__,elf32
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
++%ifidn __OUTPUT_FORMAT__,elf64
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
+diff -ur gzdoom-1.6.00.orig/src/asm_ia32/tmap3.asm gzdoom-1.6.00/src/asm_ia32/tmap3.asm
+--- gzdoom-1.6.00.orig/src/asm_ia32/tmap3.asm 2012-11-06 15:17:27.061263504 +0100
++++ gzdoom-1.6.00/src/asm_ia32/tmap3.asm 2012-11-06 15:24:25.474601731 +0100
+@@ -342,3 +342,13 @@
+ GLOBAL _rtext_tmap3_end
+ _rtext_tmap3_end:
+ %endif
++
++%ifidn __OUTPUT_FORMAT__,elf
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
++%ifidn __OUTPUT_FORMAT__,elf32
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
++%ifidn __OUTPUT_FORMAT__,elf64
++section .note.GNU-stack noalloc noexec nowrite progbits
++%endif
+diff -ur gzdoom-1.6.00.orig/src/asm_x86_64/tmap3.s gzdoom-1.6.00/src/asm_x86_64/tmap3.s
+--- gzdoom-1.6.00.orig/src/asm_x86_64/tmap3.s 2012-11-06 15:17:30.497930211 +0100
++++ gzdoom-1.6.00/src/asm_x86_64/tmap3.s 2012-11-06 15:24:25.474601731 +0100
+@@ -139,3 +139,4 @@
+ .align 16
+
+
++ .section .note.GNU-stack,"",@progbits