57 lines
2.2 KiB
Bash
57 lines
2.2 KiB
Bash
# Template file for 'gzdoom'
|
|
pkgname=gzdoom
|
|
version=4.7.0
|
|
revision=1
|
|
_tagdate=2021-07-25
|
|
_widepix_commit=89dac47dbf874351e2d5a07a0bb33b7d1175ef28
|
|
wrksrc="${pkgname}-g${version}"
|
|
build_style=cmake
|
|
configure_args="-DINSTALL_PK3_PATH=share/gzdoom -DDYN_GTK=OFF -DDYN_OPENAL=OFF"
|
|
hostmakedepends="pkg-config tar xz"
|
|
makedepends="SDL2-devel gtk+3-devel libgomp-devel ZMusic-devel libopenal-devel"
|
|
short_desc="Advanced Doom source port with OpenGL support"
|
|
maintainer="Érico Nogueira <ericonr@disroot.org>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="https://www.zdoom.org"
|
|
# WARNING: watch out for new submodules
|
|
distfiles="https://github.com/coelckers/gzdoom/archive/g${version}.tar.gz
|
|
https://github.com/coelckers/gzdoom/releases/download/g${version}/gzdoom_${version}_amd64.deb
|
|
https://github.com/nashmuhandes/WidePix/archive/${_widepix_commit}.tar.gz"
|
|
checksum="60549ea3597496cadec97e4f6958422c22b4cf5d6693552cf4f8deeaca53efeb
|
|
48f9cd513ee62fcbf54bc941e09ddb9b00aaf8d41953d63a820c7a34397d083e
|
|
f86717925688fa7e7debcf88934bc3dc7f9bffbde4c533a34137069900b32c02"
|
|
skip_extraction="${pkgname}_${version}_amd64.deb"
|
|
nocross=yes
|
|
|
|
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
|
makedepends+=" musl-fts-devel libexecinfo-devel"
|
|
fi
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*) configure_args+=" -DSSE_MATTERS=true" ;;
|
|
esac
|
|
|
|
post_extract() {
|
|
bsdtar xOf ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}_${version}_amd64.deb data.tar.xz |
|
|
tar --strip-components=4 -xJf - ./usr/share/{pixmaps/gzdoom.png,applications/gzdoom.desktop}
|
|
|
|
rmdir wadsrc_widescreen/static
|
|
mv ../WidePix-${_widepix_commit} wadsrc_widescreen/static
|
|
}
|
|
|
|
post_patch() {
|
|
vsed -e "s|GIT_DESCRIPTION|\"${version}\"|g" -i src/gitinfo.cpp
|
|
vsed -e "s|VERSIONSTR|\"${version}\"|g" -i src/gitinfo.cpp
|
|
vsed -e "s|GIT_TIME|\"${_tagdate}\"|g" -i src/gitinfo.cpp
|
|
vsed -e 's|#define SHARE_DIR.*|#define SHARE_DIR "/usr/share/gzdoom/"|' \
|
|
-i src/common/platform/posix/i_system.h
|
|
vsed -e 's|/usr/share/games/doom|/usr/share/gzdoom|g' -i src/gameconfigfile.cpp
|
|
}
|
|
|
|
post_install() {
|
|
vmkdir usr/share/licenses
|
|
mv ${PKGDESTDIR}/usr/share/{doc/gzdoom/licenses,licenses/${pkgname}}
|
|
vinstall gzdoom.desktop 644 usr/share/applications
|
|
vinstall gzdoom.png 644 usr/share/pixmaps
|
|
vinstall soundfont/gzdoom.sf2 644 usr/share/gzdoom/soundfonts
|
|
}
|