summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Cholasta2013-11-01 12:04:50 +0100
committerJan Cholasta2013-11-01 12:04:50 +0100
commit3715225d5fbda27839bd81e28e00a65cb66427ae (patch)
treee29406bd81105043e2fd7142073d666c2578bd90
downloadaur-3715225d5fbda27839bd81e28e00a65cb66427ae.tar.gz
Initial commit.
-rw-r--r--.SRCINFO44
-rw-r--r--PKGBUILD110
-rw-r--r--config-update-fix.patch12
-rw-r--r--doom-share-dir.patch11
-rw-r--r--gzdoom.desktop10
-rw-r--r--stack-noexec.patch93
6 files changed, 280 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..72a6d8af3b8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,44 @@
+pkgbase = gzdoom-git
+ pkgdesc = Doom source port based on ZDoom with an OpenGL renderer (git version).
+ pkgver = 20130829
+ pkgrel = 1
+ 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
+ provides = gzdoom
+ conflicts = gzdoom
+ source = gzdoom::git://github.com/coelckers/gzdoom.git
+ source = http://www.fmod.org/download/fmodex/api/Linux/fmodapi42636linux.tar.gz
+ source = config-update-fix.patch
+ source = doom-share-dir.patch
+ source = stack-noexec.patch
+ source = gzdoom.desktop
+ md5sums = SKIP
+ md5sums = 220a54f330bdf3056d6207a0facf2096
+ md5sums = 2fda668ab449b7ca2d75a5b62dae6870
+ md5sums = ed6c7d1175146bedac3f5a59d09d8f4b
+ md5sums = b83081e982b742010df0afe36b4d49b6
+ md5sums = 3f5920d839086c9ad04ed1338c3fb546
+
+pkgname = gzdoom-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..0295cd8ed60
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,110 @@
+# 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-git
+pkgver=20130829
+pkgrel=1
+pkgdesc="Doom source port based on ZDoom with an OpenGL renderer (git version)."
+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')
+provides=('gzdoom')
+conflicts=('gzdoom')
+source=(gzdoom::git://github.com/coelckers/gzdoom.git \
+ http://www.fmod.org/download/fmodex/api/Linux/fmodapi${_fmodver}${_fmodarch}.tar.gz \
+ config-update-fix.patch \
+ doom-share-dir.patch \
+ stack-noexec.patch \
+ gzdoom.desktop)
+md5sums=('SKIP'
+ '220a54f330bdf3056d6207a0facf2096'
+ '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
+
+pkgver() {
+ date +%Y%m%d
+}
+
+prepare() {
+ cd gzdoom
+
+ 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" libfmodex.so
+
+ cmake -DFMOD_INCLUDE_DIR="$srcdir/fmodapi${_fmodver}${_fmodarch}/api/inc" \
+ -DFMOD_LIBRARY=libfmodex.so \
+ -DCMAKE_C_FLAGS="$CFLAGS -DSHARE_DIR=\\\"$_sharedir\\\"" \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS -DSHARE_DIR=\\\"$_sharedir\\\"" \
+ -DCMAKE_INSTALL_RPATH=$_libdir \
+ -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 \
+ -DCMAKE_SKIP_BUILD_RPATH=1 \
+ .
+ make
+
+ convert "src/win32/icon1.ico[2]" gzdoom.png
+}
+
+package() {
+ cd gzdoom
+
+ install -Dm755 libfmodex.so "$pkgdir/$_libdir/libfmodex.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 00000000000..8dffee29592
--- /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 00000000000..8675694bf81
--- /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/gzdoom.desktop b/gzdoom.desktop
new file mode 100644
index 00000000000..41c576528b0
--- /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 00000000000..c903e79dcf5
--- /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