summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaohan Chen2018-09-07 05:51:07 -0400
committerYaohan Chen2018-09-07 05:51:07 -0400
commit26df492d8f72fb55c0ac754b7cf155e3387210fb (patch)
tree72ff68c1b858312570b0d14b6d10462db3ebc5e6
parent1eb18096255e8825f497a48e0e6cb9f1d9d1c8ff (diff)
downloadaur-26df492d8f72fb55c0ac754b7cf155e3387210fb.tar.gz
Avoid compilation error of redefining HAVE_M_PI
https://github.com/anura-engine/anura/issues/279
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD10
-rw-r--r--fix_redefine_have_m_pi_error.patch26
3 files changed, 37 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0272ad9e48a8..4ccf32e23876 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Wed Apr 26 06:52:06 UTC 2017
+# Fri Sep 7 09:50:55 UTC 2018
pkgbase = anura-git
pkgdesc = A fully-featured game engine, the tech behind the spectacular Frogatto & Friends.
- pkgver = 0.0.3171.g9100349d
+ pkgver = 0.0.3587.g448569e2
pkgrel = 1
url = https://github.com/anura-engine/anura
install = anura.install
@@ -26,9 +26,11 @@ pkgbase = anura-git
source = git+https://github.com/anura-engine/anura.git#branch=trunk
source = git+https://github.com/sweetkristas/imgui.git
source = anura.sh
+ source = fix_redefine_have_m_pi_error.patch
md5sums = SKIP
md5sums = SKIP
md5sums = 15f4c03c2404bcfd7618b8f9e0c850ba
+ md5sums = bfdf31856d06c69ef13ee76f0a67242b
pkgname = anura-git
diff --git a/PKGBUILD b/PKGBUILD
index 246ec0115283..d33e2d2a7d87 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
# Maintainer: Yaohan Chen <yaohan.chen@gmail.com>
pkgname=anura-git
-pkgver=0.0.3171.g9100349d
+pkgver=0.0.3587.g448569e2
pkgrel=1
pkgdesc="A fully-featured game engine, the tech behind the spectacular Frogatto & Friends."
arch=(i686 x86_64)
@@ -12,10 +12,12 @@ optdepends=('frogatto-git: the default game module'
makedepends=(git boost)
source=('git+https://github.com/anura-engine/anura.git#branch=trunk'
'git+https://github.com/sweetkristas/imgui.git'
- anura.sh)
+ anura.sh
+ fix_redefine_have_m_pi_error.patch)
md5sums=('SKIP'
'SKIP'
- '15f4c03c2404bcfd7618b8f9e0c850ba')
+ '15f4c03c2404bcfd7618b8f9e0c850ba'
+ 'bfdf31856d06c69ef13ee76f0a67242b')
install=anura.install
_gitname=anura
@@ -25,6 +27,8 @@ prepare() {
git submodule init
git config submodule.imgui.url "$srcdir/imgui"
git submodule update
+
+ git apply "$srcdir/fix_redefine_have_m_pi_error.patch"
}
pkgver() {
diff --git a/fix_redefine_have_m_pi_error.patch b/fix_redefine_have_m_pi_error.patch
new file mode 100644
index 000000000000..f852248f6001
--- /dev/null
+++ b/fix_redefine_have_m_pi_error.patch
@@ -0,0 +1,26 @@
+diff --git a/src/kre/SurfaceSDL.cpp b/src/kre/SurfaceSDL.cpp
+index 6eda12ee..34f61b7c 100644
+--- a/src/kre/SurfaceSDL.cpp
++++ b/src/kre/SurfaceSDL.cpp
+@@ -24,9 +24,6 @@
+ #ifndef _USE_MATH_DEFINES
+ # define _USE_MATH_DEFINES 1
+ #endif
+-#ifndef HAVE_M_PI
+-# define HAVE_M_PI
+-#endif
+
+ #include "SDL_image.h"
+
+diff --git a/src/tiled/tiled.cpp b/src/tiled/tiled.cpp
+index 0812ed77..06e56288 100644
+--- a/src/tiled/tiled.cpp
++++ b/src/tiled/tiled.cpp
+@@ -21,7 +21,6 @@
+ distribution.
+ */
+
+-#define HAVE_M_PI
+ #include "SDL.h"
+ #include "SDL_image.h"
+