Files
macports-ports/graphics/libpano13/files/patch-endian-detection.diff
Olli LuptonandPerry E. Metzger 2e2cd8b082 libpano13: update to version 2.9.21
* This version must be built using CMake.
* Enable CTest testing.
* It does not build out of the box due to an error finding endian.h.
  This seems to be because the preprocessor logic in the panorama.h
  header assumes that __GNUC__ will not be defined on macOS, which is a
  bad assumption.
2022-01-27 13:42:34 -05:00

39 lines
1.1 KiB
Diff

--- panorama.h.orig 2022-01-22 10:22:19.000000000 +0100
+++ panorama.h 2022-01-22 10:22:34.000000000 +0100
@@ -45,7 +45,16 @@
// If you need PT_BIGENDIAN, and don't use MacOS, define it here:
//#define PT_BIGENDIAN 1
-#if defined(__GNUC__) && !defined(__MINGW32__)
+#if !defined(__Mac_OSX__) && defined(__APPLE_CC__)
+ #define __Mac_OSX__ 1
+#endif
+#ifdef __Mac_OSX__
+ #if (defined(__ppc__) || defined(__ppc64__))
+ #define PT_BIGENDIAN 1
+ #elif defined(__i386__)
+ #undef PT_BIGENDIAN
+ #endif
+#elif defined(__GNUC__) && !defined(__MINGW32__)
#if defined(__FreeBSD__)
// special check for FreeBSD because it follow its own rules
#include <sys/endian.h>
@@ -75,17 +84,6 @@
#endif
#endif
-#ifndef __Mac_OSX__
- #if defined(__APPLE_CC__)
- #define __Mac_OSX__ 1
- #if (defined(__ppc__) || defined(__ppc64__))
- #define PT_BIGENDIAN 1
- #elif defined(__i386__)
- #undef PT_BIGENDIAN
- #endif
- #endif
-#endif
-
// Use FSSpec on Macs as Path-specifyers, else strings
#define PATH_SEP '/'