libgphoto2: correct compatibility issues with libjpeg-turbo-1.5.0

Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Derek Straka
2016-06-15 09:18:02 -04:00
committed by Martin Jansa
parent 7e8e0fbadd
commit 9222832866
2 changed files with 55 additions and 4 deletions
@@ -0,0 +1,54 @@
--- libgphoto2-2.5.8/camlibs/ax203/jpeg_memsrcdest.h.orig 2016-06-15 09:03:20.625774684 -0400
+++ libgphoto2-2.5.8/camlibs/ax203/jpeg_memsrcdest.h 2016-06-15 09:03:47.049774148 -0400
@@ -1,5 +1,7 @@
#include <jpeglib.h>
+#if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED)
+
void
jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer,
unsigned long bufsize);
@@ -7,3 +9,5 @@
void
jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer,
unsigned long * outsize);
+
+#endif
--- libgphoto2-2.5.8/camlibs/ax203/jpeg_memsrcdest.c.orig 2016-06-15 09:03:58.689773913 -0400
+++ libgphoto2-2.5.8/camlibs/ax203/jpeg_memsrcdest.c 2016-06-15 09:04:17.769773526 -0400
@@ -26,7 +26,7 @@
/* libjpeg8 and later come with their own (API compatible) memory source
and dest */
-#if JPEG_LIB_VERSION < 80
+#if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED)
/* Expanded data source object for memory input */
--- libgphoto2-2.5.8/camlibs/jl2005c/jpeg_memsrcdest.h.orig 2016-06-15 09:05:01.893772632 -0400
+++ libgphoto2-2.5.8/camlibs/jl2005c/jpeg_memsrcdest.h 2016-06-15 09:05:17.433772318 -0400
@@ -1,5 +1,7 @@
#include <jpeglib.h>
+#if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED)
+
void
jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer,
unsigned long bufsize);
@@ -7,3 +9,5 @@
void
jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer,
unsigned long * outsize);
+
+#endif
--- libgphoto2-2.5.8/camlibs/jl2005c/jpeg_memsrcdest.c.orig 2016-06-15 09:04:42.641773022 -0400
+++ libgphoto2-2.5.8/camlibs/jl2005c/jpeg_memsrcdest.c 2016-06-15 09:04:48.657772901 -0400
@@ -26,7 +26,7 @@
/* libjpeg8 and later come with their own (API compatible) memory source
and dest */
-#if JPEG_LIB_VERSION < 80
+#if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED)
/* Expanded data source object for memory input */
@@ -14,6 +14,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/libgphoto2-${PV}.tar.bz2;name=libgphoto2
file://10-camera-libgphoto2.fdi \
file://40-libgphoto2.rules \
file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \
file://0002-correct-jpeg-memsrcdest-support.patch \
"
SRC_URI[libgphoto2.md5sum] = "873ab01aced49c6b92a98e515db5dcef"
@@ -52,7 +53,3 @@ FILES_libgphotoport = "${libdir}/libgphoto2_port.so.*"
FILES_${PN} += "${nonarch_base_libdir}/udev/* ${datadir}/hal"
FILES_${PN}-dbg += "${libdir}/*/*/.debug"
FILES_${PN}-dev += "${libdir}/*/*/*.la"
# | ../../libgphoto2-2.5.8/camlibs/ax203/jpeg_memsrcdest.h:4:1: error: conflicting types for 'jpeg_mem_src'
# | jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer,
PNBLACKLIST[libgphoto2] ?= "Not compatible with libjpeg-turbo-1.5.0"