From 95849a2bcf9e37fbc169fa5da77953e62f295bf3 Mon Sep 17 00:00:00 2001 From: Andreas Klemm Date: Mon, 20 Oct 2003 17:49:40 +0000 Subject: Fix to support Canon PowerShot G5 Situation: - The PTP2 driver doesn't work for G5 - The G3 driver can't be used a G5 - So the canon native driver has been tought the G5's id etc ... - Bumped port revision, since the G5 PTP2 support was in test status and the G5 canon native driver support - fixes G5 PTP2 flaws and - is kind of new functionality These patches have been sent to the gphoto devel team and have been included into CVS today. Since yestarday 2.1.3 has been releases this fix will show up in later versions of libgphoto. Note 1: when using gphoto --auto-detect unluckily the buggy PTP2 driver will be autodetected. You then have to choose manually the correct driver. Easiest way is to use digikam->Setup and to Choose driver called "Canon PowerShot G5 (normal mode)". Note 2: If you want to use digikam as non-root user, you have to tweak permissions of /dev/ugenX and /dev/ugenX.{1,2,3} I succeded by using the following commands which I put into /etc/rc.local, thanks to Poul-Henning Kamp: /sbin/devfs ruleset 10 /sbin/devfs rule applyset /sbin/devfs rule add path ugen1* mode 666 /sbin/devfs rule show A working solution for /etc/devfs.rules I didn't find yet. Approved by: portmgr@freebsd.org (Joe) --- graphics/libgphoto2/Makefile | 2 +- graphics/libgphoto2/files/patch-ChangeLog | 16 ++++++++++++++++ graphics/libgphoto2/files/patch-camlibs:canon:canon.c | 19 +++++++++++++++++++ graphics/libgphoto2/files/patch-camlibs:canon:canon.h | 18 ++++++++++++++++++ graphics/libgphoto2/files/patch-camlibs:canon:usb.c | 10 ++++++++++ graphics/libgphoto2/files/patch-camlibs:canon:usb.h | 11 +++++++++++ 6 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 graphics/libgphoto2/files/patch-ChangeLog create mode 100644 graphics/libgphoto2/files/patch-camlibs:canon:canon.c create mode 100644 graphics/libgphoto2/files/patch-camlibs:canon:canon.h create mode 100644 graphics/libgphoto2/files/patch-camlibs:canon:usb.c create mode 100644 graphics/libgphoto2/files/patch-camlibs:canon:usb.h (limited to 'graphics') diff --git a/graphics/libgphoto2/Makefile b/graphics/libgphoto2/Makefile index 803f9974b935..b7624cbc90f6 100644 --- a/graphics/libgphoto2/Makefile +++ b/graphics/libgphoto2/Makefile @@ -7,7 +7,7 @@ PORTNAME= libgphoto2 PORTVERSION= 2.1.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= gphoto diff --git a/graphics/libgphoto2/files/patch-ChangeLog b/graphics/libgphoto2/files/patch-ChangeLog new file mode 100644 index 000000000000..e5fb899b400e --- /dev/null +++ b/graphics/libgphoto2/files/patch-ChangeLog @@ -0,0 +1,16 @@ +--- ChangeLog.orig Mon Oct 20 10:31:35 2003 ++++ ChangeLog Mon Oct 20 10:31:06 2003 +@@ -1,3 +1,13 @@ ++2003-10-20 Andreas Klemm ++ * Canon PowerShot G5 added ++ * camlibs/canon/canon.c: add G5 to struct canonCamModelData models[] ++ add G5 support in canon_int_filename2audioname ++ * camlibs/canon/canon.h: add G5 to enum canonCamModel ++ * camlibs/canon/usb.c: same behaviour as for G3 in canon_usb_lock_keys, ++ lock the keys on the camera and turn off display ++ * camlibs/canon/usb.h: CANON_USB_FUNCTION_GET_PIC_ABILITIES, expand ++ comment, add G5 after G3. ++ + 2003-08-10 gettextize + + * Makefile.am (SUBDIRS): Add intl. diff --git a/graphics/libgphoto2/files/patch-camlibs:canon:canon.c b/graphics/libgphoto2/files/patch-camlibs:canon:canon.c new file mode 100644 index 000000000000..7ff5c82bbbbd --- /dev/null +++ b/graphics/libgphoto2/files/patch-camlibs:canon:canon.c @@ -0,0 +1,19 @@ +--- camlibs/canon/canon.c.orig Sun Aug 10 20:51:13 2003 ++++ camlibs/canon/canon.c Mon Oct 20 10:17:48 2003 +@@ -138,6 +138,8 @@ + /* 0x306D is S45 in PTP mode */ + {"Canon:PowerShot G3 (normal mode)", CANON_PS_G3, 0x04A9, 0x306E, CAP_SUP, S99M, S32K, NULL}, + /* 0x306F is G3 in PTP mode */ ++ {"Canon:PowerShot G5 (normal mode)", CANON_PS_G5, 0x04A9, 0x3085, CAP_SUP, S99M, S32K, NULL}, ++ /* XXX 0x???? is G5 in PTP mode */ + {"Canon:PowerShot S230 (normal mode)", CANON_PS_S230, 0x04A9, 0x3070, CAP_SUP, S99M, S32K, NULL}, + /* 0x3071 is S230 in PTP mode */ + {"Canon:Digital IXUS v3 (normal mode)", CANON_PS_S230, 0x04A9, 0x3070, CAP_SUP, S99M, S32K, NULL}, +@@ -250,6 +252,7 @@ + case CANON_PS_S40: + case CANON_PS_S45: + case CANON_PS_G3: ++ case CANON_PS_G5: + break; + default: + GP_DEBUG ("canon_int_filename2audioname: camera model doesn't support audio files", diff --git a/graphics/libgphoto2/files/patch-camlibs:canon:canon.h b/graphics/libgphoto2/files/patch-camlibs:canon:canon.h new file mode 100644 index 000000000000..af1dd957ef1f --- /dev/null +++ b/graphics/libgphoto2/files/patch-camlibs:canon:canon.h @@ -0,0 +1,18 @@ +--- camlibs/canon/canon.h.orig Sun Aug 10 20:51:13 2003 ++++ camlibs/canon/canon.h Mon Oct 20 10:17:51 2003 +@@ -86,6 +86,7 @@ + * @CANON_PS_S330: Digital IXUS 330 + * @CANON_PS_S45: PowerShot S45 + * @CANON_PS_G3: PowerShot G3 ++ * @CANON_PS_G5: PowerShot G5 + * @CANON_PS_S230: PowerShot S230, Digital IXUS v3 + * @CANON_PS_A60: PowerShot A60 + * @CANON_EOS_10D: EOS 10D +@@ -123,6 +124,7 @@ + CANON_PS_A300, + CANON_PS_S45, + CANON_PS_G3, ++ CANON_PS_G5, + CANON_PS_S50, + CANON_PS_S230, + CANON_EOS_10D, diff --git a/graphics/libgphoto2/files/patch-camlibs:canon:usb.c b/graphics/libgphoto2/files/patch-camlibs:canon:usb.c new file mode 100644 index 000000000000..50c768a7dc66 --- /dev/null +++ b/graphics/libgphoto2/files/patch-camlibs:canon:usb.c @@ -0,0 +1,10 @@ +--- camlibs/canon/usb.c.orig Sun Aug 10 20:51:13 2003 ++++ camlibs/canon/usb.c Mon Oct 20 10:17:55 2003 +@@ -356,6 +356,7 @@ + + case CANON_PS_S45: + case CANON_PS_G3: ++ case CANON_PS_G5: + default: + /* Special case: doesn't implement "get + picture abilities", but isn't an EOS diff --git a/graphics/libgphoto2/files/patch-camlibs:canon:usb.h b/graphics/libgphoto2/files/patch-camlibs:canon:usb.h new file mode 100644 index 000000000000..c7a7ef14592d --- /dev/null +++ b/graphics/libgphoto2/files/patch-camlibs:canon:usb.h @@ -0,0 +1,11 @@ +--- camlibs/canon/usb.h.orig Sun Aug 10 20:51:13 2003 ++++ camlibs/canon/usb.h Mon Oct 20 10:17:57 2003 +@@ -38,7 +38,7 @@ + * @CANON_USB_FUNCTION_GET_PIC_ABILITIES: Command to "get picture abilities", which + * seems to be a list of the different sizes and quality of images that are available on + * this camera. Not implemented (and will cause an error) on the EOS cameras +- * or on newer PowerShot cameras such as the S45 and G3. ++ * or on newer PowerShot cameras such as the S45, G3 and G5. + * @CANON_USB_FUNCTION_GENERIC_LOCK_KEYS: Command to lock keys (and turn on "PC" indicator) + * on non-EOS cameras. + * @CANON_USB_FUNCTION_EOS_LOCK_KEYS: Lock keys (EOS cameras) -- cgit v1.2.3