diff options
author | Jan Cholasta | 2013-11-01 12:04:50 +0100 |
---|---|---|
committer | Jan Cholasta | 2013-11-01 12:04:50 +0100 |
commit | 46dda79e6fe3c51c53054a9175c78d47c4824fcd (patch) | |
tree | b374a894aef36c96b74af5fa15ab8eb51554af28 | |
download | aur-46dda79e6fe3c51c53054a9175c78d47c4824fcd.tar.gz |
Initial commit.
-rw-r--r-- | .SRCINFO | 39 | ||||
-rw-r--r-- | PKGBUILD | 101 | ||||
-rw-r--r-- | doom-share-dir.patch | 11 | ||||
-rw-r--r-- | stack-noexec.patch | 93 | ||||
-rw-r--r-- | zdoom.desktop | 10 |
5 files changed, 254 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..30c7804ea1f8 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,39 @@ +pkgbase = zdoom + pkgdesc = An enhanced Doom port with additional support for Heretic, Hexen and Strife. + pkgver = 2.7.1 + pkgrel = 2 + url = http://www.zdoom.org/ + arch = i686 + arch = x86_64 + license = custom + makedepends = nasm + makedepends = cmake + makedepends = imagemagick + makedepends = p7zip + depends = fluidsynth + depends = gxmessage + depends = sdl + 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 + noextract = zdoom-2.7.1-src.7z + source = http://zdoom.org/files/zdoom/2.7/zdoom-2.7.1-src.7z + source = http://www.fmod.org/download/fmodex/api/Linux/fmodapi42636linux.tar.gz + source = doom-share-dir.patch + source = stack-noexec.patch + source = zdoom.desktop + md5sums = 900a13cca9283fa91874210eeef0c839 + md5sums = 355cba00a34eb5f7d027da68b452f6d9 + md5sums = 4885de42e92dc1d5250db561f7ce9537 + md5sums = 7437cdf6478360c87649564e6e1dcb3b + md5sums = 83e47fdae2768da78cd4ac151ec92ad1 + +pkgname = zdoom + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..26064ccf291f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,101 @@ +# Contributor: Andrew Rabert <arabert@nullsum.net> +# 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=zdoom +pkgver=2.7.1 +pkgrel=2 +pkgdesc="An enhanced Doom port with additional support for Heretic, Hexen and Strife." +arch=('i686' 'x86_64') +url="http://www.zdoom.org/" +license=('custom') +depends=('fluidsynth' 'gxmessage' 'sdl') +makedepends=('nasm' 'cmake' 'imagemagick' 'p7zip') +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=(http://zdoom.org/files/zdoom/2.7/zdoom-$pkgver-src.7z \ + http://www.fmod.org/download/fmodex/api/Linux/fmodapi${_fmodver}${_fmodarch}.tar.gz \ + doom-share-dir.patch \ + stack-noexec.patch \ + zdoom.desktop) +noextract=(zdoom-$pkgver-src.7z) +md5sums=('900a13cca9283fa91874210eeef0c839' + '355cba00a34eb5f7d027da68b452f6d9' + '4885de42e92dc1d5250db561f7ce9537' + '7437cdf6478360c87649564e6e1dcb3b' + '83e47fdae2768da78cd4ac151ec92ad1') + +if [[ "$CARCH" == i?86 ]]; then + md5sums[1]='220a54f330bdf3056d6207a0facf2096' +elif [[ "$CARCH" == x86_64 ]]; then + md5sums[1]='355cba00a34eb5f7d027da68b452f6d9' +fi + +_libdir=/usr/lib/zdoom +_sharedir=/usr/share/games/zdoom + +prepare() { + 7z x -y -o$pkgname-$pkgver zdoom-$pkgver-src.7z &>/dev/null + + cd $pkgname-$pkgver + + 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 $pkgname-$pkgver + + 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" libzdoom-fmodex.so + + cmake -DFMOD_INCLUDE_DIR="$srcdir/fmodapi${_fmodver}${_fmodarch}/api/inc" \ + -DFMOD_LIBRARY=libzdoom-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]" zdoom.png +} + +package() { + cd $pkgname-$pkgver + + install -Dm755 libzdoom-fmodex.so "$pkgdir/usr/lib/libzdoom-fmodex.so" + + install -Dm755 zdoom "$pkgdir/usr/bin/zdoom" + install -Dm755 liboutput_sdl.so "$pkgdir/$_libdir/liboutput_sdl.so" + install -Dm644 zdoom.pk3 "$pkgdir/$_sharedir/zdoom.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 zdoom.png "$pkgdir/usr/share/pixmaps/zdoom.png" + install -Dm644 "$srcdir/zdoom.desktop" "$pkgdir/usr/share/applications/zdoom.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/doom-share-dir.patch b/doom-share-dir.patch new file mode 100644 index 000000000000..8481a8bf4ee0 --- /dev/null +++ b/doom-share-dir.patch @@ -0,0 +1,11 @@ +diff -ur a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp +--- a/src/gameconfigfile.cpp 2013-07-03 02:47:30.000000000 +0200 ++++ b/src/gameconfigfile.cpp 2013-07-13 11:43:45.110540335 +0200 +@@ -141,6 +141,7 @@ + #else
+ SetValueForKey ("Path", "~/" GAME_DIR, true);
+ SetValueForKey ("Path", SHARE_DIR, true);
++ SetValueForKey ("Path", "/usr/share/doom", true);
+ #endif
+ }
+
diff --git a/stack-noexec.patch b/stack-noexec.patch new file mode 100644 index 000000000000..f9f76470c1d8 --- /dev/null +++ b/stack-noexec.patch @@ -0,0 +1,93 @@ +diff -ur a/src/asm_ia32/a.asm b/src/asm_ia32/a.asm +--- a/src/asm_ia32/a.asm 2013-07-03 02:47:30.000000000 +0200 ++++ b/src/asm_ia32/a.asm 2013-07-13 11:44:21.263874289 +0200 +@@ -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 a/src/asm_ia32/misc.asm b/src/asm_ia32/misc.asm +--- a/src/asm_ia32/misc.asm 2013-07-03 02:47:30.000000000 +0200 ++++ b/src/asm_ia32/misc.asm 2013-07-13 11:44:21.263874289 +0200 +@@ -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 a/src/asm_ia32/tmap.asm b/src/asm_ia32/tmap.asm +--- a/src/asm_ia32/tmap.asm 2013-07-03 02:47:30.000000000 +0200 ++++ b/src/asm_ia32/tmap.asm 2013-07-13 11:44:21.263874289 +0200 +@@ -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 a/src/asm_ia32/tmap2.asm b/src/asm_ia32/tmap2.asm +--- a/src/asm_ia32/tmap2.asm 2013-07-03 02:47:30.000000000 +0200 ++++ b/src/asm_ia32/tmap2.asm 2013-07-13 11:44:21.263874289 +0200 +@@ -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 a/src/asm_ia32/tmap3.asm b/src/asm_ia32/tmap3.asm +--- a/src/asm_ia32/tmap3.asm 2013-07-03 02:47:30.000000000 +0200 ++++ b/src/asm_ia32/tmap3.asm 2013-07-13 11:44:21.263874289 +0200 +@@ -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 a/src/asm_x86_64/tmap3.s b/src/asm_x86_64/tmap3.s +--- a/src/asm_x86_64/tmap3.s 2013-07-03 02:47:30.000000000 +0200 ++++ b/src/asm_x86_64/tmap3.s 2013-07-13 11:46:03.960542714 +0200 +@@ -139,3 +139,4 @@ + .align 16
+
+
++ .section .note.GNU-stack,"",@progbits
diff --git a/zdoom.desktop b/zdoom.desktop new file mode 100644 index 000000000000..541805c8cbb6 --- /dev/null +++ b/zdoom.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Name=ZDoom +GenericName=Enhanced Doom Engine +Icon=zdoom +Exec=zdoom %F +Terminal=false +Categories=Game;ActionGame; |