add debian patch to fix build against libjpeg 1.5.0

This commit is contained in:
Peter Robinson 2016-07-11 11:10:23 +00:00
parent 9debd7121e
commit 8b8be29ea7
2 changed files with 76 additions and 0 deletions

View File

@ -8,10 +8,13 @@ Group: Development/Libraries
# GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2
License: GPLv2+ and GPLv2
URL: http://www.gphoto.org/
Source0: http://downloads.sourceforge.net/gphoto/%{name}-%{version}.tar.bz2
Patch1: gphoto2-pkgcfg.patch
Patch2: gphoto2-storage.patch
Patch3: gphoto2-device-return.patch
Patch4: libjpeg_turbo_1.5.0_fix.patch
BuildRequires: libusbx-devel
BuildRequires: lockdev-devel
BuildRequires: libexif-devel
@ -51,6 +54,7 @@ use libgphoto2.
%patch1 -p1 -b .pkgcfg
%patch2 -p1 -b .storage
%patch3 -p1 -b .device-return
%patch4 -p1 -b .png
for i in AUTHORS ChangeLog COPYING libgphoto2_port/AUTHORS libgphoto2_port/COPYING.LIB `find -name 'README.*'`; do
mv ${i} ${i}.old

View File

@ -0,0 +1,72 @@
Description: Close bug #827629.
conflicting types for 'jpeg_mem_src' with
libjpeg-turbo62 1.5.0
Author: Patrick Ohly <patrick.ohly@intel.com>
Reviewed-by: Herbert Parentes Fortes Neto <hpfn@ig.com.br>
Last-Update: 2016-06-19
Index: libgphoto2-2.5.10/camlibs/ax203/jpeg_memsrcdest.c
===================================================================
--- libgphoto2-2.5.10.orig/camlibs/ax203/jpeg_memsrcdest.c
+++ libgphoto2-2.5.10/camlibs/ax203/jpeg_memsrcdest.c
@@ -25,8 +25,8 @@
#include "jpeg_memsrcdest.h"
/* libjpeg8 and later come with their own (API compatible) memory source
- and dest */
-#if JPEG_LIB_VERSION < 80
+ and dest, and older versions may have it backported */
+#if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED)
/* Expanded data source object for memory input */
Index: libgphoto2-2.5.10/camlibs/ax203/jpeg_memsrcdest.h
===================================================================
--- libgphoto2-2.5.10.orig/camlibs/ax203/jpeg_memsrcdest.h
+++ libgphoto2-2.5.10/camlibs/ax203/jpeg_memsrcdest.h
@@ -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 @@ jpeg_mem_src (j_decompress_ptr cinfo, un
void
jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer,
unsigned long * outsize);
+
+#endif
Index: libgphoto2-2.5.10/camlibs/jl2005c/jpeg_memsrcdest.c
===================================================================
--- libgphoto2-2.5.10.orig/camlibs/jl2005c/jpeg_memsrcdest.c
+++ libgphoto2-2.5.10/camlibs/jl2005c/jpeg_memsrcdest.c
@@ -25,8 +25,8 @@
#include "jpeg_memsrcdest.h"
/* libjpeg8 and later come with their own (API compatible) memory source
- and dest */
-#if JPEG_LIB_VERSION < 80
+ and dest, and older versions may have it backported */
+#if JPEG_LIB_VERSION < 80 && !defined(MEM_SRCDST_SUPPORTED)
/* Expanded data source object for memory input */
Index: libgphoto2-2.5.10/camlibs/jl2005c/jpeg_memsrcdest.h
===================================================================
--- libgphoto2-2.5.10.orig/camlibs/jl2005c/jpeg_memsrcdest.h
+++ libgphoto2-2.5.10/camlibs/jl2005c/jpeg_memsrcdest.h
@@ -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 @@ jpeg_mem_src (j_decompress_ptr cinfo, un
void
jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer,
unsigned long * outsize);
+
+#endif