Update to 2.5.11

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
Igor Gnatenko 2016-11-21 15:01:41 +01:00
parent b910f65997
commit 09162ab4ab
3 changed files with 68 additions and 136 deletions

View File

@ -1,10 +1,12 @@
%bcond_with gp2ddb
%global udevdir %(pkg-config --variable=udevdir udev) %global udevdir %(pkg-config --variable=udevdir udev)
%global port_version 0.12.0
Name: libgphoto2 Name: libgphoto2
Version: 2.5.10 Version: 2.5.11
Release: 1%{?dist} Release: 1%{?dist}
Summary: Library for accessing digital cameras Summary: Library for accessing digital cameras
Group: Development/Libraries
# GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2 # GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2
License: GPLv2+ and GPLv2 License: GPLv2+ and GPLv2
URL: http://www.gphoto.org/ URL: http://www.gphoto.org/
@ -13,17 +15,27 @@ Source0: http://downloads.sourceforge.net/gphoto/%{name}-%{version}.tar.b
Patch1: gphoto2-pkgcfg.patch Patch1: gphoto2-pkgcfg.patch
Patch2: gphoto2-storage.patch Patch2: gphoto2-storage.patch
Patch3: gphoto2-device-return.patch Patch3: gphoto2-device-return.patch
Patch4: libjpeg_turbo_1.5.0_fix.patch
BuildRequires: libusbx-devel BuildRequires: gcc
BuildRequires: lockdev-devel BuildRequires: gcc-c++
BuildRequires: libexif-devel BuildRequires: make
BuildRequires: libjpeg-devel
BuildRequires: pkgconfig, sharutils
BuildRequires: libtool-ltdl-devel, popt-devel
BuildRequires: gd-devel
BuildRequires: systemd BuildRequires: systemd
%if %{with gp2ddb}
BuildRequires: flex
BuildRequires: bison
%endif
BuildRequires: libtool-ltdl-devel
BuildRequires: libjpeg-devel
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: gd-devel
BuildRequires: pkgconfig(libexif)
# -----------------------------------
# libgphoto2_port
# -----------------------------------
BuildRequires: lockdev-devel
BuildRequires: pkgconfig(libusb-1.0)
Requires: lockdev Requires: lockdev
# -----------------------------------
%description %description
libgphoto2 is a library that can be used by applications to access libgphoto2 is a library that can be used by applications to access
@ -31,10 +43,8 @@ various digital cameras. libgphoto2 itself is not a GUI application,
opposed to gphoto. There are GUI frontends for the gphoto2 library, opposed to gphoto. There are GUI frontends for the gphoto2 library,
however, such as gtkam for example. however, such as gtkam for example.
%package devel %package devel
Summary: Headers and links to compile against the libgphoto2 library Summary: Headers and links to compile against the libgphoto2 library
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: gphoto2-devel < 2.4.0-11 Obsoletes: gphoto2-devel < 2.4.0-11
Provides: gphoto2-devel = %{version}-%{release} Provides: gphoto2-devel = %{version}-%{release}
@ -48,53 +58,43 @@ however, such as gtkam for example.
This package contains files needed to compile applications that This package contains files needed to compile applications that
use libgphoto2. use libgphoto2.
%prep %prep
%setup -q %autosetup -p1
%patch1 -p1 -b .pkgcfg for f in AUTHORS ChangeLog COPYING libgphoto2_port/AUTHORS libgphoto2_port/COPYING.LIB `find -name 'README.*'`; do
%patch2 -p1 -b .storage iconv -f ISO-8859-1 -t UTF-8 $f > $f.conv && mv -f $f.conv $f
%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
iconv -f ISO-8859-1 -t UTF-8 < ${i}.old > ${i}
touch -r ${i}.old ${i} || :
rm -f ${i}.old
done done
%build %build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure \ %configure \
udevscriptdir='%{udevdir}' \ udevscriptdir='%{udevdir}' \
--with-drivers=all \ --with-drivers=all \
--with-doc-dir=%{_docdir}/%{name} \ --with-doc-dir=%{_pkgdocdir} \
--disable-static \ %if %{with gp2ddb}
--disable-rpath --enable-gp2ddb \
%endif
--disable-static \
--disable-rpath \
%{nil}
# Don't use rpath! # Don't use rpath!
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool libgphoto2_port/libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool libgphoto2_port/libtool
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libgphoto2_port/libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libgphoto2_port/libtool
make %{?_smp_mflags}
%make_build
%install %install
%make_install INSTALL="install -p" mandir=%{_mandir} %make_install INSTALL="install -p" mandir=%{_mandir}
pushd packaging/linux-hotplug/ pushd packaging/linux-hotplug/
export LIBDIR=$RPM_BUILD_ROOT%{_libdir} export LIBDIR=%{buildroot}%{_libdir}
export CAMLIBS=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} export CAMLIBS=%{buildroot}%{_libdir}/%{name}/%{version}
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
# Output udev rules for device identification; this is used by GVfs gphoto2 # Output udev rules for device identification; this is used by GVfs gphoto2
# backend and others. # backend and others.
# mkdir -p %{buildroot}%{_udevrulesdir}
mkdir -p $RPM_BUILD_ROOT%{_udevrulesdir} %{buildroot}%{_libdir}/%{name}/print-camera-list udev-rules version 136 > %{buildroot}%{_udevrulesdir}/40-libgphoto2.rules
$RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list udev-rules version 136 > $RPM_BUILD_ROOT%{_udevrulesdir}/40-libgphoto2.rules
popd popd
# remove circular symlink in /usr/include/gphoto2 (#460807) # remove circular symlink in /usr/include/gphoto2 (#460807)
@ -103,8 +103,7 @@ rm -f %{buildroot}%{_includedir}/gphoto2/gphoto2
# remove unneeded print-camera-list from libdir (#745081) # remove unneeded print-camera-list from libdir (#745081)
rm -f %{buildroot}%{_libdir}/libgphoto2/print-camera-list rm -f %{buildroot}%{_libdir}/libgphoto2/print-camera-list
find %{buildroot} -type f -name "*.la" -delete find %{buildroot} -type f -name "*.la" -print -delete
find %{buildroot} -type f -name "*.a" -delete
%find_lang %{name}-6 %find_lang %{name}-6
%find_lang %{name}_port-12 %find_lang %{name}_port-12
@ -112,39 +111,44 @@ cat libgphoto2*.lang >> %{name}.lang
# https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc # https://fedoraproject.org/wiki/Packaging_tricks#With_.25doc
mkdir __doc mkdir __doc
mv %{buildroot}%{_defaultdocdir}/%{name}/* __doc mv %{buildroot}%{_pkgdocdir}/* __doc
rm -rf %{buildroot}%{_defaultdocdir}/%{name} rm -rf %{buildroot}%{_pkgdocdir}
rm -rf %{buildroot}%{_datadir}/libgphoto2_port/*/vcamera/ rm -rf %{buildroot}%{_datadir}/libgphoto2_port/*/vcamera/
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files -f %{name}.lang %files -f %{name}.lang
%{!?_licensedir:%global license %%doc}
%license COPYING %license COPYING
%doc AUTHORS README NEWS %doc AUTHORS README NEWS
%dir %{_libdir}/libgphoto2_port %{_libdir}/%{name}.so.*
%dir %{_libdir}/libgphoto2_port/* %{_libdir}/%{name}_port.so.*
%dir %{_libdir}/libgphoto2 %dir %{_libdir}/%{name}/
%dir %{_libdir}/libgphoto2/* %dir %{_libdir}/%{name}/%{version}/
%{_libdir}/libgphoto2_port/*/*.so %dir %{_libdir}/%{name}_port/
%{_libdir}/libgphoto2/*/*.so %dir %{_libdir}/%{name}_port/%{port_version}/
%{_libdir}/*.so.* %{_libdir}/%{name}/%{version}/*.so
%{_libdir}/%{name}_port/%{port_version}/*.so
%{_udevrulesdir}/40-libgphoto2.rules %{_udevrulesdir}/40-libgphoto2.rules
%{udevdir}/check-ptp-camera %{udevdir}/check-ptp-camera
%{_datadir}/libgphoto2 %{_datadir}/libgphoto2/
%files devel %files devel
%doc __doc/* %doc __doc/*
%{_bindir}/gphoto2-config* %{_bindir}/gphoto2-config
%{_bindir}/gphoto2-port-config %{_bindir}/gphoto2-port-config
%{_includedir}/gphoto2 %{_includedir}/gphoto2/
%{_libdir}/*.so %{_libdir}/%{name}.so
%{_libdir}/pkgconfig/* %{_libdir}/%{name}_port.so
%{_mandir}/man3/* %{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/pkgconfig/%{name}_port.pc
%{_mandir}/man3/%{name}.3*
%{_mandir}/man3/%{name}_port.3*
%changelog %changelog
* Mon Nov 21 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 2.5.11-1
- Update to 2.5.11
* Sun Jul 10 2016 Peter Robinson <pbrobinson@fedoraproject.org> 2.5.10-1 * Sun Jul 10 2016 Peter Robinson <pbrobinson@fedoraproject.org> 2.5.10-1
- Update to 2.5.10 for new device support - Update to 2.5.10 for new device support
- Use %%license - Use %%license

View File

@ -1,72 +0,0 @@
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

View File

@ -1 +1 @@
f1e53e684a3ea51cc7958d7e4eee7f37 libgphoto2-2.5.10.tar.bz2 2426511143e6f2fae4f3744e91acfbc3 libgphoto2-2.5.11.tar.bz2