diff options
author | Michael Straube | 2017-04-01 21:23:10 +0200 |
---|---|---|
committer | Michael Straube | 2017-04-01 21:23:10 +0200 |
commit | a07dc9ccb769013e9d346cef1bc6a9393aa22d74 (patch) | |
tree | 2afdb422a277cfdf9fb674e2f39190069bc68289 | |
parent | 0f79b895a98207b4a1e3f950fbb34b2698fee88b (diff) | |
download | aur-a07dc9ccb769013e9d346cef1bc6a9393aa22d74.tar.gz |
Add upstream patch that fix crashes
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | blockattack-2.1.0-hotfix.patch | 31 |
3 files changed, 45 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = blockattack pkgdesc = An open source clone of Tetris Attack based on SDL pkgver = 2.1.0 - pkgrel = 1 + pkgrel = 2 url = http://www.blockattack.net arch = i686 arch = x86_64 @@ -17,7 +17,9 @@ pkgbase = blockattack depends = physfs depends = hicolor-icon-theme source = blockattack-2.1.0.tar.gz::https://github.com/blockattack/blockattack-game/archive/v2.1.0.tar.gz + source = blockattack-2.1.0-hotfix.patch sha256sums = f30b3c8b57734921cd2d095d2aae8f253afcc91256fe5d3f38bfeff090524c23 + sha256sums = a17b9549b89c82cc75ca9faef6f4b3ba5df593c83a4ee0ce01947ddbcd3e38dc pkgname = blockattack @@ -5,15 +5,23 @@ pkgname=blockattack pkgver=2.1.0 -pkgrel=1 +pkgrel=2 pkgdesc="An open source clone of Tetris Attack based on SDL" arch=('i686' 'x86_64') url="http://www.blockattack.net" license=('GPL') depends=('boost-libs' 'sdl2_mixer' 'sdl2_image' 'sdl2_ttf' 'physfs' 'hicolor-icon-theme') makedepends=('cmake' 'boost' 'utf8cpp' 'zip') -source=("$pkgname-$pkgver.tar.gz::https://github.com/blockattack/blockattack-game/archive/v$pkgver.tar.gz") -sha256sums=('f30b3c8b57734921cd2d095d2aae8f253afcc91256fe5d3f38bfeff090524c23') +source=("$pkgname-$pkgver.tar.gz::https://github.com/blockattack/blockattack-game/archive/v$pkgver.tar.gz" + "blockattack-2.1.0-hotfix.patch") +sha256sums=('f30b3c8b57734921cd2d095d2aae8f253afcc91256fe5d3f38bfeff090524c23' + 'a17b9549b89c82cc75ca9faef6f4b3ba5df593c83a4ee0ce01947ddbcd3e38dc') + +prepare() { + cd $pkgname-game-$pkgver + # Fix crashes + patch -p1 -i ../blockattack-2.1.0-hotfix.patch +} build() { cd $pkgname-game-$pkgver diff --git a/blockattack-2.1.0-hotfix.patch b/blockattack-2.1.0-hotfix.patch new file mode 100644 index 000000000000..3decf5885948 --- /dev/null +++ b/blockattack-2.1.0-hotfix.patch @@ -0,0 +1,31 @@ +From 7025bd6c00f76c6667abb023b27081243f025ad1 Mon Sep 17 00:00:00 2001 +From: sago007 <poul@poulsander.com> +Date: Sat, 1 Apr 2017 20:27:57 +0200 +Subject: [PATCH] Hotfix for Issue #14 + +--- + source/code/common.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/source/code/common.cpp b/source/code/common.cpp +index e4cf830..882aae6 100644 +--- a/source/code/common.cpp ++++ b/source/code/common.cpp +@@ -49,7 +49,7 @@ double str2double(const string& str2parse) { + try { + return std::stod(str2parse); + } +- catch (std::ios_base::failure& f) { ++ catch (...) { + return 0.0; + } + } +@@ -78,7 +78,7 @@ int str2int(const string& str2parse) { + try { + return std::stoi(str2parse); + } +- catch (std::ios_base::failure& f) { ++ catch (...) { + return 0; + } + } |