libdevil: patch to build on darwin

On a OSX 10.10 system:

libtool: compile: clang++ -DHAVE_CONFIG_H -I. -I../include/IL -I ./../src-IL/include -I ./../include -fgnu89-inline -msse -msse2 -msse3 -D_THREAD_SAFE -I/nix/store/7n9c36hz9sl2dqvfry8d554l935hq4ma-openexr-2.2.0/include/OpenEXR -I/nix/store/3jxslxa37wmfdnyfj1hckpxl0skscgj0-ilmbase-2.2.0/include/OpenEXR -O3 -c ./../src-IL/src/il_exr.cpp -fno-common -DPIC -o .libs/libIL_la-il_exr.o
In file included from ./../src-IL/src/il_exr.cpp:22:
In file included from ./../src-IL/include/il_exr.h:18:
In file included from /nix/store/7n9c36hz9sl2dqvfry8d554l935hq4ma-openexr-2.2.0/include/OpenEXR/ImfIO.h:49:
In file included from /nix/store/3qsrpjbsmn7w4d18i8zc6a44myiaa516-libc++-3.5.0/include/c++/v1/string:434:
/nix/store/3qsrpjbsmn7w4d18i8zc6a44myiaa516-libc++-3.5.0/include/c++/v1/__config:32:22: error: expected value in expression
#if __LITTLE_ENDIAN__
^
/nix/store/3qsrpjbsmn7w4d18i8zc6a44myiaa516-libc++-3.5.0/include/c++/v1/__config:110:11: fatal error: 'endian.h' file not found
# include <endian.h>
^
2 errors generated.
make[1]: *** [libIL_la-il_exr.lo] Error 1
make[1]: Leaving directory `/private/var/folders/1g/yfm550_10sb76p0z469bq9mr5zsthm/T/nix-build-libdevil-1.7.8.drv-1/devil-1.7.8/lib'
make: *** [all-recursive] Error 1

See http://sourceforge.net/p/resil/tickets/8/

+28
+1
pkgs/development/libraries/libdevil/default.nix
··· 31 31 sha256 = "0qkx2qfv02igbrmsn6z5a3lbrbwjfh3rb0c2sj54wy0j1f775hbc"; 32 32 } ) 33 33 ./ftbfs-libpng15.patch 34 + ./il_endian.h.patch 34 35 ]; 35 36 36 37 meta = with stdenv.lib; {
+27
pkgs/development/libraries/libdevil/il_endian.h.patch
··· 1 + Source: http://sourceforge.net/p/resil/tickets/8/ 2 + --- devil-1.7.8.orig/src-IL/include/il_endian.h.orig 2009-03-08 01:10:08.000000000 -0600 3 + +++ devil-1.7.8/src-IL/include/il_endian.h 2013-11-03 01:52:37.000000000 -0600 4 + @@ -19,9 +19,13 @@ 5 + #ifndef __BIG_ENDIAN__ 6 + #define __BIG_ENDIAN__ 1 7 + #endif 8 + +#else 9 + + #ifndef __LITTLE_ENDIAN__ 10 + + #define __LITTLE_ENDIAN__ 1 11 + + #endif 12 + #endif 13 + 14 + -#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __BIG_ENDIAN__) \ 15 + +#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) \ 16 + || (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)) 17 + #undef __LITTLE_ENDIAN__ 18 + #define Short(s) iSwapShort(s) 19 + @@ -39,8 +43,6 @@ 20 + #define BigDouble(d) 21 + #else 22 + #undef __BIG_ENDIAN__ 23 + - #undef __LITTLE_ENDIAN__ // Not sure if it's defined by any compiler... 24 + - #define __LITTLE_ENDIAN__ 25 + #define Short(s) 26 + #define UShort(s) 27 + #define Int(i)