summaryrefslogtreecommitdiff
path: root/devel/libgphoto2/patches
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2005-01-05 15:52:52 +0000
committerdrochner <drochner@pkgsrc.org>2005-01-05 15:52:52 +0000
commit9adb72f535cd59fde26a5aca4cc77352192d49f5 (patch)
treea2ddce2ad097849b1d3306c4a401e3943b196a54 /devel/libgphoto2/patches
parent89267fadd5216fa8c6449a22faa37b0c56bfafe1 (diff)
downloadpkgsrc-9adb72f535cd59fde26a5aca4cc77352192d49f5.tar.gz
update to 2.1.5
changes: -many cameras added, misc driver enhancements and fixes -support for multiple USB devices
Diffstat (limited to 'devel/libgphoto2/patches')
-rw-r--r--devel/libgphoto2/patches/patch-aa31
-rw-r--r--devel/libgphoto2/patches/patch-ab21
-rw-r--r--devel/libgphoto2/patches/patch-ac41
3 files changed, 41 insertions, 52 deletions
diff --git a/devel/libgphoto2/patches/patch-aa b/devel/libgphoto2/patches/patch-aa
deleted file mode 100644
index 9736e53ad2c..00000000000
--- a/devel/libgphoto2/patches/patch-aa
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-aa,v 1.1 2004/02/21 22:58:08 cube Exp $
-
---- camlibs/aox/aox.c.orig Sun Jan 18 19:47:00 2004
-+++ camlibs/aox/aox.c
-@@ -39,10 +39,10 @@
- int aox_init (GPPort *port, Model *model, Info *info)
- {
- unsigned char c[4];
-- memset(c,0,sizeof(c));
- unsigned char hi[2];
-- memset (hi,0,2);
- unsigned char lo[2];
-+ memset(c,0,sizeof(c));
-+ memset (hi,0,2);
- memset (lo,0,2);
-
- GP_DEBUG("Running aox_init\n");
-@@ -86,11 +86,11 @@ int aox_get_num_hi_pics (Info *info
-
- int aox_get_picture_size (GPPort *port, int lo, int hi, int n, int k)
- {
-+ unsigned char c[4];
-+ unsigned int size;
- GP_DEBUG("Running aox_get_picture_size\n");
-
-- unsigned char c[4];
- memset (c,0,4);
-- unsigned int size;
-
- if ( ( (lo) && ( n ==k ) && (k ==0)) ) {
- READ(port, 0x04, 0x1, 0x1, c, 2);
diff --git a/devel/libgphoto2/patches/patch-ab b/devel/libgphoto2/patches/patch-ab
deleted file mode 100644
index 884586ad3ba..00000000000
--- a/devel/libgphoto2/patches/patch-ab
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-ab,v 1.1 2004/02/21 22:58:08 cube Exp $
-
---- camlibs/aox/library.c.orig Sun Jan 18 19:47:00 2004
-+++ camlibs/aox/library.c
-@@ -202,6 +202,7 @@ get_file_func (CameraFilesystem *fs, con
- gp_file_adjust_name_for_mime_type (file);
- }
- if ((w == 640)){
-+ int header_len;
- /* Stripping useless header */
- p_data = data + 0x98;
- /* Picture is mirror-imaged.*/
-@@ -222,7 +223,7 @@ get_file_func (CameraFilesystem *fs, con
- GP_DEBUG("size of data = %i\n", sizeof(data));
- GP_DEBUG("size of p_data = %i\n", sizeof(p_data));
- /* And now create a ppm file, with our own header */
-- int header_len = snprintf(header, 127,
-+ header_len = snprintf(header, 127,
- "P6\n"
- "# CREATOR: gphoto2, aox library\n"
- "%d %d\n"
diff --git a/devel/libgphoto2/patches/patch-ac b/devel/libgphoto2/patches/patch-ac
new file mode 100644
index 00000000000..06ffc453ba3
--- /dev/null
+++ b/devel/libgphoto2/patches/patch-ac
@@ -0,0 +1,41 @@
+$NetBSD: patch-ac,v 1.1 2005/01/05 15:52:52 drochner Exp $
+
+--- camlibs/ptp2/ptp.c.orig 2004-12-19 17:23:14.000000000 +0100
++++ camlibs/ptp2/ptp.c
+@@ -336,6 +336,9 @@ static inline uint16_t
+ ptp_usb_event (PTPParams* params, PTPContainer* event, int wait)
+ {
+ uint16_t ret;
++ uint32_t packetlen;
++ size_t toread;
++ unsigned char *bp;
+ unsigned int rlen;
+ PTPUSBEventContainer usbevent;
+ PTP_CNT_INIT(usbevent);
+@@ -345,8 +348,24 @@ ptp_usb_event (PTPParams* params, PTPCon
+
+ switch(wait) {
+ case PTP_EVENT_CHECK:
+- ret=params->check_int_func((unsigned char*)&usbevent,
+- sizeof(usbevent), params->data, &rlen);
++ ret=params->check_int_func((unsigned char*)&packetlen,
++ sizeof(packetlen), params->data, &rlen);
++ if (ret!=PTP_RC_OK)
++ break;
++ if (rlen != sizeof(packetlen)) {
++ ret = PTP_ERROR_IO;
++ break;
++ }
++ toread = dtoh32(packetlen) - sizeof(packetlen);
++ bp = (unsigned char*)&usbevent.type;
++ while (toread > 0) {
++ ret=params->check_int_func(bp,
++ toread, params->data, &rlen);
++ if (ret!=PTP_RC_OK)
++ break;
++ toread -= rlen;
++ bp += rlen;
++ }
+ break;
+ case PTP_EVENT_CHECK_FAST:
+ ret=params->check_int_fast_func((unsigned char*)