summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorLartza2017-11-03 15:17:27 +0200
committerLartza2017-11-03 15:17:27 +0200
commitbe8c2ba5442441e1970a0d51f29fbb4617d929df (patch)
tree67994219a6ab8acdcbe94bed17b21863cd10f281 /PKGBUILD
parent15ab14f8648e9a903361c9d825f8ad93becf5ecd (diff)
downloadaur-be8c2ba5442441e1970a0d51f29fbb4617d929df.tar.gz
Add patch for PhysFS 3 compatibility
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD34
1 files changed, 30 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2422286a8baa..60adde8636de 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,56 @@
# Maintainer: Ian D. Scott <ian@perebruin.com>
# Contributor: Lari Tikkanen <lartza@wippies.com>
+# Use an alternative Qt backend to the SDL default. Fails to build with debugging enabled and may not fully work.
+_use_qt_backend="0"
+
+# Disable debugging even with SDL backend. Build errors should probably be reported upstream or to me instead.
+_disable_debug="0"
+
pkgname=warzone2100-git
_gitname=warzone2100
-pkgver=r13131.6d6ee05
+pkgver=r13674.1cdd7bdb9
pkgrel=1
pkgdesc="3D realtime strategy game on a future Earth (Git version)"
arch=('i686' 'x86_64')
url="http://wz2100.net/"
license=('GPL')
depends=('qt5-script' 'sdl2' 'libtheora' 'openal' 'libvorbis' 'physfs' 'quesoglc' 'ttf-dejavu')
+if [[ ${_use_qt_backend} == "1" ]]; then
+ depends=( "${depends[@]}" qt5-x11extras )
+fi
makedepends=('zip' 'unzip' 'git')
provides=('warzone' 'warzone2100' 'warzone-svn' 'warzone2100-beta')
conflicts=('warzone2100')
-source=('git://github.com/Warzone2100/warzone2100.git')
-md5sums=('SKIP')
+source=('git://github.com/Warzone2100/warzone2100.git'
+ 'physfs3.patch')
+md5sums=('SKIP'
+ '97c50bcd407fb90322c8a37523ee8e77')
pkgver() {
cd "$_gitname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
+prepare() {
+ cd "$srcdir/$_gitname"
+
+ # Apply patch to fix PhysFS 3 deprecation warnings
+ patch -Np1 -i "${srcdir}/physfs3.patch"
+}
+
build() {
cd "$srcdir/$_gitname"
./autogen.sh
- ./configure --prefix=/usr
+
+ if [[ $_use_qt_backend == "1" ]]; then
+ ./configure --prefix=/usr --with-backend=qt --disable-debug
+ elif [[ $_disable_debug == "1" ]]; then
+ ./configure --prefix=/usr --disable-debug
+ else
+ ./configure --prefix=/usr
+ fi
+
make
}