# Maintainer: Kay pkgname=gzdoom pkgver=4.14.0 pkgrel=2 pkgdesc='Feature centric port for all Doom engine games' arch=('amd64' 'arm64') url='http://www.zdoom.org/' license=('BSD' 'GPL3' 'LGPL3') depends=('hicolor-icon-theme' 'libgl1' 'libjpeg62-turbo' 'libopenal1' 'libsdl2-2.0-0' 'zmusic>=1.1.14' 'vulkan-icd' 'libgtk-3-0') makedepends=('g++' 'make' 'cmake' 'libsdl2-dev' 'git' 'zlib1g-dev' 'libbz2-dev' 'libjpeg-dev' 'libfluidsynth-dev' 'libgme-dev' 'libopenal-dev' 'libmpg123-dev' 'libsndfile1-dev' 'libgtk-3-dev' 'timidity' 'nasm' 'libgl1-mesa-dev' 'tar' 'libglew-dev' 'libvulkan-dev' 'libvpx-dev') _srcname=gzdoom-${pkgver} source=("${_srcname}.tar.gz::https://github.com/ZDoom/gzdoom/archive/g${pkgver}.tar.gz" 'gzdoom.desktop' '0000-fix-format-security-error.patch') optdepends=('blasphemer-wad: Blasphemer (free Heretic) game data' 'chexquest3-wad: Chex Quest 3 game data' 'doom1-wad: Doom shareware game data' 'freedm: FreeDM game data' 'freedoom: Freedoom game data' '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)' 'strife0-wad: Strife shareware game data' 'square1-wad: The Adventures of Square, Episode 1 game data' 'urbanbrawl-wad: Urban Brawl: Action Doom 2 game data' 'x11-utils: crash dialog (other)') sha256sums=('fb887b196859fe4b4696f5daffe93ea2840c637e887526a5ca53ce356b52b04c' '59122e670f72aa2531aff370e7aaab2d886a7642e79e91f27a533d3b4cad4f6d' 'd414fe125d6f19992868c547e3aeb7f3a50bed4b28666ab717c102cb269e8d5b') prepare() { cd gzdoom-g${pkgver} patch -i "$srcdir"/0000-fix-format-security-error.patch -p 1 } build() { cd gzdoom-g${pkgver} mkdir -p build cmake -B build \ -D CMAKE_BUILD_TYPE=Release \ -D CMAKE_CXX_FLAGS="${CXXFLAGS} -ffile-prefix-map=\"$PWD\"=. -DSHARE_DIR=\\\"/usr/share/gzdoom\\\"" \ -D DYN_GTK=OFF \ -D DYN_OPENAL=OFF make -C build } package() { cd gzdoom-g${pkgver} install build/gzdoom -t "$pkgdir"/usr/bin -D install build/{game_support,gzdoom}.pk3 -t "$pkgdir"/usr/share/gzdoom -D -m 644 desktop-file-install "$srcdir"/gzdoom.desktop --dir="$pkgdir"/usr/share/applications install docs/{console,rh-log,skins}.* -t "$pkgdir"/usr/share/doc/gzdoom -D -m 644 install build/{brightmaps,game_widescreen_gfx,lights}.pk3 -t "$pkgdir"/usr/share/gzdoom -D -m 644 install build/soundfonts/gzdoom.sf2 -t "$pkgdir"/usr/share/gzdoom/soundfonts -D -m 644 install build/fm_banks/* -t "$pkgdir"/usr/share/gzdoom/fm_banks -D -m 644 install src/posix/zdoom.xpm "$pkgdir"/usr/share/icons/hicolor/256x256/apps/gzdoom.xpm -D -m 644 install docs/licenses/{bsd,fxaa,gdtoa,README}.* -t "$pkgdir"/usr/share/licenses/$pkgname -D -m 644 }