S10sh - a Canon PowerShot digital camera driver (e.g. Digital IXUS)

This commit is contained in:
markus 2001-05-08 22:19:47 +00:00
parent 6a17672db5
commit b9cffce004
9 changed files with 197 additions and 0 deletions

30
graphics/s10sh/Makefile Normal file
View File

@ -0,0 +1,30 @@
# $OpenBSD: Makefile,v 1.1.1.1 2001/05/08 22:19:47 markus Exp $
COMMENT= "S10sh - a Canon PowerShot digital camera driver"
DISTNAME= s10sh-0.2.0
CATEGORIES= graphics
MASTER_SITES= http://www.kyuzz.org/antirez/s10sh-src/
HOMEPAGE= http://www.kyuzz.org/antirez/s10sh.html
MAINTAINER= Markus Friedl <markus@openbsd.org>
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
DOCDIR= ${PREFIX}/share/doc/s10sh
do-configure:
@cd ${WRKSRC}; ${SH} configure
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/s10sh ${PREFIX}/bin
${INSTALL_DATA_DIR} ${DOCDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}
${INSTALL_DATA} ${WRKSRC}/Protocol ${DOCDIR}
.include <bsd.port.mk>

3
graphics/s10sh/files/md5 Normal file
View File

@ -0,0 +1,3 @@
MD5 (s10sh-0.2.0.tar.gz) = 7792756ccb941baa87b3624d1a4bbe92
RMD160 (s10sh-0.2.0.tar.gz) = 2b0ef13958bde03b2e9056bc023e3dd0c84747b4
SHA1 (s10sh-0.2.0.tar.gz) = a8ada7c84ff64be98a1195612d48e2042f293eba

View File

@ -0,0 +1,44 @@
$OpenBSD: patch-configure,v 1.1.1.1 2001/05/08 22:19:48 markus Exp $
--- configure.orig Tue Mar 13 14:46:18 2001
+++ configure Tue May 8 08:47:39 2001
@@ -3,38 +3,9 @@
echo S10sh configuration utility
echo
-READLINE_DEFAULT="n"
-USB_DEFAULT="n"
+READLINE_DEFAULT="y"
+USB_DEFAULT="y"
-if test -f /usr/include/readline/readline.h; then
- READLINE_DEFAULT="y"
-fi
-
-if test -f /usr/local/include/readline/readline.h; then
- READLINE_DEFAULT="y"
-fi
-
-echo Do you want readline support? \(y/n default $READLINE_DEFAULT\)
-read TMP
-if [ "$TMP" != "" ]; then
- READLINE_DEFAULT=$TMP
-fi
-
-echo Do you want USB support? \(y/n default $USB_DEFAULT\)
-read TMP
-if [ "$TMP" != "" ]; then
- USB_DEFAULT=$TMP
-fi
-
-if [ "$READLINE_DEFAULT" != "y" ]; then
- READLINE_DEFAULT="n"
-fi
-
-if [ "$USB_DEFAULT" != "y" ]; then
- USB_DEFAULT="n"
-fi
-
-echo
echo READLINE support: $READLINE_DEFAULT
echo USB support : $USB_DEFAULT

View File

@ -0,0 +1,64 @@
$OpenBSD: patch-libusb-0_1_3b_freebsd_c,v 1.1.1.1 2001/05/08 22:19:48 markus Exp $
--- libusb-0.1.3b/freebsd.c.orig Tue Oct 10 00:08:22 2000
+++ libusb-0.1.3b/freebsd.c Tue May 8 08:47:40 2001
@@ -41,16 +41,18 @@ int usb_os_open(usb_dev_handle *dev)
{
int i;
struct freebsd_usb_dev_handle_info *info;
+ char ctlpath[PATH_MAX];
info = malloc(sizeof(*info));
if (!info)
USB_ERROR(-ENOMEM);
dev->impl_info = info;
- dev->fd = open(dev->device->filename, O_RDWR);
+ snprintf(ctlpath, PATH_MAX, "%s.00", dev->device->filename);
+ dev->fd = open(ctlpath, O_RDWR);
if (dev->fd < 0)
{
- dev->fd = open(dev->device->filename, O_RDONLY);
+ dev->fd = open(ctlpath, O_RDONLY);
if (dev->fd < 0)
{
free(info);
@@ -152,7 +154,7 @@ static int ensure_ep_open(usb_dev_handle
if(info->ep_fd[ep] < 0)
{
- sprintf(buf, "%s.%d", dev->device->filename, ep);
+ sprintf(buf, "%s.%02d", dev->device->filename, ep);
fd = open(buf, O_RDONLY);
if(fd < 0)
USB_ERROR_STR(fd, "can't open %s for bulk read: %s\n",
@@ -234,10 +236,12 @@ int usb_control_msg(usb_dev_handle *dev,
req.data = bytes;
req.flags = 0;
+#if 0
ret = ioctl(dev->fd, USB_SET_TIMEOUT, &timeout);
if (ret < 0)
USB_ERROR_STR(ret, "error setting timeout: %s",
strerror(errno));
+#endif
ret = ioctl(dev->fd, USB_DO_REQUEST, &req);
if (ret < 0)
@@ -285,7 +289,7 @@ int usb_find_devices_on_bus(struct usb_b
/* Open its control endpoint */
- sprintf(buf, "/dev/%s", di.devnames[0]);
+ sprintf(buf, "/dev/%s.00", di.devnames[0]);
dfd = open(buf, O_RDONLY);
if(dfd < 0)
{
@@ -302,7 +306,7 @@ int usb_find_devices_on_bus(struct usb_b
dev->bus = bus;
- strcpy(dev->filename, buf);
+ sprintf(dev->filename, "/dev/%s", di.devnames[0]);
if(ioctl(dfd, USB_GET_DEVICE_DESC, &dev->descriptor) < 0)
USB_ERROR_STR(-errno, "couldn't get device descriptor for %s: %s",

View File

@ -0,0 +1,10 @@
$OpenBSD: patch-libusb-0_1_3b_libusb-config_in,v 1.1.1.1 2001/05/08 22:19:48 markus Exp $
--- libusb-0.1.3b/libusb-config.in.orig Wed Feb 16 23:09:31 2000
+++ libusb-0.1.3b/libusb-config.in Tue May 8 08:47:40 2001
@@ -75,5 +75,5 @@ if test "$echo_cflags" = "yes"; then
echo $includes
fi
if test "$echo_libs" = "yes"; then
- echo -L@libdir@ -lusb
+ echo -L@libdir@ -Wl,-R@libdir@ -lusb
fi

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-main_c,v 1.1.1.1 2001/05/08 22:19:48 markus Exp $
--- main.c.orig Tue Mar 13 14:46:18 2001
+++ main.c Tue May 8 08:47:39 2001
@@ -37,7 +37,11 @@ int dirlist_size = 0;
char lastpath[1024] = {'\0'};
char cameraid[1024];
char firmware[8];
+#ifdef HAVE_USB_SUPPORT
+int mode = USB_MODE;
+#else
int mode = SERIAL_MODE; /* this is the default mode */
+#endif
int use_lowers = 0; /* write out files with upper case chars by default */
int GMT_offset = 0;

View File

@ -0,0 +1,11 @@
--- libusb-0.1.3b/configure.orig Sat Jan 13 21:17:45 2001
+++ libusb-0.1.3b/configure Tue May 8 08:47:40 2001
@@ -1605,7 +1605,7 @@ EOF
os_support=linux
echo "$ac_t""Linux" 1>&6
;;
- *-freebsd*)
+ *-freebsd*|*-netbsd*|*-openbsd*)
cat >> confdefs.h <<\EOF
#define FREEBSD 1
EOF

15
graphics/s10sh/pkg/DESCR Normal file
View File

@ -0,0 +1,15 @@
S10sh implements a DOS filesystem like interface. Using S10sh you
can download/explore the images captured with your digital camera.
This software is developed by Salvatore Sanfilippo that can be
contacted at the email address <antirez@invece.org>, and is distributed
under the terms of the GNU public license version 2.
This driver works at least with the following PowerShot models:
PS10
PS20
PS100 (Digital Ixus)
A50
Pro70
WWW: ${HOMEPAGE}

5
graphics/s10sh/pkg/PLIST Normal file
View File

@ -0,0 +1,5 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/05/08 22:19:48 markus Exp $
bin/s10sh
share/doc/s10sh/README
share/doc/s10sh/Protocol
@dirrm share/doc/s10sh