forked from pool/libgphoto2
Accepting request 134172 from graphics
- Updated to major release 2.5.0 - more dynamic lists (no more fixed limits) - libgphoto2 api adjustments to make it more sane, binary incompatible - new .so version 6 - fixed one missed gp_devs = NULL which led to more crashes bnc#771743 OBS-URL: https://build.opensuse.org/request/show/134172 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libgphoto2?expand=0&rev=73
This commit is contained in:
commit
97a2186c8c
@ -1,116 +0,0 @@
|
||||
diff -ru ./camlibs/canon/canon.c /home/marcus/projects/libgphoto2-2_4/libgphoto2/camlibs/canon/canon.c
|
||||
--- camlibs/canon/canon.c 2012-03-30 23:23:47.000000000 +0200
|
||||
+++ camlibs/canon/canon.c 2012-07-19 20:19:15.693782425 +0200
|
||||
@@ -1333,8 +1333,7 @@
|
||||
if ( is_image ( new_name ) ) {
|
||||
/* Yup, we'll assume that this is the new image. */
|
||||
GP_DEBUG ( " Found our new image file" );
|
||||
- strncpy ( path->name, new_name,
|
||||
- strlen ( new_name ) );
|
||||
+ strcpy ( path->name, new_name );
|
||||
strcpy ( path->folder, canon2gphotopath ( camera, path->folder ) );
|
||||
|
||||
/* FIXME: Marcus: make it less large effort... */
|
||||
diff -ru ./camlibs/ptp2/library.c /home/marcus/projects/libgphoto2-2_4/libgphoto2/camlibs/ptp2/library.c
|
||||
--- camlibs/ptp2/library.c 2012-04-15 17:11:15.000000000 +0200
|
||||
+++ camlibs/ptp2/library.c 2012-07-19 20:19:15.686782359 +0200
|
||||
@@ -715,7 +715,7 @@
|
||||
{"Nikon:Coolpix L110 (PTP mode)", 0x04b0, 0x017e, PTP_CAP},
|
||||
|
||||
/* miguel@rozsas.eng.br */
|
||||
- {"Nikon:Coolpix P500 (PTP mode)", 0x04b0, 0x0184, 0},
|
||||
+ {"Nikon:Coolpix P500 (PTP mode)", 0x04b0, 0x0184, PTP_CAP},
|
||||
/* Graeme Wyatt <graeme.wyatt@nookawarra.com> */
|
||||
{"Nikon:Coolpix L120 (PTP mode)", 0x04b0, 0x0185, PTP_CAP},
|
||||
/* Kévin Ottens <ervin@ipsquad.net> */
|
||||
@@ -740,6 +740,8 @@
|
||||
{"Nikon:Coolpix S8000 (PTP mode)",0x04b0, 0x021f, 0},
|
||||
/* Aleksej Serdjukov <deletesoftware@yandex.ru> */
|
||||
{"Nikon:Coolpix S5100 (PTP mode)",0x04b0, 0x0220, 0},
|
||||
+ /* wlady.cs@gmail.com */
|
||||
+ {"Nikon:Coolpix P300 (PTP mode)", 0x04b0, 0x0221, 0},
|
||||
/* Nikon Coolpix 2000 */
|
||||
{"Nikon:Coolpix 2000 (PTP mode)", 0x04b0, 0x0302, 0},
|
||||
/* From IRC reporter. */
|
||||
@@ -810,6 +812,11 @@
|
||||
/* IRC Reporter popolon */
|
||||
{"Nikon:DSC D5100 (PTP mode)", 0x04b0, 0x0429, PTP_CAP|PTP_CAP_PREVIEW},
|
||||
|
||||
+
|
||||
+ /* http://sourceforge.net/tracker/?func=detail&aid=3536904&group_id=8874&atid=108874 */
|
||||
+ {"Nikon:V1", 0x04b0, 0x0601, PTP_CAP},
|
||||
+
|
||||
+
|
||||
#if 0
|
||||
/* Thomas Luzat <thomas.luzat@gmx.net> */
|
||||
/* this was reported as not working, mass storage only:
|
||||
@@ -1058,6 +1065,8 @@
|
||||
|
||||
/* Martin Lasarsch at SUSE. MTP_PROPLIST returns just 0 entries */
|
||||
{"Canon:Digital IXUS 90 IS", 0x04a9, 0x3174, PTPBUG_DELETE_SENDS_EVENT},
|
||||
+ /* Daniel Moyne <daniel.moyne@free.fr> */
|
||||
+ {"Canon:Powershot SD790 IS", 0x04a9, 0x3174, PTPBUG_DELETE_SENDS_EVENT},
|
||||
|
||||
/* https://sourceforge.net/tracker/?func=detail&aid=2722422&group_id=8874&atid=358874 */
|
||||
{"Canon:Digital IXUS 85 IS", 0x04a9, 0x3174, PTPBUG_DELETE_SENDS_EVENT},
|
||||
@@ -1289,6 +1298,9 @@
|
||||
{"Apple:iPod Touch 3rd Gen (PTP mode)", 0x05ac, 0x1299, 0},
|
||||
{"Apple:iPad (PTP mode)", 0x05ac, 0x129a, 0},
|
||||
|
||||
+ /* Don Cohen <don-sourceforge-xxzw@isis.cs3-inc.com> */
|
||||
+ {"Apple:iPhone 4S (PTP mode)", 0x05ac, 0x12a0, 0},
|
||||
+
|
||||
/* https://sourceforge.net/tracker/index.php?func=detail&aid=1869653&group_id=158745&atid=809061 */
|
||||
{"Pioneer:DVR-LX60D", 0x08e4, 0x0142, 0},
|
||||
|
||||
@@ -4555,12 +4567,14 @@
|
||||
unsigned char *ximage = NULL;
|
||||
unsigned int xlen = 0;
|
||||
|
||||
- /* If thumb size is 0 then there is no thumbnail at all... */
|
||||
- if((size=oi->ThumbCompressedSize)==0) return (GP_ERROR_NOT_SUPPORTED);
|
||||
+ size=oi->ThumbCompressedSize;
|
||||
+ /* If thumb size is 0 and the OFC is not a image type (0x3800 / 0xb800)... */
|
||||
+ if ((size==0) && ((oi->ObjectFormat & 0x7800) != 0x3800))
|
||||
+ return GP_ERROR_NOT_SUPPORTED;
|
||||
CPR (context, ptp_getthumb(params,
|
||||
params->handles.Handler[object_id],
|
||||
&ximage, &xlen));
|
||||
- if (xlen != size)
|
||||
+ if (size && (xlen != size))
|
||||
gp_log (GP_LOG_ERROR, "get_file_func/GP_FILE_TYPE_PREVIEW", "size mismatch %d vs %d", size, xlen);
|
||||
set_mimetype (camera, file, params->deviceinfo.VendorExtensionID, oi->ThumbFormat);
|
||||
CR (gp_file_set_data_and_size (file, (char*)ximage, xlen));
|
||||
diff -ru ./libgphoto2_port/libusb1/libusb1.c /home/marcus/projects/libgphoto2-2_4/libgphoto2/libgphoto2_port/libusb1/libusb1.c
|
||||
--- libgphoto2_port/libusb1/libusb1.c 2012-03-26 21:34:10.000000000 +0200
|
||||
+++ libgphoto2_port/libusb1/libusb1.c 2012-07-19 20:05:50.066206830 +0200
|
||||
@@ -119,6 +119,7 @@
|
||||
GPPortInfo info;
|
||||
int nrofdevices = 0;
|
||||
int d, i, i1, i2, unknownint;
|
||||
+ libusb_context *ctx;
|
||||
|
||||
/* generic matcher. This will catch passed XXX,YYY entries for instance. */
|
||||
info.type = GP_PORT_USB;
|
||||
@@ -126,8 +127,8 @@
|
||||
strcpy (info.path, "^usb:");
|
||||
CHECK (gp_port_info_list_append (list, info));
|
||||
|
||||
- libusb_init (NULL);
|
||||
- gp_nrofdevs = load_devicelist (NULL);
|
||||
+ libusb_init (&ctx);
|
||||
+ gp_nrofdevs = load_devicelist (ctx);
|
||||
|
||||
for (d = 0; d < gp_nrofdevs; d++) {
|
||||
/* Devices which are definitely not cameras. */
|
||||
@@ -239,7 +240,9 @@
|
||||
strcpy (info.path, "usb:");
|
||||
CHECK (gp_port_info_list_append (list, info));
|
||||
}
|
||||
- libusb_exit (NULL);
|
||||
+ libusb_exit (ctx);
|
||||
+ gp_nrofdevs = 0;
|
||||
+ gp_devs = NULL;
|
||||
return (GP_OK);
|
||||
}
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:59b32d45252f67d066cc3bda7a59f8078e0cf4e7f23590a4b621633e81060292
|
||||
size 4481384
|
3
libgphoto2-2.5.0.tar.bz2
Normal file
3
libgphoto2-2.5.0.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e7df389f1b034be021066227c0908b8f21d3be0cd0c6ed56979c04c3a9f75b31
|
||||
size 4635612
|
@ -1,13 +0,0 @@
|
||||
Index: libgphoto2-2.4.9/libgphoto2/gphoto2-list.c
|
||||
===================================================================
|
||||
--- libgphoto2-2.4.9.orig/libgphoto2/gphoto2-list.c
|
||||
+++ libgphoto2-2.4.9/libgphoto2/gphoto2-list.c
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
#ifdef CAMERALIST_STRUCT_COMPATIBILITY
|
||||
|
||||
-#define MAX_ENTRIES 1024
|
||||
+#define MAX_ENTRIES 4096
|
||||
#define MAX_LIST_STRING_LENGTH 128
|
||||
struct _CameraList {
|
||||
int count;
|
@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 13 08:45:14 UTC 2012 - meissner@suse.com
|
||||
|
||||
- Updated to major release 2.5.0
|
||||
- more dynamic lists (no more fixed limits)
|
||||
- libgphoto2 api adjustments to make it more sane,
|
||||
binary incompatible
|
||||
- new .so version 6
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 1 12:31:43 UTC 2012 - meissner@suse.com
|
||||
|
||||
- fixed one missed gp_devs = NULL which led to more crashes
|
||||
bnc#771743
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 19 18:40:18 UTC 2012 - meissner@suse.com
|
||||
|
||||
|
@ -25,6 +25,7 @@ BuildRequires: libexif-devel
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libusb-1_0-devel
|
||||
BuildRequires: libusb-devel
|
||||
BuildRequires: lockdev-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: udev
|
||||
@ -38,12 +39,10 @@ Obsoletes: libgphoto2-64bit
|
||||
Summary: A Digital Camera Library
|
||||
License: LGPL-2.1+
|
||||
Group: Hardware/Camera
|
||||
Version: 2.4.14
|
||||
Version: 2.5.0
|
||||
Release: 0
|
||||
Source0: libgphoto2-%{version}.tar.bz2
|
||||
Source1: baselibs.conf
|
||||
Patch0: lg-24-branch.patch
|
||||
Patch1: libgphoto2-4096files.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Recommends: %{name}-lang = %{version}
|
||||
|
||||
@ -78,8 +77,6 @@ These are its development libraries and headers.
|
||||
%lang_package
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
#AUTOPOINT=true autoreconf -fi
|
||||
@ -97,9 +94,9 @@ make check
|
||||
# skip-check-libtool-deps
|
||||
export LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
|
||||
%makeinstall
|
||||
%{find_lang} libgphoto2-2
|
||||
%{find_lang} libgphoto2_port-0
|
||||
cat libgphoto2-2.lang libgphoto2_port-0.lang > libgphoto2-all.lang
|
||||
%{find_lang} libgphoto2-6
|
||||
%{find_lang} libgphoto2_port-10
|
||||
cat libgphoto2-6.lang libgphoto2_port-10.lang > libgphoto2-all.lang
|
||||
pushd packaging/generic
|
||||
export CAMLIBS=$RPM_BUILD_ROOT/%_libdir/libgphoto2/%version/
|
||||
# new style UDEV rules (gudev) which will obsolete HAL fdi files
|
||||
@ -130,7 +127,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_libdir}/libgphoto2
|
||||
%{_libdir}/libgphoto2_port
|
||||
%dir %{_defaultdocdir}/%{name}
|
||||
%exclude %{_defaultdocdir}/%{name}/apidocs.html
|
||||
%{_defaultdocdir}/%{name}/*
|
||||
%{prefix}/share/%{name}
|
||||
%{_libdir}/libgphoto2.so.*
|
||||
@ -138,7 +134,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_mandir}/man3/libgphoto2.3*
|
||||
%{_mandir}/man3/libgphoto2_port.3*
|
||||
/lib/udev/rules.d/40-libgphoto2.rules
|
||||
# /usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2-device.fdi
|
||||
|
||||
%files lang -f libgphoto2-all.lang
|
||||
|
||||
@ -153,10 +148,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_libdir}/pkgconfig/libgphoto2.pc
|
||||
%{_libdir}/pkgconfig/libgphoto2_port.pc
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user