- updated to 1.8.0
[packages/DevIL.git] / DevIL-ILUT.patch
CommitLineData
550c3aa5
JB
1--- DevIL/DevIL/include/IL/ilut.h.orig 2017-01-02 01:03:56.000000000 +0100
2+++ DevIL/DevIL/include/IL/ilut.h 2017-05-13 20:58:19.558675483 +0200
3@@ -98,6 +98,12 @@
4 #endif
5
6 #include <IL/ilut_config.h>
7+#else
8+# define ILUT_USE_OPENGL 1
9+# define ILUT_USE_ALLEGRO 1
10+# define ILUT_USE_SDL 1
11+# define ILUT_USE_X11 1
12+# define ILUT_USE_XSHM 1
13 #endif
14
15
16@@ -145,7 +151,7 @@
17
18 // ImageLib Utility Toolkit's Allegro Functions
19 #ifdef ILUT_USE_ALLEGRO
20-// #include <allegro.h>
21+ #include <allegro.h>
22 #endif//ILUT_USE_ALLEGRO
23
24 #ifdef ILUT_USE_SDL
25@@ -230,14 +236,6 @@
26
27 // ImageLib Utility Toolkit's Allegro Functions
28 #ifdef ILUT_USE_ALLEGRO
29- #ifdef __cplusplus
30- extern "C" {
31- #endif
32- #include <allegro.h>
33- #ifdef __cplusplus
34- }
35- #endif
36-
37 ILAPI BITMAP* ILAPIENTRY ilutAllegLoadImage(ILstring FileName);
38 ILAPI BITMAP* ILAPIENTRY ilutConvertToAlleg(PALETTE Pal);
39 #endif//ILUT_USE_ALLEGRO
40--- DevIL/DevIL/src-ILUT/CMakeLists.txt.orig 2017-05-13 21:05:04.292004199 +0200
41+++ DevIL/DevIL/src-ILUT/CMakeLists.txt 2017-05-13 21:28:11.045321699 +0200
42@@ -36,6 +36,9 @@
43 else(BUILD_SHARED_LIBS)
44 add_definitions(-DIL_STATIC_LIB)
45 endif(BUILD_SHARED_LIBS)
46+else(WIN32)
47+ find_package(SDL)
48+ include_directories(${SDL_INCLUDE_DIR})
49 endif(WIN32)
50
51 source_group("Source Files" FILES src/*.cpp)
52@@ -50,6 +53,10 @@
53 target_link_libraries(ILUT
54 IL
55 ILU
56+ alleg
57+ ${SDL_LIBRARY}
58+ GLU GL
59+ Xext
60 )
61
62 # generate pkg-config file
63--- DevIL/DevIL/src-ILUT/src/ilut_sdlsurface.cpp.orig 2017-01-02 01:03:56.000000000 +0100
64+++ DevIL/DevIL/src-ILUT/src/ilut_sdlsurface.cpp 2017-05-13 21:43:37.848644450 +0200
65@@ -117,7 +117,7 @@
66 memcpy(Bitmap->pixels, Data, Image->SizeOfData);
67 }
68 else { // Must pad the lines on some images.
69- Dest = Bitmap->pixels;
70+ Dest = static_cast<ILubyte*>(Bitmap->pixels);
71 for (i = 0; i < Image->Height; i++) {
72 memcpy(Dest, Data + i * Image->Bps, Image->Bps);
73 imemclear(Dest + Image->Bps, Pad);
74--- DevIL/DevIL/src-ILUT/src/ilut_x11.cpp.orig 2017-01-02 01:03:56.000000000 +0100
75+++ DevIL/DevIL/src-ILUT/src/ilut_x11.cpp 2017-05-13 21:48:53.621974179 +0200
76@@ -188,7 +188,7 @@
77 return NULL;
78 }
79
80- buffer = malloc( width * height * 4 );
81+ buffer = static_cast<char*>(malloc( width * height * 4 ));
82 if (!buffer) {
83 return NULL;
84 }
85@@ -299,7 +299,7 @@
86 size = img->bytes_per_line * img->height;
87
88 info->shmid = shmget( IPC_PRIVATE, size, IPC_CREAT | 0666 );
89- info->shmaddr = img->data = shmat( info->shmid, 0, 0 );
90+ info->shmaddr = img->data = static_cast<char*>(shmat( info->shmid, 0, 0 ));
91 info->readOnly = False;
92
93 // Attach to server
This page took 0.079714 seconds and 4 git commands to generate.