Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libgphoto2/files/, media-libs/libgphoto2/
Date: Sat, 30 Jul 2016 20:37:37
Message-Id: 1469911024.dc3d9fbf3a2860cc932c5856a45f691128c28df6.pacho@gentoo
1 commit: dc3d9fbf3a2860cc932c5856a45f691128c28df6
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 30 20:18:57 2016 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 30 20:37:04 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc3d9fbf
7
8 media-libs/libgphoto2: Fix build with latest jpeg-turbo (#586336 by Ulenrich)
9
10 Package-Manager: portage-2.3.0
11
12 .../libgphoto2/files/libgphoto2-2.5.10-jpeg.patch | 92 ++++++++++++++++++++++
13 media-libs/libgphoto2/libgphoto2-2.5.10.ebuild | 6 ++
14 2 files changed, 98 insertions(+)
15
16 diff --git a/media-libs/libgphoto2/files/libgphoto2-2.5.10-jpeg.patch b/media-libs/libgphoto2/files/libgphoto2-2.5.10-jpeg.patch
17 new file mode 100644
18 index 0000000..34baead
19 --- /dev/null
20 +++ b/media-libs/libgphoto2/files/libgphoto2-2.5.10-jpeg.patch
21 @@ -0,0 +1,92 @@
22 +From 0df14db3eda1b780a27b1c54bc8f251d15afebbc Mon Sep 17 00:00:00 2001
23 +From: Patrick Ohly <patrick.ohly@×××××.com>
24 +Date: Wed, 15 Jun 2016 10:33:24 +0200
25 +Subject: [PATCH] jpeg_memsrcdest: extend feature check
26 +
27 +libjpeg.h in OpenEmbedded master (from libjpeg-turbo 1.5.0) provides
28 +these methods if "JPEG_LIB_VERSION >= 80 ||
29 +defined(MEM_SRCDST_SUPPORTED)".
30 +
31 +The support for the jpeg_mem functions was added even when not
32 +emulating the libjpeg8 API, controlled via the MEM_SRCDST_SUPPORTED
33 +define, so checking for the version alone is not enough anymore.
34 +
35 +See https://github.com/libjpeg-turbo/libjpeg-turbo/commit/ab70623eb29e09e67222be5b9e1ea320fe5aa0e9
36 +
37 +This fixes errors about conflicting declarations (signed vs. unsigned
38 +char).
39 +
40 +Signed-off-by: Patrick Ohly <patrick.ohly@×××××.com>
41 +---
42 + camlibs/ax203/jpeg_memsrcdest.c | 4 ++--
43 + camlibs/ax203/jpeg_memsrcdest.h | 4 ++++
44 + camlibs/jl2005c/jpeg_memsrcdest.c | 4 ++--
45 + camlibs/jl2005c/jpeg_memsrcdest.h | 4 ++++
46 + 4 files changed, 12 insertions(+), 4 deletions(-)
47 +
48 +diff --git a/camlibs/ax203/jpeg_memsrcdest.c b/camlibs/ax203/jpeg_memsrcdest.c
49 +index 0ed83b1..5614573 100644
50 +--- a/camlibs/ax203/jpeg_memsrcdest.c
51 ++++ b/camlibs/ax203/jpeg_memsrcdest.c
52 +@@ -25,8 +25,8 @@
53 + #include "jpeg_memsrcdest.h"
54 +
55 + /* libjpeg8 and later come with their own (API compatible) memory source
56 +- and dest */
57 +-#if JPEG_LIB_VERSION < 80
58 ++ and dest, and older versions may have it backported */
59 ++#if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED)
60 +
61 + /* Expanded data source object for memory input */
62 +
63 +diff --git a/camlibs/ax203/jpeg_memsrcdest.h b/camlibs/ax203/jpeg_memsrcdest.h
64 +index e971182..b13bf3f 100644
65 +--- a/camlibs/ax203/jpeg_memsrcdest.h
66 ++++ b/camlibs/ax203/jpeg_memsrcdest.h
67 +@@ -1,5 +1,7 @@
68 + #include <jpeglib.h>
69 +
70 ++#if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED)
71 ++
72 + void
73 + jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer,
74 + unsigned long bufsize);
75 +@@ -7,3 +9,5 @@ jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer,
76 + void
77 + jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer,
78 + unsigned long * outsize);
79 ++
80 ++#endif
81 +diff --git a/camlibs/jl2005c/jpeg_memsrcdest.c b/camlibs/jl2005c/jpeg_memsrcdest.c
82 +index 321f926..b65310e 100644
83 +--- a/camlibs/jl2005c/jpeg_memsrcdest.c
84 ++++ b/camlibs/jl2005c/jpeg_memsrcdest.c
85 +@@ -25,8 +25,8 @@
86 + #include "jpeg_memsrcdest.h"
87 +
88 + /* libjpeg8 and later come with their own (API compatible) memory source
89 +- and dest */
90 +-#if JPEG_LIB_VERSION < 80
91 ++ and dest, and older versions may have it backported */
92 ++#if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED)
93 +
94 + /* Expanded data source object for memory input */
95 +
96 +diff --git a/camlibs/jl2005c/jpeg_memsrcdest.h b/camlibs/jl2005c/jpeg_memsrcdest.h
97 +index e971182..b13bf3f 100644
98 +--- a/camlibs/jl2005c/jpeg_memsrcdest.h
99 ++++ b/camlibs/jl2005c/jpeg_memsrcdest.h
100 +@@ -1,5 +1,7 @@
101 + #include <jpeglib.h>
102 +
103 ++#if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED)
104 ++
105 + void
106 + jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer,
107 + unsigned long bufsize);
108 +@@ -7,3 +9,5 @@ jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer,
109 + void
110 + jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer,
111 + unsigned long * outsize);
112 ++
113 ++#endif
114
115 diff --git a/media-libs/libgphoto2/libgphoto2-2.5.10.ebuild b/media-libs/libgphoto2/libgphoto2-2.5.10.ebuild
116 index 68f656a..47f1d21 100644
117 --- a/media-libs/libgphoto2/libgphoto2-2.5.10.ebuild
118 +++ b/media-libs/libgphoto2/libgphoto2-2.5.10.ebuild
119 @@ -75,6 +75,12 @@ MULTILIB_CHOST_TOOLS=(
120 /usr/bin/gphoto2-config
121 )
122
123 +PATCHES=(
124 + # Fix building with latest jpeg-turbo, bug #586336, fixed in the
125 + # next version
126 + "${FILESDIR}"/${P}-jpeg.patch
127 +)
128 +
129 pkg_pretend() {
130 if ! echo "${USE}" | grep "cameras_" > /dev/null 2>&1; then
131 einfo "No camera drivers will be built since you did not specify any."