[packages/ogre] - updated x32 patch

baggins baggins at pld-linux.org
Sun Oct 13 18:27:24 CEST 2019


commit 14712a768c87aa8d136da5506ca6544d5b28c41e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Oct 13 18:26:11 2019 +0200

    - updated x32 patch

 ogre.spec |  2 +-
 x32.patch | 23 ++++++++++++++++-------
 2 files changed, 17 insertions(+), 8 deletions(-)
---
diff --git a/ogre.spec b/ogre.spec
index 2bb7401..de2e690 100644
--- a/ogre.spec
+++ b/ogre.spec
@@ -86,7 +86,7 @@ Przykłady do OGRE.
 
 %prep
 %setup -q
-#%patch1 -p1
+%patch1 -p1
 
 %build
 
diff --git a/x32.patch b/x32.patch
index a425d55..06a58ff 100644
--- a/x32.patch
+++ b/x32.patch
@@ -5,8 +5,8 @@ diff -ur ogre_src_v1-8-1/OgreMain/include/OgrePlatform.h ogre_src_v1-8-1-x32/Ogr
  #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__)
+-#if defined(__x86_64__) || defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64) || defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__) || defined(__arm64__) || defined(__aarch64__) || defined(__mips64) || defined(__mips64_)
++#if (defined(__x86_64__) && !defined(__ILP32__)) || defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64) || defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__) || defined(__arm64__) || defined(__aarch64__) || defined(__mips64) || defined(__mips64_)
  #   define OGRE_ARCH_TYPE OGRE_ARCHITECTURE_64
  #else
  #   define OGRE_ARCH_TYPE OGRE_ARCHITECTURE_32
@@ -15,19 +15,28 @@ diff -ur ogre_src_v1-8-1/OgreMain/src/OgrePlatformInformation.cpp ogre_src_v1-8-
 +++ 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
+     #endif
+ #elif (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG) && OGRE_PLATFORM != OGRE_PLATFORM_EMSCRIPTEN
 -        #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
+         result._edx = CPUInfo[3];
+         return result._eax;
+ #elif (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG) && OGRE_PLATFORM != OGRE_PLATFORM_EMSCRIPTEN
 -        #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)
+@@ -233,7 +233,7 @@
+         }
+     #endif
+ #elif (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG) && OGRE_PLATFORM != OGRE_PLATFORM_EMSCRIPTEN
+-        #if OGRE_ARCH_TYPE == OGRE_ARCHITECTURE_64 
++        #if OGRE_ARCH_TYPE == OGRE_ARCHITECTURE_64 || defined(__ILP32__)
+             return true;
+         #else
+         // Does gcc have __try/__except similar mechanism?
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ogre.git/commitdiff/14712a768c87aa8d136da5506ca6544d5b28c41e



More information about the pld-cvs-commit mailing list