From jjreynold@ip68-99-84-220.ph.ph.cox.net  Sat Dec  7 06:05:24 2002
Return-Path: <jjreynold@ip68-99-84-220.ph.ph.cox.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0052C37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  7 Dec 2002 06:05:24 -0800 (PST)
Received: from ip68-99-84-220.ph.ph.cox.net (ip68-99-84-220.ph.ph.cox.net [68.99.84.220])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7073043EC5
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  7 Dec 2002 06:05:23 -0800 (PST)
	(envelope-from jjreynold@ip68-99-84-220.ph.ph.cox.net)
Received: from whale.home-net (whale [192.168.1.2])
	by ip68-99-84-220.ph.ph.cox.net (8.12.6/8.12.6) with ESMTP id gB7E5Nq4090156
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 7 Dec 2002 07:05:23 -0700 (MST)
	(envelope-from jjreynold@dolphin.home-net)
Received: from whale.home-net (localhost [127.0.0.1])
	by whale.home-net (8.12.6/8.12.6) with ESMTP id gB7E5NmQ023045
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 7 Dec 2002 07:05:23 -0700 (MST)
	(envelope-from jjreynold@whale.home-net)
Received: (from jjreynold@localhost)
	by whale.home-net (8.12.6/8.12.6/Submit) id gB7E5MZ9023044;
	Sat, 7 Dec 2002 07:05:22 -0700 (MST)
Message-Id: <200212071405.gB7E5MZ9023044@whale.home-net>
Date: Sat, 7 Dec 2002 07:05:22 -0700 (MST)
From: John Reynolds <johnjen@reynoldsnet.org>
Reply-To: John Reynolds <johnjen@reynoldsnet.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH-MAINTAINER] s10sh port needs an update (new libusb)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         46060
>Category:       ports
>Synopsis:       [PATCH-MAINTAINER] s10sh port needs an update (new libusb)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 07 06:10:01 PST 2002
>Closed-Date:    Sun Dec 08 15:48:39 PST 2002
>Last-Modified:  Sun Dec 08 15:48:39 PST 2002
>Originator:     John Reynolds
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
>Environment:

System: FreeBSD whale 4.7-STABLE FreeBSD 4.7-STABLE #0: Thu Dec 5 19:52:40 MST
2002 root@dolphin:/usr/obj/usr/src/sys/WHALE i386

>Description:

The s10sh port needs to be updated as there is an updated version of libusb
(that it depends on) in the works (PR just filed, ports/46059, 
http://www.freebsd.org/cgi/query-pr.cgi?pr=46059). Due to this change in
LIB_DEPEND, I've bumped the port revision.

In addition, Kenneth Merry sent in a patch to s10sh which allows him to operate
his camera. The owner of the code doesn't seem to respond to e-mail, so I've
rolled this functionality patch in with the local patch that already existed.

>How-To-Repeat:

n/a

>Fix:

Please apply the following patch in ports/graphics:

diff -urN s10sh.orig/Makefile s10sh/Makefile
--- s10sh.orig/Makefile	Sat Dec  7 06:36:58 2002
+++ s10sh/Makefile	Sat Dec  7 06:24:43 2002
@@ -6,7 +6,7 @@
 
 PORTNAME=	s10sh
 PORTVERSION=	0.2.0
-PORTREVISION=   2
+PORTREVISION=   3
 CATEGORIES=	graphics
 MASTER_SITES=	http://www.reynoldsnet.org/s10sh/ \
 		http://www.edwinh.org/s10sh/ \
@@ -22,7 +22,7 @@
 .if defined(NOUSB) || defined(WITHOUT_USB)
 MAKE_ENV+=	WITHOUT_USB=YES
 .else
-LIB_DEPENDS=	usb-0.1.5:${PORTSDIR}/devel/libusb
+LIB_DEPENDS=	usb-0.1.7:${PORTSDIR}/devel/libusb
 .endif
 
 .if !defined(NOPORTDOCS)
diff -urN s10sh.orig/files/patch-usb.c s10sh/files/patch-usb.c
--- s10sh.orig/files/patch-usb.c	Sat Apr 20 16:04:29 2002
+++ s10sh/files/patch-usb.c	Sat Dec  7 06:16:59 2002
@@ -1,5 +1,5 @@
---- usb.c.orig	Tue Mar 13 14:46:18 2001
-+++ usb.c	Sun Apr 21 00:59:11 2002
+--- usb.c.orig	Tue Mar 13 06:46:18 2001
++++ usb.c	Sat Dec  7 06:16:19 2002
 @@ -84,6 +84,12 @@
  						printf("Canon S20 found\n");
  					return USB_INIT_S20;
@@ -13,3 +13,24 @@
  				case PRODUCT_ID_S100_EU:
  				case PRODUCT_ID_S100_US:
  					*camera_dev = dev;
+@@ -97,6 +103,12 @@
+ 						printf("Canon G1 found\n");
+ 					return USB_INIT_G1;
+ 					break;
++				case PRODUCT_ID_G3:
++					*camera_dev = dev;
++					if (opt_debug)
++						printf("Canon G3 found\n");
++					return USB_INIT_G3;
++					break;
+ 				case PRODUCT_ID_NEXTDIGICAM1:
+ 				case PRODUCT_ID_NEXTDIGICAM2:
+ 				case PRODUCT_ID_NEXTDIGICAM3:
+@@ -118,6 +130,7 @@
+ 						dev->descriptor.idProduct);
+ 					break;
+ 				}
++				break;
+ 			default:
+ 				if (opt_debug)
+ 					printf("Unknown vendor ID: %04X\n",
diff -urN s10sh.orig/files/patch-usb.h s10sh/files/patch-usb.h
--- s10sh.orig/files/patch-usb.h	Sat Apr 20 16:04:29 2002
+++ s10sh/files/patch-usb.h	Sat Dec  7 06:17:23 2002
@@ -1,10 +1,12 @@
---- usb.h.orig	Tue Mar 13 14:46:18 2001
-+++ usb.h	Sun Apr 21 00:59:11 2002
-@@ -19,12 +19,14 @@
+--- usb.h.orig	Tue Mar 13 06:46:18 2001
++++ usb.h	Sat Dec  7 06:16:19 2002
+@@ -19,15 +19,20 @@
  #define USB_INIT_S20            2       /* S20 found */
  #define USB_INIT_S100		3	/* S100 (Digital Ixus) found */
  #define USB_INIT_G1		4	/* G1 found */
 +#define USB_INIT_A20		5	/* A20 found */
++#define USB_INIT_G2		6	/* G2 found */
++#define USB_INIT_G3		7	/* G3 found */
  #define USB_INIT_NEW		100	/* Unsupported PowerShot found! */
  #define USB_INIT_FAILED         -1      /* Unable to initialize USB */
  
@@ -15,3 +17,7 @@
  #define PRODUCT_ID_S100_US	0x3045	/* S100, aka. Digital Ixus, Elph */
  #define PRODUCT_ID_S100_EU	0x3047	/* S100, aka. Digital Ixus, Elph */
  #define PRODUCT_ID_G1		0x3048	/* PowerShot G1 */
++#define PRODUCT_ID_G3		0x306E
+ 
+ /* The Canon USB protocol of the S10, S20, S100, G1 is the same.
+  * We can hope that the next cameras will adopt a compatible protocol
diff -urN s10sh.orig/pkg-descr s10sh/pkg-descr
--- s10sh.orig/pkg-descr	Sat Apr 20 16:04:28 2002
+++ s10sh/pkg-descr	Sat Dec  7 06:21:54 2002
@@ -5,6 +5,7 @@
 S10sh supports the following PowerShot models: 
 
       G1 (works with USB, not reported if works with the serial interface) 
+      G3 (from local patches, perhaps needs further testing/debug)
       S10 (serial and USB) 
       S20 (serial and USB) 
       S100 aka Digital Ixus (USB only, since it lacks the serial interface) 


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: joe 
State-Changed-When: Sun Dec 8 15:44:51 PST 2002 
State-Changed-Why:  
Committed - thanks :). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=46060 
>Unformatted:
