From 8ec5f5465a9844b8be14464be8f5020008d22194 Mon Sep 17 00:00:00 2001 From: Juergen Daubert Date: Wed, 17 Aug 2016 15:01:59 +0200 Subject: libgphoto2: fix build with jpeg-turbo 1.5.0, FS#1335 --- libgphoto2/.md5sum | 1 + libgphoto2/Pkgfile | 8 ++-- libgphoto2/jpeg-1.5.0.patch | 92 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 libgphoto2/jpeg-1.5.0.patch (limited to 'libgphoto2') diff --git a/libgphoto2/.md5sum b/libgphoto2/.md5sum index 5affff8f4..4cda53d3b 100644 --- a/libgphoto2/.md5sum +++ b/libgphoto2/.md5sum @@ -1 +1,2 @@ +04132b5a9a650929cef68b7eb360a057 jpeg-1.5.0.patch f1e53e684a3ea51cc7958d7e4eee7f37 libgphoto2-2.5.10.tar.bz2 diff --git a/libgphoto2/Pkgfile b/libgphoto2/Pkgfile index cf8eeb92e..bb449f333 100644 --- a/libgphoto2/Pkgfile +++ b/libgphoto2/Pkgfile @@ -6,18 +6,20 @@ name=libgphoto2 version=2.5.10 -release=1 -source=(http://downloads.sourceforge.net/project/gphoto/libgphoto/$version/$name-$version.tar.bz2) +release=2 +source=(http://downloads.sourceforge.net/project/gphoto/libgphoto/$version/$name-$version.tar.bz2 + jpeg-1.5.0.patch) build () { cd $name-$version + patch -p1 -i $SRC/jpeg-1.5.0.patch udevscriptdir=/lib/udev \ ./configure --prefix=/usr --disable-nls make make DESTDIR=$PKG install - + rm -r $PKG/usr/share/doc rm $PKG/usr/lib/libgphoto2*/*/*.la } diff --git a/libgphoto2/jpeg-1.5.0.patch b/libgphoto2/jpeg-1.5.0.patch new file mode 100644 index 000000000..34baeadd6 --- /dev/null +++ b/libgphoto2/jpeg-1.5.0.patch @@ -0,0 +1,92 @@ +From 0df14db3eda1b780a27b1c54bc8f251d15afebbc Mon Sep 17 00:00:00 2001 +From: Patrick Ohly +Date: Wed, 15 Jun 2016 10:33:24 +0200 +Subject: [PATCH] jpeg_memsrcdest: extend feature check + +libjpeg.h in OpenEmbedded master (from libjpeg-turbo 1.5.0) provides +these methods if "JPEG_LIB_VERSION >= 80 || +defined(MEM_SRCDST_SUPPORTED)". + +The support for the jpeg_mem functions was added even when not +emulating the libjpeg8 API, controlled via the MEM_SRCDST_SUPPORTED +define, so checking for the version alone is not enough anymore. + +See https://github.com/libjpeg-turbo/libjpeg-turbo/commit/ab70623eb29e09e67222be5b9e1ea320fe5aa0e9 + +This fixes errors about conflicting declarations (signed vs. unsigned +char). + +Signed-off-by: Patrick Ohly +--- + camlibs/ax203/jpeg_memsrcdest.c | 4 ++-- + camlibs/ax203/jpeg_memsrcdest.h | 4 ++++ + camlibs/jl2005c/jpeg_memsrcdest.c | 4 ++-- + camlibs/jl2005c/jpeg_memsrcdest.h | 4 ++++ + 4 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/camlibs/ax203/jpeg_memsrcdest.c b/camlibs/ax203/jpeg_memsrcdest.c +index 0ed83b1..5614573 100644 +--- a/camlibs/ax203/jpeg_memsrcdest.c ++++ b/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 */ + +diff --git a/camlibs/ax203/jpeg_memsrcdest.h b/camlibs/ax203/jpeg_memsrcdest.h +index e971182..b13bf3f 100644 +--- a/camlibs/ax203/jpeg_memsrcdest.h ++++ b/camlibs/ax203/jpeg_memsrcdest.h +@@ -1,5 +1,7 @@ + #include + ++#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, unsigned char * buffer, + void + jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer, + unsigned long * outsize); ++ ++#endif +diff --git a/camlibs/jl2005c/jpeg_memsrcdest.c b/camlibs/jl2005c/jpeg_memsrcdest.c +index 321f926..b65310e 100644 +--- a/camlibs/jl2005c/jpeg_memsrcdest.c ++++ b/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 */ + +diff --git a/camlibs/jl2005c/jpeg_memsrcdest.h b/camlibs/jl2005c/jpeg_memsrcdest.h +index e971182..b13bf3f 100644 +--- a/camlibs/jl2005c/jpeg_memsrcdest.h ++++ b/camlibs/jl2005c/jpeg_memsrcdest.h +@@ -1,5 +1,7 @@ + #include + ++#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, unsigned char * buffer, + void + jpeg_mem_dest (j_compress_ptr cinfo, unsigned char ** outbuffer, + unsigned long * outsize); ++ ++#endif -- cgit v1.2.3