forked from mirrors/nixpkgs
Merge pull request #6959 from pmahoney/libdevil
libdevil: patch to build on darwin
This commit is contained in:
commit
3a08b70be5
|
@ -31,6 +31,7 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "0qkx2qfv02igbrmsn6z5a3lbrbwjfh3rb0c2sj54wy0j1f775hbc";
|
||||
} )
|
||||
./ftbfs-libpng15.patch
|
||||
./il_endian.h.patch
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
27
pkgs/development/libraries/libdevil/il_endian.h.patch
Normal file
27
pkgs/development/libraries/libdevil/il_endian.h.patch
Normal 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)
|
Loading…
Reference in a new issue