From e3e5544c1ff67bb1cad3e314c5ec49aec1660d98 Mon Sep 17 00:00:00 2001 From: obache Date: Sun, 16 Jun 2013 04:16:59 +0000 Subject: Change MESA_BIG_ENDIAN condition check for PR pkg/47919. --- graphics/MesaLib/distinfo | 4 ++-- .../MesaLib/patches/patch-src_mesa_main_compiler.h | 26 +++++++++++++++++----- 2 files changed, 22 insertions(+), 8 deletions(-) (limited to 'graphics') diff --git a/graphics/MesaLib/distinfo b/graphics/MesaLib/distinfo index 9e466fc3df6..9506e7ac61a 100644 --- a/graphics/MesaLib/distinfo +++ b/graphics/MesaLib/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.79 2013/06/13 21:35:24 wiz Exp $ +$NetBSD: distinfo,v 1.80 2013/06/16 04:16:59 obache Exp $ SHA1 (Mesa-7.11.2/MesaGLUT-7.11.2.tar.bz2) = 2e6e730204800a0748b301a5f58b86332699788b RMD160 (Mesa-7.11.2/MesaGLUT-7.11.2.tar.bz2) = bb2b140375aa13df79fcdb60a7ad0a63622dc531 @@ -27,6 +27,6 @@ SHA1 (patch-src_mesa_drivers_dri_intel_intel__context.c) = 21d3c08a27817a6358b88 SHA1 (patch-src_mesa_drivers_dri_intel_intel__context.h) = 6d394e704636134768a6cb5a200ebcc7bc3f52ed SHA1 (patch-src_mesa_drivers_dri_mach64_mach64__context.h) = fe95c6610de4c1482c568463aca82f53ed0df900 SHA1 (patch-src_mesa_drivers_x11_Makefile) = 17b72d2b74d89fbd8db05491cfcf253bb856b139 -SHA1 (patch-src_mesa_main_compiler.h) = 88acf55488d74675f16e851012e23c129e679722 +SHA1 (patch-src_mesa_main_compiler.h) = b164781b541cb83b64597facbb7a7e21d8bdb686 SHA1 (patch-src_mesa_main_imports.c) = d0c50004c749e4c5c136ac2ed50a6989ca90065f SHA1 (patch-src_mesa_main_imports.h) = f5a96195b3a14294ca3389c9fe17a6076c46db8a diff --git a/graphics/MesaLib/patches/patch-src_mesa_main_compiler.h b/graphics/MesaLib/patches/patch-src_mesa_main_compiler.h index 463c67d0ec5..088db81f38b 100644 --- a/graphics/MesaLib/patches/patch-src_mesa_main_compiler.h +++ b/graphics/MesaLib/patches/patch-src_mesa_main_compiler.h @@ -1,8 +1,8 @@ -$NetBSD: patch-src_mesa_main_compiler.h,v 1.2 2013/05/18 05:55:41 obache Exp $ +$NetBSD: patch-src_mesa_main_compiler.h,v 1.3 2013/06/16 04:16:59 obache Exp $ --- src/mesa/main/compiler.h.orig 2011-11-23 01:09:52.000000000 +0000 +++ src/mesa/main/compiler.h -@@ -248,7 +248,17 @@ extern "C" { +@@ -248,7 +248,26 @@ extern "C" { * Try to use a runtime test instead. * For now, only used by some DRI hardware drivers for color/texel packing. */ @@ -15,13 +15,22 @@ $NetBSD: patch-src_mesa_main_compiler.h,v 1.2 2013/05/18 05:55:41 obache Exp $ +#include +#endif + -+#if (defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN) ||\ -+ (defined(_BYTE_ORDER) && defined(_BIG_ENDIAN) && _BYTE_ORDER == _BIG_ENDIAN) ||\ -+ (defined(__sun) && defined(_BIG_ENDIAN)) ++#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) ++# if BYTE_ORDER == BIG_ENDIAN ++#define MESA_BIG_ENDIAN 1 ++# endif ++#elif defined(_BYTE_ORDER) && defined(_BIG_ENDIAN) ++# if _BYTE_ORDER == _BIG_ENDIAN ++#define MESA_BIG_ENDIAN 1 ++# endif ++#elif defined(__sun) && defined(_BIG_ENDIAN) ++#define MESA_BIG_ENDIAN 1 ++#endif ++#if MESA_BIG_ENDIAN == 1 #if defined(__linux__) #include #define CPU_TO_LE32( x ) bswap_32( x ) -@@ -263,6 +273,9 @@ static INLINE GLuint CPU_TO_LE32(GLuint +@@ -263,11 +282,13 @@ static INLINE GLuint CPU_TO_LE32(GLuint ((x & 0x00ff0000) >> 8) | ((x & 0xff000000) >> 24)); } @@ -31,3 +40,8 @@ $NetBSD: patch-src_mesa_main_compiler.h,v 1.2 2013/05/18 05:55:41 obache Exp $ #else /*__linux__ */ #include #define CPU_TO_LE32( x ) bswap32( x ) + #endif /*__linux__*/ +-#define MESA_BIG_ENDIAN 1 + #else + #define CPU_TO_LE32( x ) ( x ) + #define MESA_LITTLE_ENDIAN 1 -- cgit v1.2.3