# Maintainer: Jan Cholasta # Contributor: Christoph Zeiler # Build without fmodex: _fmodex= # Build with fmodex: #_fmodex=fmodex _name=gzdoom pkgname=${_name} pkgver=2.3.1 pkgrel=1 pkgdesc='Advanced Doom source port with OpenGL support' arch=('i686' 'x86_64') url='http://www.zdoom.org/' license=('BSD' 'custom:BUILD' 'custom:doom' 'custom:dumb' 'LGPL') depends=(${_fmodex:+$(LC_ALL=C pacman -Q $_fmodex | sed -r 's/ /=/;s/-.*$//')} 'hicolor-icon-theme' 'libgl' 'libjpeg' 'libgme' 'libsndfile' 'mpg123' 'sdl2') makedepends=('cmake' 'desktop-file-utils' 'fluidsynth' 'git' 'gtk3' 'imagemagick' 'openal' 'xdg-utils') optdepends=('blasphemer-wad: Blasphemer (free Heretic) game data' 'chexquest3-wad: Chex Quest 3 game data' 'doom1-wad: Doom shareware game data' 'fluidsynth: FluidSynth MIDI device' 'freedm: FreeDM game data' 'freedoom1: Freedoom: Phase 1 game data' 'freedoom2: Freedoom: Phase 2 game data' 'gtk3: IWAD selection dialog' 'gxmessage: crash dialog (GNOME)' 'hacx-wad: HacX game data' 'harmony-wad: Harmony game data' 'heretic1-wad: Heretic shareware game data' 'hexen1-wad: Hexen demo game data' 'kdialog: crash dialog (KDE)' 'openal: OpenAL sound backend' 'strife0-wad: Strife shareware game data' 'square1-wad: The Adventures of Square, Episode 1 game data' 'timidity++: Timidity MIDI device' 'urbanbrawl-wad: Urban Brawl: Action Doom 2 game data' 'xorg-xmessage: crash dialog (other)') source=("${_name}::git://github.com/coelckers/${_name}.git#tag=g${pkgver}" 'launcher.desktop') sha256sums=('SKIP' '59122e670f72aa2531aff370e7aaab2d886a7642e79e91f27a533d3b4cad4f6d') build() { cd $_name local _nofmod _fmodincdir _fmodlib if [[ -n "${_fmodex}" ]]; then _nofmod=OFF _fmodincdir=$(LC_ALL=C pacman -Ql $_fmodex | grep -Eo '/usr/include/fmodex[^/]*/$') _fmodlib=$(LC_ALL=C pacman -Ql $_fmodex | grep -Eo '/usr/lib/libfmodex-[^/]*\.so$') else _nofmod=ON fi cmake -DNO_FMOD=${_nofmod} \ -DGME_INCLUDE_DIR='/usr/include/gme' \ -DFMOD_INCLUDE_DIR="${_fmodincdir}" \ -DFMOD_LIBRARY="${_fmodlib}" \ -DFORCE_INTERNAL_GME=OFF \ -DCMAKE_C_FLAGS="$CFLAGS -DSHARE_DIR=\\\"/usr/share/${_name}\\\"" \ -DCMAKE_CXX_FLAGS="$CXXFLAGS -DSHARE_DIR=\\\"/usr/share/${_name}\\\"" \ -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS -Wl,-z,noexecstack" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DINSTALL_PATH=lib/$_name \ -DINSTALL_PK3_PATH=share/$_name \ . make cat >"${_name}.sh" <