[packages/ogre] - fix building on x32 - rel 6
baggins
baggins at pld-linux.org
Mon Jun 15 23:53:57 CEST 2015
commit 0d5386d8188eea1ea12f1401e5aad41bd2c2b78e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon Jun 15 23:53:44 2015 +0200
- fix building on x32
- rel 6
ogre.spec | 6 ++++--
x32.patch | 33 +++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 2 deletions(-)
---
diff --git a/ogre.spec b/ogre.spec
index 3c97ec8..413daff 100644
--- a/ogre.spec
+++ b/ogre.spec
@@ -5,7 +5,7 @@
%bcond_with cg # build with cg
%bcond_with samples # build samples (not installed anyway)
-%ifnarch %{ix86} %{x8664}
+%ifnarch %{ix86} %{x8664} x32
%undefine with_cg
%endif
@@ -14,12 +14,13 @@ Summary: Object-oriented Graphics Rendering Engine
Summary(pl.UTF-8): OGRE - zorientowany obiektowo silnik renderowania grafiki
Name: ogre
Version: 1.8.1
-Release: 5
+Release: 6
License: MIT
Group: Applications
Source0: http://downloads.sourceforge.net/ogre/%{name}_src_v%{fver}.tar.bz2
# Source0-md5: b85e3dcf370a46b3a8624d4fdd722d39
Patch0: boost-1.50.patch
+Patch1: x32.patch
URL: http://www.ogre3d.org/
%{?with_samples:BuildRequires: CEGUI-devel}
BuildRequires: FreeImage-devel
@@ -86,6 +87,7 @@ Przykłady do OGRE.
%prep
%setup -q -n %{name}_src_v%{fver}
%patch0 -p1
+%patch1 -p1
%build
install -d build
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..a425d55
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,33 @@
+diff -ur ogre_src_v1-8-1/OgreMain/include/OgrePlatform.h ogre_src_v1-8-1-x32/OgreMain/include/OgrePlatform.h
+--- ogre_src_v1-8-1/OgreMain/include/OgrePlatform.h 2012-09-02 07:27:15.000000000 +0200
++++ ogre_src_v1-8-1-x32/OgreMain/include/OgrePlatform.h 2015-06-15 23:34:03.582303164 +0200
+@@ -130,7 +130,7 @@
+ #endif
+
+ /* Find the arch type */
+-#if defined(__x86_64__) || defined(_M_X64) || defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__)
++#if (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__)
+ # define OGRE_ARCH_TYPE OGRE_ARCHITECTURE_64
+ #else
+ # define OGRE_ARCH_TYPE OGRE_ARCHITECTURE_32
+diff -ur ogre_src_v1-8-1/OgreMain/src/OgrePlatformInformation.cpp ogre_src_v1-8-1-x32/OgreMain/src/OgrePlatformInformation.cpp
+--- ogre_src_v1-8-1/OgreMain/src/OgrePlatformInformation.cpp 2012-09-02 07:27:15.000000000 +0200
++++ ogre_src_v1-8-1-x32/OgreMain/src/OgrePlatformInformation.cpp 2015-06-15 23:36:47.257495085 +0200
+@@ -116,7 +116,7 @@
+ }
+ #endif
+ #elif (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG) && OGRE_PLATFORM != OGRE_PLATFORM_NACL
+- #if OGRE_ARCH_TYPE == OGRE_ARCHITECTURE_64
++ #if OGRE_ARCH_TYPE == OGRE_ARCHITECTURE_64 || defined(__ILP32__)
+ return true;
+ #else
+ unsigned oldFlags, newFlags;
+@@ -170,7 +170,7 @@
+ }
+ #endif
+ #elif (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG) && OGRE_PLATFORM != OGRE_PLATFORM_NACL
+- #if OGRE_ARCH_TYPE == OGRE_ARCHITECTURE_64
++ #if OGRE_ARCH_TYPE == OGRE_ARCHITECTURE_64 || defined(__ILP32__)
+ __asm__
+ (
+ "cpuid": "=a" (result._eax), "=b" (result._ebx), "=c" (result._ecx), "=d" (result._edx) : "a" (query)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ogre.git/commitdiff/0d5386d8188eea1ea12f1401e5aad41bd2c2b78e
More information about the pld-cvs-commit
mailing list