From 3048b27f9677e303184c4c7f17af4f4560a207ebc6ce77c0402e17f840dded40 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 9 Jun 2016 13:56:15 +0000 Subject: [PATCH] - libgphoto2-newjpeg.patch: jpeg_mem_src gets a const buffer now in new libjpeg-turbo. OBS-URL: https://build.opensuse.org/package/show/graphics/libgphoto2?expand=0&rev=153 --- libgphoto2-newjpeg.patch | 26 ++++++++++++++++++++++++++ libgphoto2.changes | 6 ++++++ libgphoto2.spec | 4 ++++ 3 files changed, 36 insertions(+) create mode 100644 libgphoto2-newjpeg.patch diff --git a/libgphoto2-newjpeg.patch b/libgphoto2-newjpeg.patch new file mode 100644 index 0000000..895c943 --- /dev/null +++ b/libgphoto2-newjpeg.patch @@ -0,0 +1,26 @@ +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,7 +1,7 @@ + #include + + void +-jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer, ++jpeg_mem_src (j_decompress_ptr cinfo, const unsigned char * buffer, + unsigned long bufsize); + + void +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,7 +1,7 @@ + #include + + void +-jpeg_mem_src (j_decompress_ptr cinfo, unsigned char * buffer, ++jpeg_mem_src (j_decompress_ptr cinfo, const unsigned char * buffer, + unsigned long bufsize); + + void diff --git a/libgphoto2.changes b/libgphoto2.changes index 40d84fa..071170d 100644 --- a/libgphoto2.changes +++ b/libgphoto2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 9 13:55:38 UTC 2016 - meissner@suse.com + +- libgphoto2-newjpeg.patch: jpeg_mem_src gets a const buffer now + in new libjpeg-turbo. + ------------------------------------------------------------------- Wed Mar 23 21:12:13 UTC 2016 - meissner@suse.com diff --git a/libgphoto2.spec b/libgphoto2.spec index 3ffdd8f..c0be613 100644 --- a/libgphoto2.spec +++ b/libgphoto2.spec @@ -55,6 +55,7 @@ Source0: https://downloads.sourceforge.net/project/gphoto/libgphoto/%{ver Source1: https://downloads.sourceforge.net/project/gphoto/libgphoto/%{version}//%{name}-%{version}.tar.bz2.asc Source2: %name.keyring Source3: baselibs.conf +Patch0: libgphoto2-newjpeg.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Recommends: %{name}-%{major}-lang = %{version} @@ -132,6 +133,9 @@ This is its API documentation in HTML format. %prep %setup -q +if pkg-config --atleast-version=1.5.0 libturbojpeg; then +%patch0 -p1 +fi (cd doc; tar xaf libgphoto2-api.html.tar.gz) %build