Gentoo Archives: gentoo-commits

From: Maciej Mrozowski <reavertm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/simage/files/, media-libs/simage/
Date: Sun, 06 May 2018 08:03:00
Message-Id: 1525593618.46f5ebe3c289eeee5e00f4547bbc31456c21d0a7.reavertm@gentoo
1 commit: 46f5ebe3c289eeee5e00f4547bbc31456c21d0a7
2 Author: Maciej Mrozowski <reavertm <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 6 07:55:54 2018 +0000
4 Commit: Maciej Mrozowski <reavertm <AT> gentoo <DOT> org>
5 CommitDate: Sun May 6 08:00:18 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46f5ebe3
7
8 media-libs/simage: Version bump (SCM snapshot)
9
10 media-libs/simage/Manifest | 1 +
11 .../files/simage-1.7.1-cmake-automagic-deps.patch | 497 +++++++++++++++++++++
12 .../simage/simage-1.7.1a_beta_pre20180312.ebuild | 72 +++
13 3 files changed, 570 insertions(+)
14
15 diff --git a/media-libs/simage/Manifest b/media-libs/simage/Manifest
16 index 0189c1dc17c..59b5c71b67f 100644
17 --- a/media-libs/simage/Manifest
18 +++ b/media-libs/simage/Manifest
19 @@ -1 +1,2 @@
20 +DIST Coin3D-simage-3bd369da8f08.tar.bz2 630229 BLAKE2B 6231dde891c07d8a4a37eebd5f89d9e445c048bf48d1718a5f1e2b12f488ad6c806edd04fd4eb30b5e041f978fbb65ea0b1d3b1263d7006bbda4568f4bef87c6 SHA512 61793a728c66dc4f427b1f853e0dcf38a71dced68814c8438e6653a4a1486d8066ce50a7c088d476cf796b4872c724687b3ca9d51ec0ed74f54d5d7e47c89b34
21 DIST simage-1.7.0.tar.gz 752602 BLAKE2B feca31f8d41ae67271e43c9c664243d872985068ffc8496d43c9b59a47ae5c3067956acced3ff9abbdc5a360aec662e3972a93d8523a704a72ac9d12dd4cfaa0 SHA512 944ec009dd7041692073ddd9795fdd633fe3bc9101f1c1234e8be3746487a9431aecf52abde01563e719153fbe1ca7d29f9b64042e4a64ea08d6cb14666dd89f
22
23 diff --git a/media-libs/simage/files/simage-1.7.1-cmake-automagic-deps.patch b/media-libs/simage/files/simage-1.7.1-cmake-automagic-deps.patch
24 new file mode 100644
25 index 00000000000..c119c938eeb
26 --- /dev/null
27 +++ b/media-libs/simage/files/simage-1.7.1-cmake-automagic-deps.patch
28 @@ -0,0 +1,497 @@
29 +diff -ruN Coin3D-simage-3bd369da8f08/CMakeLists.txt my/CMakeLists.txt
30 +--- Coin3D-simage-3bd369da8f08/CMakeLists.txt 2018-03-12 19:57:28.000000000 +0100
31 ++++ my/CMakeLists.txt 2018-05-06 08:53:45.202467390 +0200
32 +@@ -74,6 +74,36 @@
33 + set(SIMAGE_GDIPLUS_SUPPORT OFF)
34 + endif()
35 +
36 ++if(GIF_FOUND)
37 ++ option(SIMAGE_GIF_SUPPORT "Enable support for GIF images" ON)
38 ++else()
39 ++ set(SIMAGE_GIF_SUPPORT OFF)
40 ++endif()
41 ++
42 ++if(JASPER_FOUND)
43 ++ option(SIMAGE_JASPER_SUPPORT "Enable support for JPEG2K images" ON)
44 ++else()
45 ++ set(SIMAGE_JASPER_SUPPORT OFF)
46 ++endif()
47 ++
48 ++if(JPEG_FOUND)
49 ++ option(SIMAGE_JPEG_SUPPORT "Enable support for JPEG images" ON)
50 ++else()
51 ++ set(SIMAGE_JPEG_SUPPORT OFF)
52 ++endif()
53 ++
54 ++if(PNG_FOUND)
55 ++ option(SIMAGE_PNG_SUPPORT "Enable support for PNG images" ON)
56 ++else()
57 ++ set(SIMAGE_PNG_SUPPORT OFF)
58 ++endif()
59 ++
60 ++if(TIFF_FOUND)
61 ++ option(SIMAGE_TIFF_SUPPORT "Enable support for TIFF images" ON)
62 ++else()
63 ++ set(SIMAGE_TIFF_SUPPORT OFF)
64 ++endif()
65 ++
66 + if(SNDFILE_FOUND)
67 + option(SIMAGE_LIBSNDFILE_SUPPORT "" ON)
68 + else()
69 +@@ -141,23 +171,23 @@
70 + return 0;
71 + }
72 + " HAVE_GDIPLUS_LOCKBITS_RECTARG_POINTER)
73 +-set(HAVE_GIFLIB ${GIF_FOUND})
74 ++set(HAVE_GIFLIB ${SIMAGE_GIF_SUPPORT})
75 + check_include_files(guile/gh.h HAVE_GUILE_GH_H)
76 + check_include_files(inttypes.h HAVE_INTTYPES_H)
77 +-set(HAVE_JASPER ${JASPER_FOUND})
78 +-set(HAVE_JPEGLIB ${JPG_FOUND})
79 ++set(HAVE_JASPER ${SIMAGE_JASPER_SUPPORT})
80 ++set(HAVE_JPEGLIB ${SIMAGE_JPEG_SUPPORT})
81 + check_include_files(libguile.h HAVE_LIBGUILE_H)
82 + check_include_files(memory.h HAVE_MEMORY_H)
83 +-set(HAVE_PNGLIB ${PNG_FOUND})
84 ++set(HAVE_PNGLIB ${SIMAGE_PNG_SUPPORT})
85 + check_include_files(stdint.h HAVE_STDINT_H)
86 + check_include_files(stdlib.h HAVE_STDLIB_H)
87 + check_include_files(strings.h HAVE_STRINGS_H)
88 + check_include_files(string.h HAVE_STRING_H)
89 + check_include_files(sys/stat.h HAVE_SYS_STAT_H)
90 + check_include_files(sys/types.h HAVE_SYS_TYPES_H)
91 +-set(HAVE_TIFFLIB ${TIFF_FOUND})
92 ++set(HAVE_TIFFLIB ${SIMAGE_TIFF_SUPPORT})
93 + check_include_files(unistd.h HAVE_UNISTD_H)
94 +-set(HAVE_VFW ${VFW_FOUND})
95 ++set(HAVE_VFW ${SIMAGE_AVIENC_SUPPORT})
96 + check_include_files(windows.h HAVE_WINDOWS_H)
97 + set(PACKAGE "simage")
98 + set(PACKAGE_BUGREPORT "coin-support@××××××.org")
99 +@@ -321,27 +351,27 @@
100 + target_link_libraries(simage ${GDIPLUS_LIBRARIES})
101 + endif()
102 +
103 +-if(GIF_FOUND)
104 ++if(SIMAGE_GIF_SUPPORT)
105 + target_include_directories(simage PUBLIC ${GIF_INCLUDE_DIR})
106 + target_link_libraries(simage ${GIF_LIBRARIES})
107 + endif()
108 +
109 +-if(JASPER_FOUND)
110 ++if(SIMAGE_JASPER_SUPPORT)
111 + target_include_directories(simage PUBLIC ${JASPER_INCLUDE_DIR})
112 + target_link_libraries(simage ${JASPER_LIBRARIES})
113 + endif()
114 +
115 +-if(JPEG_FOUND)
116 ++if(SIMAGE_JPEG_SUPPORT)
117 + target_include_directories(simage PUBLIC ${JPEG_INCLUDE_DIR})
118 + target_link_libraries(simage ${JPEG_LIBRARIES})
119 + endif()
120 +
121 +-if(OGGVORBIS_FOUND)
122 ++if(SIMAGE_OGGVORBIS_SUPPORT)
123 + target_include_directories(simage PUBLIC ${OGGVORBIS_INCLUDE_DIRS})
124 + target_link_libraries(simage ${OGGVORBIS_LIBRARIES})
125 + endif()
126 +
127 +-if(PNG_FOUND)
128 ++if(SIMAGE_PNG_SUPPORT)
129 + target_include_directories(simage PUBLIC ${PNG_INCLUDE_DIR})
130 + target_link_libraries(simage ${PNG_LIBRARIES})
131 + endif()
132 +@@ -350,22 +380,22 @@
133 + target_link_libraries(simage ${QT_LIBRARIES})
134 + endif()
135 +
136 +-if(QUICKTIME_FOUND)
137 ++if(SIMAGE_QUICKTIME_SUPPORT)
138 + target_include_directories(simage PUBLIC ${QUICKTIME_INCLUDE_DIR})
139 + target_link_libraries(simage ${QUICKTIME_LIBRARIES})
140 + endif()
141 +
142 +-if(SNDFILE_FOUND)
143 ++if(SIMAGE_LIBSNDFILE_SUPPORT)
144 + target_include_directories(simage PUBLIC ${SNDFILE_INCLUDE_DIRS})
145 + target_link_libraries(simage ${SNDFILE_LIBRARIES})
146 + endif()
147 +
148 +-if(TIFF_FOUND)
149 ++if(SIMAGE_TIFF_SUPPORT)
150 + target_include_directories(simage PUBLIC ${TIFF_INCLUDE_DIR})
151 + target_link_libraries(simage ${TIFF_LIBRARY})
152 + endif()
153 +
154 +-if(VFW_FOUND)
155 ++if(SIMAGE_AVIENC_SUPPORT)
156 + target_link_libraries(simage ${VFW_LIBRARIES})
157 + endif()
158 +
159 +diff -ruN Coin3D-simage-3bd369da8f08/config.h.cmake.in my/config.h.cmake.in
160 +--- Coin3D-simage-3bd369da8f08/config.h.cmake.in 2018-03-12 19:57:28.000000000 +0100
161 ++++ my/config.h.cmake.in 2018-05-06 09:29:09.795849171 +0200
162 +@@ -9,30 +9,18 @@
163 + /* Define if first argument of Gdiplus::Bitmap::LockBits() is a pointer */
164 + #cmakedefine HAVE_GDIPLUS_LOCKBITS_RECTARG_POINTER 1
165 +
166 +-/* define to support the giflib library */
167 +-#cmakedefine HAVE_GIFLIB 1
168 +-
169 + /* Define to 1 if you have the <guile/gh.h> header file. */
170 + #cmakedefine HAVE_GUILE_GH_H 1
171 +
172 + /* Define to 1 if you have the <inttypes.h> header file. */
173 + #cmakedefine HAVE_INTTYPES_H 1
174 +
175 +-/* define to support the jasper library */
176 +-#cmakedefine HAVE_JASPER 1
177 +-
178 +-/* define to support the jpeg library */
179 +-#cmakedefine HAVE_JPEGLIB 1
180 +-
181 + /* Define to 1 if you have the <libguile.h> header file. */
182 + #cmakedefine HAVE_LIBGUILE_H 1
183 +
184 + /* Define to 1 if you have the <memory.h> header file. */
185 + #cmakedefine HAVE_MEMORY_H 1
186 +
187 +-/* define for libpng support */
188 +-#cmakedefine HAVE_PNGLIB 1
189 +-
190 + /* Define to 1 if you have the <stdint.h> header file. */
191 + #cmakedefine HAVE_STDINT_H 1
192 +
193 +@@ -51,15 +39,9 @@
194 + /* Define to 1 if you have the <sys/types.h> header file. */
195 + #cmakedefine HAVE_SYS_TYPES_H 1
196 +
197 +-/* define to support the tiff library */
198 +-#cmakedefine HAVE_TIFFLIB 1
199 +-
200 + /* Define to 1 if you have the <unistd.h> header file. */
201 + #cmakedefine HAVE_UNISTD_H 1
202 +
203 +-/* Define to use the Video for Windows library */
204 +-#cmakedefine HAVE_VFW 1
205 +-
206 + /* Define to 1 if you have the <windows.h> header file. */
207 + #cmakedefine HAVE_WINDOWS_H 1
208 +
209 +@@ -108,6 +90,21 @@
210 + /* define this to the simage minor version number */
211 + #define SIMAGE_MINOR_VERSION @SIMAGE_MINOR_VERSION@
212 +
213 ++/* define to support the giflib library */
214 ++#cmakedefine SIMAGE_GIF_SUPPORT 1
215 ++
216 ++/* define to support the jasper library */
217 ++#cmakedefine SIMAGE_JASPER_SUPPORT 1
218 ++
219 ++/* define to support the jpeg library */
220 ++#cmakedefine SIMAGE_JPEG_SUPPORT 1
221 ++
222 ++/* define for libpng support */
223 ++#cmakedefine SIMAGE_PNG_SUPPORT 1
224 ++
225 ++/* define to support the tiff library */
226 ++#cmakedefine SIMAGE_TIFF_SUPPORT 1
227 ++
228 + /* define to enable mpeg2enc support */
229 + #cmakedefine SIMAGE_MPEG2ENC_SUPPORT 1
230 +
231 +diff -ruN Coin3D-simage-3bd369da8f08/include/simage_gif.h my/include/simage_gif.h
232 +--- Coin3D-simage-3bd369da8f08/include/simage_gif.h 2018-03-12 19:57:28.000000000 +0100
233 ++++ my/include/simage_gif.h 2018-05-06 09:42:19.739539807 +0200
234 +@@ -21,9 +21,9 @@
235 + #include <config.h>
236 + #endif /* HAVE_CONFIG_H */
237 +
238 +-#ifndef HAVE_GIFLIB
239 ++#ifndef SIMAGE_GIF_SUPPORT
240 + #error "This file should not be used under the current configuration!"
241 +-#endif /* !HAVE_GIFLIB */
242 ++#endif /* !SIMAGE_GIF_SUPPORT */
243 +
244 + #ifdef __cplusplus
245 + extern "C" {
246 +diff -ruN Coin3D-simage-3bd369da8f08/include/simage_jasper.h my/include/simage_jasper.h
247 +--- Coin3D-simage-3bd369da8f08/include/simage_jasper.h 2018-03-12 19:57:28.000000000 +0100
248 ++++ my/include/simage_jasper.h 2018-05-06 09:42:31.084498335 +0200
249 +@@ -21,9 +21,9 @@
250 + #include <config.h>
251 + #endif /* HAVE_CONFIG_H */
252 +
253 +-#ifndef HAVE_JASPER
254 ++#ifndef SIMAGE_JASPER_SUPPORT
255 + #error "This file should not be used under the current configuration!"
256 +-#endif /* !HAVE_JASPERLIB */
257 ++#endif /* !SIMAGE_JASPER_SUPPORT */
258 +
259 + #ifdef __cplusplus
260 + extern "C" {
261 +diff -ruN Coin3D-simage-3bd369da8f08/include/simage_jpeg.h my/include/simage_jpeg.h
262 +--- Coin3D-simage-3bd369da8f08/include/simage_jpeg.h 2018-03-12 19:57:28.000000000 +0100
263 ++++ my/include/simage_jpeg.h 2018-05-06 09:42:50.762422085 +0200
264 +@@ -21,9 +21,9 @@
265 + #include <config.h>
266 + #endif /* HAVE_CONFIG_H */
267 +
268 +-#ifndef HAVE_JPEGLIB
269 ++#ifndef SIMAGE_JPEG_SUPPORT
270 + #error "This file should not be used under the current configuration!"
271 +-#endif /* !HAVE_JPEGLIB */
272 ++#endif /* !SIMAGE_JPEG_SUPPORT */
273 +
274 + #ifdef __cplusplus
275 + extern "C" {
276 +diff -ruN Coin3D-simage-3bd369da8f08/include/simage_png.h my/include/simage_png.h
277 +--- Coin3D-simage-3bd369da8f08/include/simage_png.h 2018-03-12 19:57:28.000000000 +0100
278 ++++ my/include/simage_png.h 2018-05-06 09:43:08.250349842 +0200
279 +@@ -21,9 +21,9 @@
280 + #include <config.h>
281 + #endif /* HAVE_CONFIG_H */
282 +
283 +-#ifndef HAVE_PNGLIB
284 ++#ifndef SIMAGE_PNG_SUPPORT
285 + #error "This file should not be used under the current configuration!"
286 +-#endif /* !HAVE_PNGLIB */
287 ++#endif /* !SIMAGE_PNG_SUPPORT */
288 +
289 + #ifdef __cplusplus
290 + extern "C" {
291 +diff -ruN Coin3D-simage-3bd369da8f08/include/simage_tiff.h my/include/simage_tiff.h
292 +--- Coin3D-simage-3bd369da8f08/include/simage_tiff.h 2018-03-12 19:57:28.000000000 +0100
293 ++++ my/include/simage_tiff.h 2018-05-06 09:43:32.091244844 +0200
294 +@@ -21,9 +21,9 @@
295 + #include <config.h>
296 + #endif /* HAVE_CONFIG_H */
297 +
298 +-#ifndef HAVE_TIFFLIB
299 ++#ifndef SIMAGE_TIFF_SUPPORT
300 + #error "This file should not be used under the current configuration!"
301 +-#endif /* !HAVE_TIFFLIB */
302 ++#endif /* !SIMAGE_TIFF_SUPPORT */
303 +
304 + #ifdef __cplusplus
305 + extern "C" {
306 +diff -ruN Coin3D-simage-3bd369da8f08/src/simage_gif.c my/src/simage_gif.c
307 +--- Coin3D-simage-3bd369da8f08/src/simage_gif.c 2018-03-12 19:57:28.000000000 +0100
308 ++++ my/src/simage_gif.c 2018-05-06 09:40:56.444783960 +0200
309 +@@ -23,7 +23,7 @@
310 + #include <config.h>
311 + #endif /* HAVE_CONFIG_H */
312 +
313 +-#ifdef HAVE_GIFLIB
314 ++#ifdef SIMAGE_GIF_SUPPORT
315 +
316 + #include <simage_gif.h>
317 + #include <stdlib.h>
318 +@@ -409,4 +409,4 @@
319 + return 1;
320 + }
321 +
322 +-#endif /* HAVE_GIFLIB */
323 ++#endif /* SIMAGE_GIF_SUPPORT */
324 +diff -ruN Coin3D-simage-3bd369da8f08/src/simage_jasper.c my/src/simage_jasper.c
325 +--- Coin3D-simage-3bd369da8f08/src/simage_jasper.c 2018-03-12 19:57:28.000000000 +0100
326 ++++ my/src/simage_jasper.c 2018-05-06 09:30:40.082652034 +0200
327 +@@ -23,7 +23,7 @@
328 + #include <config.h>
329 + #endif /* HAVE_CONFIG_H */
330 +
331 +-#ifdef HAVE_JASPER
332 ++#ifdef SIMAGE_JASPER_SUPPORT
333 +
334 + #include <simage_jasper.h>
335 +
336 +@@ -331,4 +331,4 @@
337 + return 0;
338 + }
339 +
340 +-#endif /* HAVE_JASPER */
341 ++#endif /* SIMAGE_JASPER_SUPPORT */
342 +diff -ruN Coin3D-simage-3bd369da8f08/src/simage_jpeg.c my/src/simage_jpeg.c
343 +--- Coin3D-simage-3bd369da8f08/src/simage_jpeg.c 2018-03-12 19:57:28.000000000 +0100
344 ++++ my/src/simage_jpeg.c 2018-05-06 09:31:06.325304369 +0200
345 +@@ -23,7 +23,7 @@
346 + #include <config.h>
347 + #endif /* HAVE_CONFIG_H */
348 +
349 +-#ifdef HAVE_JPEGLIB
350 ++#ifdef SIMAGE_JPEG_SUPPORT
351 +
352 + #include <stdio.h>
353 + #include <setjmp.h>
354 +@@ -74,7 +74,7 @@
355 + strncpy(buffer, "JPEG saver: Error opening file", buflen);
356 + break;
357 + case ERR_JPEGLIB_WRITE:
358 +- strncpy(buffer, "JPEG saver: Internal libjpeg error", buflen);
359 ++ strncpy(buffer, "JPEG saver: Internal libjpeg error", buflen);
360 + break;
361 + }
362 + return jpegerror;
363 +@@ -89,7 +89,7 @@
364 +
365 + typedef struct my_error_mgr * my_error_ptr;
366 +
367 +-static void
368 ++static void
369 + my_error_exit (j_common_ptr cinfo)
370 + {
371 + /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */
372 +@@ -105,7 +105,7 @@
373 + longjmp(myerr->setjmp_buffer, 1);
374 + }
375 +
376 +-int
377 ++int
378 + simage_jpeg_identify(const char * ptr,
379 + const unsigned char *header,
380 + int headerlen)
381 +@@ -113,9 +113,9 @@
382 + static unsigned char jpgcmp[] = {'J', 'F', 'I', 'F' };
383 + static unsigned char jpgcmp2[] = {'E', 'x', 'i', 'f' };
384 + if (headerlen < 10) return 0;
385 +- if (memcmp((const void*)&header[6],
386 ++ if (memcmp((const void*)&header[6],
387 + (const void*)jpgcmp, 4) == 0) return 1;
388 +- if (memcmp((const void*)&header[6],
389 ++ if (memcmp((const void*)&header[6],
390 + (const void*)jpgcmp2, 4) == 0) return 1;
391 + return 0;
392 + }
393 +@@ -215,7 +215,7 @@
394 + format = 3;
395 + cinfo.out_color_space = JCS_RGB;
396 + }
397 +-
398 ++
399 + (void) jpeg_start_decompress(&cinfo);
400 + /* We can ignore the return value since suspension is not possible
401 + * with the stdio data source.
402 +@@ -234,20 +234,20 @@
403 + ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
404 + width = cinfo.output_width;
405 + height = cinfo.output_height;
406 +- buffer = currPtr = (unsigned char*)
407 ++ buffer = currPtr = (unsigned char*)
408 + malloc(width*height*cinfo.output_components);
409 +-
410 ++
411 + /* Step 6: while (scan lines remain to be read) */
412 + /* jpeg_read_scanlines(...); */
413 +
414 + /* Here we use the library's state variable cinfo.output_scanline as the
415 + * loop counter, so that we don't have to keep track ourselves.
416 + */
417 +-
418 ++
419 + /* flip image upside down */
420 + if (buffer) {
421 +- currPtr = buffer + row_stride * (cinfo.output_height-1);
422 +-
423 ++ currPtr = buffer + row_stride * (cinfo.output_height-1);
424 ++
425 + while (cinfo.output_scanline < cinfo.output_height) {
426 + /* jpeg_read_scanlines expects an array of pointers to scanlines.
427 + * Here the array is only one element long, but you could ask for
428 +@@ -293,7 +293,7 @@
429 + return buffer;
430 + }
431 +
432 +-int
433 ++int
434 + simage_jpeg_save(const char * filename,
435 + const unsigned char * bytes,
436 + int width,
437 +@@ -321,7 +321,7 @@
438 + int quality;
439 + unsigned char * tmpbytes;
440 + int bytesperrow;
441 +-
442 ++
443 + quality = 90;
444 + tmpbytes = NULL;
445 +
446 +@@ -375,7 +375,7 @@
447 + /*
448 + * alpha channel is not supported for jpeg. strip it.
449 + */
450 +-
451 ++
452 + if (numcomponents == 4) {
453 + unsigned char * dst;
454 + const unsigned char * src;
455 +@@ -383,8 +383,8 @@
456 + dst = tmpbytes = (unsigned char *) malloc(n*3);
457 + src = bytes;
458 + for (i = 0; i < n; i++) {
459 +- *dst++ = *src++;
460 +- *dst++ = *src++;
461 ++ *dst++ = *src++;
462 ++ *dst++ = *src++;
463 + *dst++ = *src++;
464 + src++;
465 + }
466 +@@ -397,7 +397,7 @@
467 + dst = tmpbytes = (unsigned char *) malloc(n*3);
468 + src = bytes;
469 + for (i = 0; i < n; i++) {
470 +- *dst++ = *src++;
471 ++ *dst++ = *src++;
472 + src++;
473 + }
474 + numcomponents = 1;
475 +@@ -408,7 +408,7 @@
476 + /* First we supply a description of the input image.
477 + * Four fields of the cinfo struct must be filled in:
478 + */
479 +-
480 ++
481 + cinfo.image_width = width; /* image width and height, in pixels */
482 + cinfo.image_height = height;
483 + cinfo.input_components = numcomponents; /* # of color components per pixel */
484 +@@ -468,4 +468,4 @@
485 + return 1;
486 + }
487 +
488 +-#endif /* HAVE_JPEGLIB */
489 ++#endif /* SIMAGE_JPEG_SUPPORT */
490 +diff -ruN Coin3D-simage-3bd369da8f08/src/simage_png.c my/src/simage_png.c
491 +--- Coin3D-simage-3bd369da8f08/src/simage_png.c 2018-03-12 19:57:28.000000000 +0100
492 ++++ my/src/simage_png.c 2018-05-06 09:32:01.648571705 +0200
493 +@@ -22,7 +22,7 @@
494 + #include <config.h>
495 + #endif /* HAVE_CONFIG_H */
496 +
497 +-#ifdef HAVE_PNGLIB
498 ++#ifdef SIMAGE_PNG_SUPPORT
499 +
500 + #include <simage_png.h>
501 + #include <stdio.h>
502 +@@ -479,4 +479,4 @@
503 + return 1;
504 + }
505 +
506 +-#endif /* HAVE_PNGLIB */
507 ++#endif /* SIMAGE_PNG_SUPPORT */
508 +diff -ruN Coin3D-simage-3bd369da8f08/src/simage_tiff.c my/src/simage_tiff.c
509 +--- Coin3D-simage-3bd369da8f08/src/simage_tiff.c 2018-03-12 19:57:28.000000000 +0100
510 ++++ my/src/simage_tiff.c 2018-05-06 09:32:43.539017111 +0200
511 +@@ -23,7 +23,7 @@
512 + #include <config.h>
513 + #endif /* HAVE_CONFIG_H */
514 +
515 +-#ifdef HAVE_TIFFLIB
516 ++#ifdef SIMAGE_TIFF_SUPPORT
517 +
518 + #include <simage_tiff.h>
519 + #include <stdio.h>
520 +@@ -683,4 +683,4 @@
521 + #undef CVT
522 + #undef pack
523 +
524 +-#endif /* HAVE_TIFFLIB */
525 ++#endif /* SIMAGE_TIFF_SUPPORT */
526
527 diff --git a/media-libs/simage/simage-1.7.1a_beta_pre20180312.ebuild b/media-libs/simage/simage-1.7.1a_beta_pre20180312.ebuild
528 new file mode 100644
529 index 00000000000..01635618aef
530 --- /dev/null
531 +++ b/media-libs/simage/simage-1.7.1a_beta_pre20180312.ebuild
532 @@ -0,0 +1,72 @@
533 +# Copyright 1999-2018 Gentoo Foundation
534 +# Distributed under the terms of the GNU General Public License v2
535 +
536 +EAPI=6
537 +
538 +inherit cmake-utils flag-o-matic
539 +
540 +MY_P=Coin3D-simage-3bd369da8f08
541 +
542 +DESCRIPTION="Image and video texturing library"
543 +HOMEPAGE="https://bitbucket.org/Coin3D/simage"
544 +SRC_URI="https://dev.gentoo.org/~reavertm/${MY_P}.tar.bz2"
545 +
546 +LICENSE="public-domain mpeg2enc"
547 +KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86"
548 +SLOT="0"
549 +IUSE="debug gif jpeg jpeg2k png qt5 sndfile tiff vorbis"
550 +
551 +RDEPEND="
552 + gif? ( media-libs/giflib )
553 + jpeg? ( virtual/jpeg:0= )
554 + jpeg2k? ( media-libs/jasper )
555 + png? ( media-libs/libpng:0= )
556 + qt5? (
557 + dev-qt/qtcore:5
558 + dev-qt/qtgui:5
559 + )
560 + sndfile? ( media-libs/libsndfile )
561 + tiff? ( media-libs/tiff:0= )
562 + vorbis? (
563 + media-libs/libogg
564 + media-libs/libvorbis
565 + )
566 +"
567 +DEPEND="${RDEPEND}"
568 +
569 +S="${WORKDIR}/${MY_P}"
570 +
571 +PATCHES=(
572 + "${FILESDIR}/${PN}-1.7.1-cmake-automagic-deps.patch"
573 +)
574 +
575 +DOCS=(AUTHORS ChangeLog NEWS README)
576 +
577 +src_configure() {
578 + use debug && append-cppflags -DSIMAGE_DEBUG=1
579 +
580 + local mycmakeargs=(
581 + -DSIMAGE_AVIENC_SUPPORT=OFF # Windows only
582 + -DSIMAGE_BUILD_SHARED_LIBS=ON
583 + -DSIMAGE_CGIMAGE_SUPPORT=OFF # OS X only
584 + -DSIMAGE_EPS_SUPPORT=ON
585 + -DSIMAGE_GDIPLUS_SUPPORT=OFF # Windows only
586 + -DSIMAGE_GIF_SUPPORT=$(usex gif)
587 + -DSIMAGE_JASPER_SUPPORT=$(usex jpeg2k)
588 + -DSIMAGE_JPEG_SUPPORT=$(usex jpeg)
589 + -DSIMAGE_LIBSNDFILE_SUPPORT=$(usex sndfile)
590 + -DSIMAGE_MPEG2ENC_SUPPORT=ON
591 + -DSIMAGE_OGGVORBIS_SUPPORT=$(usex vorbis)
592 + -DSIMAGE_PIC_SUPPORT=ON
593 + -DSIMAGE_PNG_SUPPORT=$(usex png)
594 + -DSIMAGE_QIMAGE_SUPPORT=$(usex qt5)
595 + -DSIMAGE_QUICKTIME_SUPPORT=OFF # OS X only
596 + -DSIMAGE_TIFF_SUPPORT=$(usex tiff)
597 + -DUSE_QT5=ON
598 + -DSIMAGE_RGB_SUPPORT=ON
599 + -DSIMAGE_TGA_SUPPORT=ON
600 + -DSIMAGE_XWD_SUPPORT=ON
601 + )
602 +
603 + cmake-utils_src_configure
604 +}