Merge pull request #6959 from pmahoney/libdevil

libdevil: patch to build on darwin
This commit is contained in:
Arseniy Seroka 2015-03-24 10:36:29 +03:00
commit 3a08b70be5
2 changed files with 28 additions and 0 deletions

View File

@ -31,6 +31,7 @@ stdenv.mkDerivation rec {
sha256 = "0qkx2qfv02igbrmsn6z5a3lbrbwjfh3rb0c2sj54wy0j1f775hbc"; sha256 = "0qkx2qfv02igbrmsn6z5a3lbrbwjfh3rb0c2sj54wy0j1f775hbc";
} ) } )
./ftbfs-libpng15.patch ./ftbfs-libpng15.patch
./il_endian.h.patch
]; ];
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -0,0 +1,27 @@
Source: http://sourceforge.net/p/resil/tickets/8/
--- devil-1.7.8.orig/src-IL/include/il_endian.h.orig 2009-03-08 01:10:08.000000000 -0600
+++ devil-1.7.8/src-IL/include/il_endian.h 2013-11-03 01:52:37.000000000 -0600
@@ -19,9 +19,13 @@
#ifndef __BIG_ENDIAN__
#define __BIG_ENDIAN__ 1
#endif
+#else
+ #ifndef __LITTLE_ENDIAN__
+ #define __LITTLE_ENDIAN__ 1
+ #endif
#endif
-#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __BIG_ENDIAN__) \
+#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) \
|| (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__))
#undef __LITTLE_ENDIAN__
#define Short(s) iSwapShort(s)
@@ -39,8 +43,6 @@
#define BigDouble(d)
#else
#undef __BIG_ENDIAN__
- #undef __LITTLE_ENDIAN__ // Not sure if it's defined by any compiler...
- #define __LITTLE_ENDIAN__
#define Short(s)
#define UShort(s)
#define Int(i)